[llvm-commits] [compiler-rt] r168497 - /compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Dmitry Vyukov
dvyukov at google.com
Thu Nov 22 05:53:55 PST 2012
Author: dvyukov
Date: Thu Nov 22 07:53:54 2012
New Revision: 168497
URL: http://llvm.org/viewvc/llvm-project?rev=168497&view=rev
Log:
tsan: fix more bugs in signal handling
Modified:
compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
Modified: compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc?rev=168497&r1=168496&r2=168497&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Thu Nov 22 07:53:54 2012
@@ -165,13 +165,11 @@
struct BlockingCall {
explicit BlockingCall(ThreadState *thr)
: ctx(SigCtx(thr)) {
- CHECK_EQ(ctx->in_blocking_func, 0);
ctx->in_blocking_func++;
}
~BlockingCall() {
ctx->in_blocking_func--;
- CHECK_EQ(ctx->in_blocking_func, 0);
}
SignalContext *ctx;
@@ -1231,7 +1229,7 @@
// If we are in blocking function, we can safely process it now
// (but check if we are in a recursive interceptor,
// i.e. pthread_join()->munmap()).
- (sctx && sctx->in_blocking_func && thr->in_rtl == 1)) {
+ (sctx && sctx->in_blocking_func == 1 && thr->in_rtl == 1)) {
CHECK(thr->in_rtl == 0 || thr->in_rtl == 1);
int in_rtl = thr->in_rtl;
thr->in_rtl = 0;
More information about the llvm-commits
mailing list