[PATCH] D15381: [tsan] Add a DCHECK to verify __tsan_read* and __tsan_write function aren't called from ScopedInterceptor
Kuba Brecka via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 16 03:06:25 PST 2015
kubabrecka added a comment.
This currently fails several GCD tests (fix is in http://reviews.llvm.org/D15419), plus the sigsuspend.cc test. This fails because a signal handler (`do_nothing_signal_handler`) is called via this backtrace:
frame #0: __sanitizer::CheckFailed "((thr->in_interceptor_count)) == ((0))" at sanitizer_common.cc:158
frame #1:__tsan_write1(addr=0x0000000100001080) + 146 at tsan_interface_inl.h:39
frame #2: sigsuspend.cc.tmp`::do_nothing_signal_handler() + 47 at sigsuspend.cc:17 [opt]
frame #3: libsystem_platform.dylib`_sigtramp + 26
frame #4: libsystem_kernel.dylib`__sigsuspend + 11
frame #5: wrap_sigsuspend(mask=0x00007fff5fbff9cc) + 142 at tsan_interceptors.cc:2104
frame #6: sigsuspend.cc.tmp`main + 157 at sigsuspend.cc:35 [opt]
...and the `wrap_sigsuspend` interceptor calls `REAL(sigsuspend)` while `ScopedInterceptor` is still in scope:
TSAN_INTERCEPTOR(int, sigsuspend, const __sanitizer_sigset_t *mask) {
SCOPED_TSAN_INTERCEPTOR(sigsuspend, mask);
return REAL(sigsuspend)(mask);
}
http://reviews.llvm.org/D15381
More information about the llvm-commits
mailing list