[compiler-rt] 72e00c4 - [asan] Don't enable detect_stack_use_after_return on Windows

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 19:10:48 PDT 2022


Author: Vitaly Buka
Date: 2022-04-22T19:10:30-07:00
New Revision: 72e00c45a4e7b1651c0fdfe4bfc12ff5e2a201d3

URL: https://github.com/llvm/llvm-project/commit/72e00c45a4e7b1651c0fdfe4bfc12ff5e2a201d3
DIFF: https://github.com/llvm/llvm-project/commit/72e00c45a4e7b1651c0fdfe4bfc12ff5e2a201d3.diff

LOG: [asan] Don't enable detect_stack_use_after_return on Windows

It's not clear how ready it's there.

Added: 
    

Modified: 
    clang/docs/ReleaseNotes.rst
    compiler-rt/lib/asan/asan_flags.inc

Removed: 
    


################################################################################
diff  --git a/clang/docs/ReleaseNotes.rst b/clang/docs/ReleaseNotes.rst
index 066a0e1977324..3f1c86cdc3aca 100644
--- a/clang/docs/ReleaseNotes.rst
+++ b/clang/docs/ReleaseNotes.rst
@@ -174,7 +174,7 @@ Non-comprehensive list of changes in this release
   - Remove anonymous tag locations.
   - Beautify dump format, add indent for nested struct and struct members.
 - Previously disabled sanitizer options now enabled by default:
-  - ASAN_OPTIONS=detect_stack_use_after_return=1.
+  - ASAN_OPTIONS=detect_stack_use_after_return=1 (except Windows).
   - MSAN_OPTIONS=poison_in_dtor=1.
 
 New Compiler Flags

diff  --git a/compiler-rt/lib/asan/asan_flags.inc b/compiler-rt/lib/asan/asan_flags.inc
index 31d4b3a6f3cc5..04023234bc945 100644
--- a/compiler-rt/lib/asan/asan_flags.inc
+++ b/compiler-rt/lib/asan/asan_flags.inc
@@ -49,7 +49,7 @@ 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, true,
+ASAN_FLAG(bool, detect_stack_use_after_return, !SANITIZER_WINDOWS,
           "Enables stack-use-after-return checking at run-time.")
 ASAN_FLAG(int, min_uar_stack_size_log, 16, // We can't do smaller anyway.
           "Minimum fake stack size log.")


        


More information about the llvm-commits mailing list