[TSan] Don't instrument code that is executed from __tsan_on_report()
See also: https://reviews.llvm.org/D111157
This commit is contained in:
parent
b9f6e09b85
commit
63ddf0baf3
|
@ -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);
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue