[compiler-rt] ff25f69 - [test] Don't rely on default of detect_stack_use_after_return

Vitaly Buka via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 22 19:10:45 PDT 2022


Author: Vitaly Buka
Date: 2022-04-22T19:10:30-07:00
New Revision: ff25f694731f7b9fa33f2955e751f3ccb3c35afa

URL: https://github.com/llvm/llvm-project/commit/ff25f694731f7b9fa33f2955e751f3ccb3c35afa
DIFF: https://github.com/llvm/llvm-project/commit/ff25f694731f7b9fa33f2955e751f3ccb3c35afa.diff

LOG: [test] Don't rely on default of detect_stack_use_after_return

Added: 
    

Modified: 
    compiler-rt/test/asan/TestCases/Posix/gc-test.cpp
    compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp
    compiler-rt/test/asan/TestCases/heavy_uar_test.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/asan/TestCases/Posix/gc-test.cpp b/compiler-rt/test/asan/TestCases/Posix/gc-test.cpp
index 8567630f36b35..56d8c398fc75b 100644
--- a/compiler-rt/test/asan/TestCases/Posix/gc-test.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/gc-test.cpp
@@ -1,11 +1,9 @@
 // RUN: %clangxx_asan %s -pthread -o %t
 // RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
 // RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
 // RUN: %clangxx_asan -O3 %s -pthread -o %t
 // RUN: %env_asan_opts=detect_stack_use_after_return=1 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
 // RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t 2>&1 | FileCheck %s --check-prefix=CHECK0
-// RUN: %run %t 2>&1 | FileCheck %s --check-prefix=CHECK1
 // REQUIRES: stable-runtime
 
 #include <assert.h>

diff  --git a/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp b/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp
index c252151159937..d13b6187a8c87 100644
--- a/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp
+++ b/compiler-rt/test/asan/TestCases/Posix/stack-use-after-return.cpp
@@ -2,7 +2,6 @@
 // RUN: %clangxx_asan  -O1 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan  -O2 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan  -O3 %s -pthread -o %t && %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: not %run %t 2>&1 | FileCheck %s
 // RUN: %env_asan_opts=detect_stack_use_after_return=0 %run %t
 // RUN: %clangxx_asan  -O0 %s -pthread -o %t -fsanitize-address-use-after-return=always && not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan  -O1 %s -pthread -o %t -fsanitize-address-use-after-return=always && not %run %t 2>&1 | FileCheck %s

diff  --git a/compiler-rt/test/asan/TestCases/heavy_uar_test.cpp b/compiler-rt/test/asan/TestCases/heavy_uar_test.cpp
index 571b25966ea9f..dffc8626189db 100644
--- a/compiler-rt/test/asan/TestCases/heavy_uar_test.cpp
+++ b/compiler-rt/test/asan/TestCases/heavy_uar_test.cpp
@@ -1,6 +1,4 @@
-// RUN: %clangxx_asan -O0 %s -o %t && not %run %t 2>&1 | FileCheck %s
 // RUN: %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
-// RUN: %clangxx_asan -O2 %s -o %t && not %run %t 2>&1 | FileCheck %s
 // RUN: %env_asan_opts=detect_stack_use_after_return=1 not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -O0 %s -o %t -fsanitize-address-use-after-return=always && not %run %t 2>&1 | FileCheck %s
 // RUN: %clangxx_asan -O2 %s -o %t -fsanitize-address-use-after-return=always && not %run %t 2>&1 | FileCheck %s


        


More information about the llvm-commits mailing list