[llvm-commits] [compiler-rt] r168421 - /compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc

Dmitry Vyukov dvyukov at google.com
Wed Nov 21 03:12:33 PST 2012


Author: dvyukov
Date: Wed Nov 21 05:12:33 2012
New Revision: 168421

URL: http://llvm.org/viewvc/llvm-project?rev=168421&view=rev
Log:
tsan: fix handling of signals 
(do not execute synchronous signals in recursive interceptors)


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=168421&r1=168420&r2=168421&view=diff
==============================================================================
--- compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc (original)
+++ compiler-rt/trunk/lib/tsan/rtl/tsan_interceptors.cc Wed Nov 21 05:12:33 2012
@@ -1228,8 +1228,10 @@
       sig == SIGABRT || sig == SIGFPE || sig == SIGPIPE ||
       // If we are sending signal to ourselves, we must process it now.
       (sctx && sig == sctx->int_signal_send) ||
-      // If we are in blocking function, we can safely process it now.
-      (sctx && sctx->in_blocking_func)) {
+      // 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)) {
     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