[asan] Implement delayed activation of AddressSanitizer

Press ? to show keyboard shortcuts.
Committed
eugenisJan 16 2014, 4:31 AM
Parents
rL199376: ReMat: fix overly cavalier attitude to sub-register indices
Branches
Unknown
Tags
Unknown
Description

[asan] Implement delayed activation of AddressSanitizer

This change adds ASAN_OPTIONS=start_deactivated=1 flag. When present, ASan will
start in "deactivated" mode, with no heap poisoning, no quarantine, no stack
trace gathering, and minimal redzones. All this features come back when
__asan_init is called for the constructor of an instrumented library.

The primary use case for this feature is Android. Code itself is not
Android-specific, and this patch includes a Linux test for it.

rL199377

compiler-rt/trunk/lib/asan/CMakeLists.txt

Loading...

compiler-rt/trunk/lib/asan/asan_activation.cc

Loading...

compiler-rt/trunk/lib/asan/asan_activation.h

Loading...

compiler-rt/trunk/lib/asan/asan_allocator2.cc

Loading...

compiler-rt/trunk/lib/asan/asan_flags.h

Loading...

compiler-rt/trunk/lib/asan/asan_interceptors.cc

Loading...

compiler-rt/trunk/lib/asan/asan_internal.h

Loading...

compiler-rt/trunk/lib/asan/asan_malloc_mac.cc

Loading...

compiler-rt/trunk/lib/asan/asan_rtl.cc

Loading...

compiler-rt/trunk/lib/asan/lit_tests/TestCases/SharedLibs/start-deactivated-so.cc

Loading...

compiler-rt/trunk/lib/asan/lit_tests/TestCases/start-deactivated.cc

Loading...

Add Comment