[PATCH] D73294: [GWP-ASan] enable/disable and fork support.
Evgenii Stepanov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 23 14:11:16 PST 2020
eugenis created this revision.
eugenis added reviewers: cryptoad, hctim.
Herald added subscribers: Sanitizers, jfb, mgorny.
Herald added a reviewer: jfb.
Herald added projects: Sanitizers, LLVM.
eugenis added a comment.
Herald added a subscriber: dexonsmith.
I've merged two earlier changes (gwp-asan re-enablement and atfork/enable/disable support) in one because they are interconnected.
- Implement enable() and disable() in GWP-ASan.
- Setup atfork handler.
- Improve test harness sanity and re-enable GWP-ASan in Scudo.
Scudo_standalone disables embedded GWP-ASan as necessary around fork().
Standalone GWP-ASan sets the atfork handler in init() if asked to. This
requires a working malloc(), therefore GWP-ASan initialization in Scudo
is delayed to the post-init callback.
Test harness changes are about setting up a single global instance of
the GWP-ASan allocator so that pthread_atfork() does not create
dangling pointers.
Test case shamelessly stolen from D72470 <https://reviews.llvm.org/D72470>.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D73294
Files:
compiler-rt/lib/gwp_asan/guarded_pool_allocator.cpp
compiler-rt/lib/gwp_asan/guarded_pool_allocator.h
compiler-rt/lib/gwp_asan/options.inc
compiler-rt/lib/gwp_asan/platform_specific/guarded_pool_allocator_posix.cpp
compiler-rt/lib/gwp_asan/tests/CMakeLists.txt
compiler-rt/lib/gwp_asan/tests/enable_disable.cpp
compiler-rt/lib/gwp_asan/tests/harness.cpp
compiler-rt/lib/gwp_asan/tests/harness.h
compiler-rt/lib/scudo/standalone/CMakeLists.txt
compiler-rt/lib/scudo/standalone/combined.h
compiler-rt/lib/scudo/standalone/tests/CMakeLists.txt
compiler-rt/lib/scudo/standalone/tests/combined_test.cpp
compiler-rt/lib/scudo/standalone/wrappers_c.inc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73294.240006.patch
Type: text/x-patch
Size: 19369 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200123/0c4b7951/attachment.bin>
More information about the llvm-commits
mailing list