[compiler-rt] d5c34ee - [TSan] Build ignore_lib{0,1,5} tests with -fno-builtin

Ilya Leoshkevich via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 15 03:19:19 PDT 2021


Author: Ilya Leoshkevich
Date: 2021-07-15T12:18:47+02:00
New Revision: d5c34ee5b666e12f92cf5b6e35490e1746fcc5e9

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

LOG: [TSan] Build ignore_lib{0,1,5} tests with -fno-builtin

These tests depend on TSan seeing the intercepted memcpy(), so they
break when the compiler chooses the builtin version.

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D105629

Added: 
    

Modified: 
    compiler-rt/test/tsan/ignore_lib0.cpp
    compiler-rt/test/tsan/ignore_lib1.cpp
    compiler-rt/test/tsan/ignore_lib5.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/ignore_lib0.cpp b/compiler-rt/test/tsan/ignore_lib0.cpp
index 1d375336b1c0..d6d6acdbc370 100644
--- a/compiler-rt/test/tsan/ignore_lib0.cpp
+++ b/compiler-rt/test/tsan/ignore_lib0.cpp
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t-dir
 // RUN: mkdir %t-dir
 
-// RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib0.so
+// RUN: %clangxx_tsan -O1 -fno-builtin %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib0.so
 // RUN: %clangxx_tsan -O1 %s -L%t-dir -lignore_lib0 %link_libcxx_tsan -o %t
 // RUN: echo running w/o suppressions:
 // RUN: env LD_LIBRARY_PATH=%t-dir${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH} %deflake %run %t | FileCheck %s --check-prefix=CHECK-NOSUPP

diff  --git a/compiler-rt/test/tsan/ignore_lib1.cpp b/compiler-rt/test/tsan/ignore_lib1.cpp
index 2a708eaab401..01139519e491 100644
--- a/compiler-rt/test/tsan/ignore_lib1.cpp
+++ b/compiler-rt/test/tsan/ignore_lib1.cpp
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t-dir
 // RUN: mkdir %t-dir
 
-// RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so
+// RUN: %clangxx_tsan -O1 -fno-builtin %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so
 // RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable
 // RUN: echo running w/o suppressions:
 // RUN: %deflake %run %t-dir/executable | FileCheck %s --check-prefix=CHECK-NOSUPP

diff  --git a/compiler-rt/test/tsan/ignore_lib5.cpp b/compiler-rt/test/tsan/ignore_lib5.cpp
index 81a1840c9551..a71d560ab913 100644
--- a/compiler-rt/test/tsan/ignore_lib5.cpp
+++ b/compiler-rt/test/tsan/ignore_lib5.cpp
@@ -1,7 +1,7 @@
 // RUN: rm -rf %t-dir
 // RUN: mkdir %t-dir
 
-// RUN: %clangxx_tsan -O1 %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so
+// RUN: %clangxx_tsan -O1 -fno-builtin %s -DLIB -fPIC -fno-sanitize=thread -shared -o %t-dir/libignore_lib1.so
 // RUN: %clangxx_tsan -O1 %s %link_libcxx_tsan -o %t-dir/executable
 // RUN: echo running w/o suppressions:
 // RUN: %deflake %run %t-dir/executable | FileCheck %s --check-prefix=CHECK-NOSUPP


        


More information about the llvm-commits mailing list