diff --git a/compiler-rt/test/tsan/Darwin/main_tid.mm b/compiler-rt/test/tsan/Darwin/main_tid.mm index 6dea58e53326..886880edeb2f 100644 --- a/compiler-rt/test/tsan/Darwin/main_tid.mm +++ b/compiler-rt/test/tsan/Darwin/main_tid.mm @@ -13,6 +13,7 @@ int __tsan_get_report_thread(void *report, unsigned long idx, int *tid, unsigned long trace_size); } +__attribute__((disable_sanitizer_instrumentation)) void __tsan_on_report(void *report) { fprintf(stderr, "__tsan_on_report(%p)\n", report); diff --git a/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c b/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c index 9c7c47e9235b..8139605c753c 100644 --- a/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c +++ b/compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c @@ -10,6 +10,8 @@ long g = 0; long h = 0; + +__attribute__((disable_sanitizer_instrumentation)) void f() { static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ @@ -18,6 +20,7 @@ void f() { h++; } +__attribute__((disable_sanitizer_instrumentation)) void __tsan_on_report() { fprintf(stderr, "Report.\n"); f();