[compiler-rt] e69d50d - tsan: disable instrumentation in runtime callbacks in tests

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 22 06:48:34 PST 2021


Author: Dmitry Vyukov
Date: 2021-11-22T15:48:29+01:00
New Revision: e69d50d9ff3e2608c2153c8e54b5044e05a0c34d

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

LOG: tsan: disable instrumentation in runtime callbacks in tests

All runtime callbacks must be non-instrumented with the new tsan runtime
(it's now more picky with respect to recursion into runtime).
Disable instrumentation in Darwin tests as we do in all other tests now.

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

Added: 
    

Modified: 
    compiler-rt/test/tsan/Darwin/debug_external.cpp
    compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/test/tsan/Darwin/debug_external.cpp b/compiler-rt/test/tsan/Darwin/debug_external.cpp
index 2418a271b23c9..399663c1fb0d7 100644
--- a/compiler-rt/test/tsan/Darwin/debug_external.cpp
+++ b/compiler-rt/test/tsan/Darwin/debug_external.cpp
@@ -42,7 +42,8 @@ int main() {
   return 0;
 }
 
-void __tsan_on_report(void *report) {
+__attribute__((disable_sanitizer_instrumentation)) void
+__tsan_on_report(void *report) {
   const char *type;
   void *addr;
   void *start;

diff  --git a/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp b/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp
index 603734e5d0355..72335edf17896 100644
--- a/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp
+++ b/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp
@@ -45,8 +45,8 @@ int main(int argc, char *argv[]) {
   fprintf(stderr, "Done.\n");
 }
 
-extern "C"
-void __tsan_on_report(void *report) {
+extern "C" __attribute__((disable_sanitizer_instrumentation)) void
+__tsan_on_report(void *report) {
   const char *description;
   int count;
   int stack_count, mop_count, loc_count, mutex_count, thread_count,


        


More information about the llvm-commits mailing list