diff options
author | Vitaly Buka <vitalybuka@google.com> | 2022-04-29 05:14:52 +0300 |
---|---|---|
committer | Vitaly Buka <vitalybuka@google.com> | 2022-04-29 07:08:16 +0300 |
commit | 78582194361e4454e95d3af23367b81dd63b7943 (patch) | |
tree | 9a564fd279843808f6146b10c23d411e4a8826b4 /compiler-rt | |
parent | a70cf56d20b956fc008d24420e14226127ba9f4a (diff) |
[asan] Enable detect_stack_use_after_return=1 by default on Linux
By default -fsanitize=address already compiles with this check, why not use it.
For compatibly it can be disabled with env ASAN_OPTIONS=detect_stack_use_after_return=0.
Reviewed By: eugenis, kda, #sanitizers, hans
Differential Revision: https://reviews.llvm.org/D124057
Diffstat (limited to 'compiler-rt')
-rw-r--r-- | compiler-rt/lib/asan/asan_flags.inc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler-rt/lib/asan/asan_flags.inc b/compiler-rt/lib/asan/asan_flags.inc index 514b225c4073..314ed1935358 100644 --- a/compiler-rt/lib/asan/asan_flags.inc +++ b/compiler-rt/lib/asan/asan_flags.inc @@ -49,9 +49,10 @@ ASAN_FLAG( "to find more errors.") ASAN_FLAG(bool, replace_intrin, true, "If set, uses custom wrappers for memset/memcpy/memmove intrinsics.") -ASAN_FLAG(bool, detect_stack_use_after_return, false, +ASAN_FLAG(bool, detect_stack_use_after_return, + SANITIZER_LINUX && !SANITIZER_ANDROID, "Enables stack-use-after-return checking at run-time.") -ASAN_FLAG(int, min_uar_stack_size_log, 16, // We can't do smaller anyway. +ASAN_FLAG(int, min_uar_stack_size_log, 16, // We can't do smaller anyway. "Minimum fake stack size log.") ASAN_FLAG(int, max_uar_stack_size_log, 20, // 1Mb per size class, i.e. ~11Mb per thread |