[compiler-rt] 63ddf0b - [TSan] Don't instrument code that is executed from __tsan_on_report()
Julian Lettner via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 21 17:02:57 PST 2021
Author: Julian Lettner
Date: 2021-12-21T17:02:51-08:00
New Revision: 63ddf0baf37edbfdf482853870238f9f88bfeb0b
URL: https://github.com/llvm/llvm-project/commit/63ddf0baf37edbfdf482853870238f9f88bfeb0b
DIFF: https://github.com/llvm/llvm-project/commit/63ddf0baf37edbfdf482853870238f9f88bfeb0b.diff
LOG: [TSan] Don't instrument code that is executed from __tsan_on_report()
See also: https://reviews.llvm.org/D111157
Added:
Modified:
compiler-rt/test/tsan/Darwin/main_tid.mm
compiler-rt/test/tsan/libdispatch/dispatch_once_deadlock.c
Removed:
################################################################################
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();
More information about the llvm-commits
mailing list