diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2020-07-26 19:36:28 +0000 |
commit | cfca06d7963fa0909f90483b42a6d7d194d01e08 (patch) | |
tree | 209fb2a2d68f8f277793fc8df46c753d31bc853b /compiler-rt/lib/gwp_asan/options.inc | |
parent | 706b4fc47bbc608932d3b491ae19a3b9cde9497b (diff) |
Notes
Diffstat (limited to 'compiler-rt/lib/gwp_asan/options.inc')
-rw-r--r-- | compiler-rt/lib/gwp_asan/options.inc | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/compiler-rt/lib/gwp_asan/options.inc b/compiler-rt/lib/gwp_asan/options.inc index df6c46e6e98f..6cdddfbad84d 100644 --- a/compiler-rt/lib/gwp_asan/options.inc +++ b/compiler-rt/lib/gwp_asan/options.inc @@ -17,9 +17,10 @@ GWP_ASAN_OPTION( "When allocations are right-aligned, should we perfectly align them up to " "the page boundary? By default (false), we round up allocation size to the " "nearest power of two (1, 2, 4, 8, 16) up to a maximum of 16-byte " - "alignment for performance reasons. Setting this to true can find single " - "byte buffer-overflows for multibyte allocations at the cost of " - "performance, and may be incompatible with some architectures.") + "alignment for performance reasons. For Bionic, we use 8-byte alignment by " + "default. Setting this to true can find single byte buffer-overflows for " + "multibyte allocations at the cost of performance, and may be incompatible " + "with some architectures.") GWP_ASAN_OPTION(int, MaxSimultaneousAllocations, 16, "Number of simultaneously-guarded allocations available in the " @@ -30,6 +31,13 @@ GWP_ASAN_OPTION(int, SampleRate, 5000, "selected for GWP-ASan sampling. Default is 5000. Sample rates " "up to (2^31 - 1) are supported.") +// Developer note - This option is not actually processed by GWP-ASan itself. It +// is included here so that a user can specify whether they want signal handlers +// or not. The supporting allocator should inspect this value to see whether +// signal handlers need to be installed, and then use +// crash_handler::installSignalHandlers() in order to install the handlers. Note +// that in order to support signal handlers, you will need to link against the +// optional crash_handler component. GWP_ASAN_OPTION( bool, InstallSignalHandlers, true, "Install GWP-ASan signal handlers for SIGSEGV during dynamic loading. This " @@ -39,3 +47,7 @@ GWP_ASAN_OPTION( "programs that install further signal handlers should make sure they do " "the same. Note, if the previously installed SIGSEGV handler is SIG_IGN, " "we terminate the process after dumping the error report.") + +GWP_ASAN_OPTION(bool, InstallForkHandlers, true, + "Install GWP-ASan atfork handlers to acquire internal locks " + "before fork and release them after.") |