diff --git a/compiler-rt/test/tsan/Darwin/debug_external.cpp b/compiler-rt/test/tsan/Darwin/debug_external.cpp index 2418a271b23c..399663c1fb0d 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 603734e5d035..72335edf1789 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,