Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtim...
authorKevin Athey <kda@google.com>
Sat, 5 Jun 2021 03:21:01 +0000 (20:21 -0700)
committerVitaly Buka <vitalybuka@google.com>
Sat, 5 Jun 2021 07:26:10 +0000 (00:26 -0700)
commit927688a4cd9dcde92e8bf430e6ceefac6ab8c8a0
tree8201df828a470f60e78553f524caabe1b2adccb6
parentc2f2c1b32c9c8fadc1082aec4066d184b455057f
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/lib/asan/weak_symbols.txt
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/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
llvm/utils/gn/secondary/compiler-rt/lib/asan/BUILD.gn