diff --git a/compiler-rt/test/tsan/Linux/double_race.cpp b/compiler-rt/test/tsan/Linux/double_race.cpp --- a/compiler-rt/test/tsan/Linux/double_race.cpp +++ b/compiler-rt/test/tsan/Linux/double_race.cpp @@ -8,17 +8,17 @@ long long buf[2]; volatile int nreport; -void __sanitizer_report_error_summary(const char *summary) { +__attribute__((disable_sanitizer_instrumentation)) void +__sanitizer_report_error_summary(const char *summary) { nreport++; } const int kEventPCBits = 61; -extern "C" bool __tsan_symbolize_external(unsigned long pc, char *func_buf, - unsigned long func_siz, - char *file_buf, - unsigned long file_siz, int *line, - int *col) { +extern "C" __attribute__((disable_sanitizer_instrumentation)) bool +__tsan_symbolize_external(unsigned long pc, char *func_buf, + unsigned long func_siz, char *file_buf, + unsigned long file_siz, int *line, int *col) { if (pc >> kEventPCBits) { printf("bad PC passed to __tsan_symbolize_external: %lx\n", pc); _exit(1); @@ -47,6 +47,5 @@ // CHECK: #0 memset // CHECK: #{{[12]}} Thread // CHECK-NOT: bad PC passed to __tsan_symbolize_external -// CHECK: WARNING: ThreadSanitizer: data race -// CHECK: Write of size 8 at {{.*}} by thread T1: -// CHECK: #0 Thread +// CHECK-NOT: __sanitizer_report_error_summary +// CHECK-NOT: WARNING: ThreadSanitizer: data race diff --git a/compiler-rt/test/tsan/debugging.cpp b/compiler-rt/test/tsan/debugging.cpp --- a/compiler-rt/test/tsan/debugging.cpp +++ b/compiler-rt/test/tsan/debugging.cpp @@ -46,7 +46,8 @@ fprintf(stderr, "Done.\n"); } -void __tsan_on_report(void *report) { +__attribute__((disable_sanitizer_instrumentation)) void +__tsan_on_report(void *report) { fprintf(stderr, "__tsan_on_report(%p)\n", report); fprintf(stderr, "__tsan_get_current_report() = %p\n", __tsan_get_current_report()); diff --git a/compiler-rt/test/tsan/java_symbolization.cpp b/compiler-rt/test/tsan/java_symbolization.cpp --- a/compiler-rt/test/tsan/java_symbolization.cpp +++ b/compiler-rt/test/tsan/java_symbolization.cpp @@ -2,9 +2,11 @@ #include "java.h" #include -extern "C" void __tsan_symbolize_external_ex( - jptr pc, void (*add_frame)(void *, const char *, const char *, int, int), - void *ctx) { +extern "C" __attribute__((disable_sanitizer_instrumentation)) void +__tsan_symbolize_external_ex(jptr pc, + void (*add_frame)(void *, const char *, + const char *, int, int), + void *ctx) { if (pc == (1234 | kExternalPCBit)) { add_frame(ctx, "MyInnerFunc", "MyInnerFile.java", 1234, 56); add_frame(ctx, "MyOuterFunc", "MyOuterFile.java", 4321, 65); diff --git a/compiler-rt/test/tsan/java_symbolization_legacy.cpp b/compiler-rt/test/tsan/java_symbolization_legacy.cpp --- a/compiler-rt/test/tsan/java_symbolization_legacy.cpp +++ b/compiler-rt/test/tsan/java_symbolization_legacy.cpp @@ -2,10 +2,9 @@ #include "java.h" #include -extern "C" bool __tsan_symbolize_external(jptr pc, - char *func_buf, jptr func_siz, - char *file_buf, jptr file_siz, - int *line, int *col) { +extern "C" __attribute__((disable_sanitizer_instrumentation)) bool +__tsan_symbolize_external(jptr pc, char *func_buf, jptr func_siz, + char *file_buf, jptr file_siz, int *line, int *col) { if (pc == (1234 | kExternalPCBit)) { memcpy(func_buf, "MyFunc", sizeof("MyFunc")); memcpy(file_buf, "MyFile.java", sizeof("MyFile.java"));