Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtim...
authorKevin Athey <kda@google.com>
Thu, 3 Jun 2021 19:40:14 +0000 (12:40 -0700)
committerKevin Athey <kda@google.com>
Thu, 3 Jun 2021 20:13:51 +0000 (13:13 -0700)
commit41b3088c3f33d712e3d2f64b66ae4eb701fa4bfb
treeb9a5f6d1e1b23ac1fe9840f037dd4dd7057c20b8
parent6fa5353a5696bf8c4c2689126a025330c72aa8f9
Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtime]|always).

In addition:
  - optionally add global flag to capture compile intent for UAR:
    __asan_detect_use_after_return_always.
    The global is a SANITIZER_WEAK_ATTRIBUTE.

for issue: https://github.com/google/sanitizers/issues/1394

Reviewed By: vitalybuka

Differential Revision: https://reviews.llvm.org/D103304
12 files changed:
compiler-rt/lib/asan/asan_interface.inc
compiler-rt/lib/asan/asan_rtl.cpp
compiler-rt/test/asan/TestCases/Linux/uar_signals.cpp
compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp
compiler-rt/test/asan/TestCases/Windows/dll_stack_use_after_return.cpp
compiler-rt/test/asan/TestCases/Windows/stack_use_after_return.cpp
compiler-rt/test/asan/TestCases/heavy_uar_test.cpp
compiler-rt/test/asan/TestCases/pass-struct-byval-uar.cpp
compiler-rt/test/asan/TestCases/scariness_score_test.cpp
compiler-rt/test/asan/TestCases/uar_and_exceptions.cpp
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/test/Instrumentation/AddressSanitizer/fake-stack.ll