From: Dmitry Vyukov Date: Thu, 22 Nov 2012 13:53:54 +0000 (+0000) Subject: tsan: fix more bugs in signal handling X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=6971414f3ebdc2a415c2582f69b5fe95c41aad32;p=platform%2Fupstream%2Fllvm.git tsan: fix more bugs in signal handling llvm-svn: 168497 --- diff --git a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc index 35aacdc..8be58d4 100644 --- a/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc +++ b/compiler-rt/lib/tsan/rtl/tsan_interceptors.cc @@ -165,13 +165,11 @@ ScopedInterceptor::~ScopedInterceptor() { 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 @@ static void ALWAYS_INLINE rtl_generic_sighandler(bool sigact, int sig, // 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;