From cf2cabb752ffeff152ed471fa407a415c404d6e4 Mon Sep 17 00:00:00 2001 From: Kostya Serebryany Date: Mon, 23 Sep 2013 14:34:06 +0000 Subject: [PATCH] [asan] remove -fsanitize=use-after-return from the tests (this flag now comes with asan by default) git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/trunk@191204 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc | 4 ++-- lib/asan/lit_tests/TestCases/Linux/uar_signals.cc | 2 +- lib/asan/lit_tests/TestCases/deep_call_stack.cc | 4 ++-- lib/asan/lit_tests/TestCases/stack-use-after-return.cc | 12 ++++++------ lib/asan/lit_tests/TestCases/uar_and_exceptions.cc | 3 ++- lib/asan/tests/CMakeLists.txt | 1 - 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc b/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc index 572ca2d0c..27b179e83 100644 --- a/lib/asan/lit_tests/TestCases/Linux/heavy_uar_test.cc +++ b/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/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc b/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc index 70aab4fef..9663859df 100644 --- a/lib/asan/lit_tests/TestCases/Linux/uar_signals.cc +++ b/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/lib/asan/lit_tests/TestCases/deep_call_stack.cc b/lib/asan/lit_tests/TestCases/deep_call_stack.cc index 840ea3872..d231bb571 100644 --- a/lib/asan/lit_tests/TestCases/deep_call_stack.cc +++ b/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/lib/asan/lit_tests/TestCases/stack-use-after-return.cc b/lib/asan/lit_tests/TestCases/stack-use-after-return.cc index f74f50e4a..a3adda80d 100644 --- a/lib/asan/lit_tests/TestCases/stack-use-after-return.cc +++ b/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/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc b/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc index beb41515d..c967531c2 100644 --- a/lib/asan/lit_tests/TestCases/uar_and_exceptions.cc +++ b/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/lib/asan/tests/CMakeLists.txt b/lib/asan/tests/CMakeLists.txt index 69a14705a..49f5c0f15 100644 --- a/lib/asan/tests/CMakeLists.txt +++ b/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 -- 2.11.4.GIT