diff --git a/compiler-rt/test/tsan/Darwin/debug_external.cpp b/compiler-rt/test/tsan/Darwin/debug_external.cpp --- a/compiler-rt/test/tsan/Darwin/debug_external.cpp +++ b/compiler-rt/test/tsan/Darwin/debug_external.cpp @@ -42,7 +42,8 @@ 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 --- a/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp +++ b/compiler-rt/test/tsan/Darwin/external-swift-debugging.cpp @@ -45,8 +45,8 @@ 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,