diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc index 572ca2d0ce9f..27b179e83624 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc @@ -1,7 +1,7 @@ // RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1 -// RUN: %clangxx_asan -fsanitize=use-after-return -O0 %s -o %t && \ +// RUN: %clangxx_asan -O0 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -fsanitize=use-after-return -O2 %s -o %t && \ +// RUN: %clangxx_asan -O2 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc index 70aab4fefeca..9663859dfefd 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc @@ -1,7 +1,7 @@ // This test shows that the current implementation of use-after-return is // not signal-safe. // RUN: %clangxx_asan -O1 %s -o %t -lpthread && %t -// RUN: %clangxx_asan -fsanitize=use-after-return -O1 %s -o %t -lpthread && %t +// RUN: %clangxx_asan -O1 %s -o %t -lpthread && %t #include #include #include diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc b/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc index 840ea38725df..d231bb57177d 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/deep_call_stack.cc @@ -1,6 +1,6 @@ // Check that UAR mode can handle very deep recusrion. -// -// RUN: %clangxx_asan -fsanitize=use-after-return -O2 %s -o %t && \ +// export ASAN_OPTIONS=detect_stack_use_after_return=1 +// RUN: %clangxx_asan -O2 %s -o %t && \ // RUN: %t 2>&1 | FileCheck %s #include diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/stack-use-after-return.cc b/compiler-rt/lib/asan/lit_tests/TestCases/stack-use-after-return.cc index f74f50e4af6d..a3adda80da38 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/stack-use-after-return.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/stack-use-after-return.cc @@ -1,19 +1,19 @@ // RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1 -// RUN: %clangxx_asan -fsanitize=use-after-return -O0 %s -o %t && \ +// RUN: %clangxx_asan -O0 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -fsanitize=use-after-return -O1 %s -o %t && \ +// RUN: %clangxx_asan -O1 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -fsanitize=use-after-return -O2 %s -o %t && \ +// RUN: %clangxx_asan -O2 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck %s -// RUN: %clangxx_asan -fsanitize=use-after-return -O3 %s -o %t && \ +// RUN: %clangxx_asan -O3 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck %s // RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t // Regression test for a CHECK failure with small stack size and large frame. -// RUN: %clangxx_asan -fsanitize=use-after-return -O3 %s -o %t -DkSize=10000 && \ +// RUN: %clangxx_asan -O3 %s -o %t -DkSize=10000 && \ // RUN: (ulimit -s 65; not %t) 2>&1 | FileCheck %s // // Test that we can find UAR in a thread other than main: -// RUN: %clangxx_asan -fsanitize=use-after-return -DUseThread -O2 %s -o %t && \ +// RUN: %clangxx_asan -DUseThread -O2 %s -o %t && \ // RUN: not %t 2>&1 | FileCheck --check-prefix=THREAD %s #include diff --git a/compiler-rt/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc b/compiler-rt/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc index beb41515db02..c967531c2c02 100644 --- a/compiler-rt/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc +++ b/compiler-rt/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc @@ -1,5 +1,6 @@ // Test that use-after-return works with exceptions. -// RUN: %clangxx_asan -fsanitize=use-after-return -O0 %s -o %t && %t +// export ASAN_OPTIONS=detect_stack_use_after_return=1 +// RUN: %clangxx_asan -O0 %s -o %t && %t #include diff --git a/compiler-rt/lib/asan/tests/CMakeLists.txt b/compiler-rt/lib/asan/tests/CMakeLists.txt index 69a14705af15..49f5c0f150b9 100644 --- a/compiler-rt/lib/asan/tests/CMakeLists.txt +++ b/compiler-rt/lib/asan/tests/CMakeLists.txt @@ -67,7 +67,6 @@ set(ASAN_UNITTEST_INSTRUMENTED_CFLAGS -mllvm -asan-globals=1 -mllvm -asan-mapping-scale=0 # default will be used -mllvm -asan-mapping-offset-log=-1 # default will be used - -mllvm -asan-use-after-return=0 ) if(ASAN_TESTS_USE_ZERO_BASE_SHADOW) list(APPEND ASAN_UNITTEST_INSTRUMENTED_CFLAGS