[asan] remove -fsanitize=use-after-return from the tests (this flag now comes with asan by default)
llvm-svn: 191204
This commit is contained in:
parent
86d0c8d751
commit
01ff028814
|
|
@ -1,7 +1,7 @@
|
||||||
// RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1
|
// 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: 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: not %t 2>&1 | FileCheck %s
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
// This test shows that the current implementation of use-after-return is
|
// This test shows that the current implementation of use-after-return is
|
||||||
// not signal-safe.
|
// not signal-safe.
|
||||||
// RUN: %clangxx_asan -O1 %s -o %t -lpthread && %t
|
// 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 <signal.h>
|
#include <signal.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Check that UAR mode can handle very deep recusrion.
|
// Check that UAR mode can handle very deep recusrion.
|
||||||
//
|
// export ASAN_OPTIONS=detect_stack_use_after_return=1
|
||||||
// RUN: %clangxx_asan -fsanitize=use-after-return -O2 %s -o %t && \
|
// RUN: %clangxx_asan -O2 %s -o %t && \
|
||||||
// RUN: %t 2>&1 | FileCheck %s
|
// RUN: %t 2>&1 | FileCheck %s
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,19 @@
|
||||||
// RUN: export ASAN_OPTIONS=detect_stack_use_after_return=1
|
// 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: 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: 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: 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: not %t 2>&1 | FileCheck %s
|
||||||
// RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t
|
// RUN: ASAN_OPTIONS=detect_stack_use_after_return=0 %t
|
||||||
// Regression test for a CHECK failure with small stack size and large frame.
|
// 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
|
// RUN: (ulimit -s 65; not %t) 2>&1 | FileCheck %s
|
||||||
//
|
//
|
||||||
// Test that we can find UAR in a thread other than main:
|
// 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
|
// RUN: not %t 2>&1 | FileCheck --check-prefix=THREAD %s
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,6 @@
|
||||||
// Test that use-after-return works with exceptions.
|
// 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 <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,6 @@ set(ASAN_UNITTEST_INSTRUMENTED_CFLAGS
|
||||||
-mllvm -asan-globals=1
|
-mllvm -asan-globals=1
|
||||||
-mllvm -asan-mapping-scale=0 # default will be used
|
-mllvm -asan-mapping-scale=0 # default will be used
|
||||||
-mllvm -asan-mapping-offset-log=-1 # 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)
|
if(ASAN_TESTS_USE_ZERO_BASE_SHADOW)
|
||||||
list(APPEND ASAN_UNITTEST_INSTRUMENTED_CFLAGS
|
list(APPEND ASAN_UNITTEST_INSTRUMENTED_CFLAGS
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue