aboutsummaryrefslogtreecommitdiff
path: root/src/lib/malloc
AgeCommit message (Collapse)Author
2021-03-12Update copyrights to 2021, using "make update-copyright"Nick Mathewson
2020-02-06Fix a couple more long warning linesNick Mathewson
These are not a problem with 2-space indentation, but cocci will start getting confused when clang-format wraps them with 4-space indentation.
2020-01-08It's 2020. Update the copyright dates with "make update-copyright"Nick Mathewson
2019-11-15Doxygen: rename all .dox files to end with .mdNick Mathewson
Using a standard ending here will let other tools that expect markdown understand our output here. This commit was automatically generated with: for fn in $(find src -name '*.dox'); do \ git mv "$fn" "${fn%.dox}.md"; \ done
2019-11-15Doxygen: remove /** and **/ from all .dox filesNick Mathewson
This is an automatically generated commit, made with: find src -name '*.dox' | \ xargs perl -i -ne 'print unless (m#^\s*/?\*\*/?\s*$#);'
2019-11-04Divide 01a-memory.md into doxygen.Nick Mathewson
2019-11-04Doxygen: Avoid ambiguity in @dir directivesNick Mathewson
This commit was automatically generated with: find src -name '*.dox' |xargs perl -i -pe 's{\@dir ([^/])}{\@dir /$1};'
2019-11-04doxygen: Take "lib" descriptions from doc/HACKING/design.Nick Mathewson
This commit takes descriptions for src/lib and moves them into our doxygen hierarchy. I've covered everything from lib/cc through lib/sandbox here.
2019-11-04Add stub directory-level documentation for most source directoriesNick Mathewson
This includes app, core, feature, lib, and tools, but excludes ext, test, and trunnel. This was generated by the following shell script: cd src for dname in $(find lib core feature app tools -type d |grep -v \\.deps$); do keyword="$(echo "$dname" |sed -e "s/\//_/" )" target="${dname}/${keyword}.dox" echo "$target" cat <<EOF >"$target" /** @dir ${dname} @brief ${dname} **/ EOF git add "$target" done
2019-10-22Merge branch 'ticket31705_v2' into ticket31705_v2_mergedNick Mathewson
Conflicts: src/feature/dirparse/authcert_parse.c src/feature/dirparse/ns_parse.c src/feature/hs/hs_service.c src/lib/conf/conftesting.h src/lib/log/log.h src/lib/thread/threads.h src/test/test_options.c These conflicts were mostly related to autostyle improvements, with one or two due to doxygen fixes.
2019-10-22Use #warning instead of #warn: one is C and one isn't.Nick Mathewson
2019-09-30Re-run "make autostyle" with improved annotate_ifdef_directivesNick Mathewson
2019-09-16Run "make autostyle" and fix wide lines.Nick Mathewson
2019-09-16Merge branch 'tor-github/pr/1318'George Kadianakis
2019-09-11madvise: tolerate EINVAL and ENOSYS when minherit failsNick Mathewson
These errors can occur if we are built on a system with support for madvise(MADV_NOFORK) but then we are run on a system whose kernel does not support that flag. If the error is something that we don't tolerate at all, we now log it before crashing. Fixes bug 31696. I am calling this a bugfix on 0.4.1.1-alpha, where we actually started using the map_anon code. This is similar to, but not the same as, the fix for #31570.
2019-09-02madvise: tolerate EINVAL and ENOSYSNick Mathewson
These errors can occur if we are built on a system with support for madvise(MADV_NOFORK) but then we are run on a system whose kernel does not support that flag. If the error is something that we don't tolerate at all, we now log it before crashing. Fixes bug 31570. I am calling this a bugfix on 0.4.1.1-alpha, where we actually started using the map_anon code.
2019-06-11Merge branch 'tor-github/pr/1050' into maint-0.4.1David Goulet
2019-06-11Give a compile warning when we don't have any flags for minherit().Nick Mathewson
Part of ticket 30686.
2019-06-05Run "make autostyle."Nick Mathewson
2019-05-30Merge branch 'tor-github/pr/1049'David Goulet
2019-05-29Use MAP_INHERIT_ZERO or MAP_INHERIT_NONE if available.Taylor R Campbell
Fixes assertion failure in tests on NetBSD: slow/prob_distr/stochastic_log_logistic: [forking] May 25 03:56:58.091 [err] tor_assertion_failed_(): Bug: src/lib/crypt_ops/crypto_rand_fast.c:184: crypto_fast_rng_new_from_seed: Assertion inherit != INHERIT_RES_KEEP failed; aborting. (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61) May 25 03:56:58.091 [err] Bug: Assertion inherit != INHERIT_RES_KEEP failed in crypto_fast_rng_new_from_seed at src/lib/crypt_ops/crypto_rand_fast.c:184: . (Stack trace not available) (on Tor 0.4.1.1-alpha-dev 29955f13e5bc8e61) [Lost connection!]
2019-05-02Add comments to include.am files to note where new sources goNick Mathewson
This mechanism isn't perfect, and sometimes it will guess wrong, but it will help our automation.
2019-04-04Use an enum for inherit_result_out.Nick Mathewson
2019-04-04rename inherit values to avoid conflict with system definesNick Mathewson
2019-04-04map_anon: define a macro if it is possible for noinherit to fail.Nick Mathewson
2019-04-04Make map_anon expose the result of a noinherit attemptNick Mathewson
Previously we did this for tests only, but it's valuable for getting proper fork behavior in rand_fast.
2019-02-25Re-enable and fix unit test for nofork mappingsNick Mathewson
This test was previously written to use the contents of the system headers to decide whether INHERIT_NONE or INHERIT_ZERO was going to work. But that won't work across different environments, such as (for example) when the kernel doesn't match the headers. Instead, we add a testing-only feature to the code to track which of these options actually worked, and verify that it behaved as we expected. Closes ticket 29541; bugfix not on any released version of Tor.
2019-02-06Code for anonymous mappings via mmap() or CreateFileMapping().Nick Mathewson
Using an anonymous mmap() is a good way to get pages that we can set kernel-level flags on, like minherit() or madvise() or mlock(). We're going to use that so that we can make uninheritable locked pages to store PRNG data.
2019-01-16Bump copyright date to 2019Nick Mathewson
2018-11-14Normalize .may_include to always have paths, and paths to includeNick Mathewson
2018-07-10Rename util_malloc to malloc.Nick Mathewson
2018-07-05Move openbsd-malloc responsibility to lib/mallocNick Mathewson
(Note that this is not believed to work, but we may as well have it in the right place till we remove it)
2018-07-03Remove ATTR_NONNULL macrorl1987
2018-06-22Split container.c based on container types, and minimize includesNick Mathewson
Minimizing includes revealed other places includes were necessary.
2018-06-21Extract tor_malloc and friends to a new module.Nick Mathewson