Update and improve compiler-rt tests for -mllvm -asan_use_after_return=(never|[runtim...
authorKevin Athey <kda@google.com>
Tue, 8 Jun 2021 19:45:48 +0000 (12:45 -0700)
committerKevin Athey <kda@google.com>
Tue, 8 Jun 2021 21:39:06 +0000 (14:39 -0700)
commitaf8c59e06d281f96db101d87ec227b238045a1d8
tree5b646351a495711e5a7850bf60f6c1ac0b90d203
parent8b32e25bc229f98faed002b1cc90587ca300c92a
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
14 files changed:
compiler-rt/lib/asan/asan_fake_stack.cpp
compiler-rt/lib/asan/asan_interface.inc
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
llvm/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
llvm/test/Instrumentation/AddressSanitizer/stack_dynamic_alloca.ll