]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
pthread_kill would incorrectly deliver a signal to a thread even if
authorJulian Seward <jseward@acm.org>
Wed, 18 Sep 2002 13:52:36 +0000 (13:52 +0000)
committerJulian Seward <jseward@acm.org>
Wed, 18 Sep 2002 13:52:36 +0000 (13:52 +0000)
the thread currently had the signal blocked.  Fixed.  It _may_ also
fix some assertion failures in scheduler_sanity() in vg_scheduler.c.

MERGE TO ERASER

git-svn-id: svn://svn.valgrind.org/valgrind/branches/VALGRIND_1_0_BRANCH@1072

vg_signals.c

index 24448d44279145a631bf2e268fd59ad657196311..27a4871e4f4b67b11edbc4f13110a3c4a3884454 100644 (file)
@@ -1194,7 +1194,11 @@ Bool VG_(deliver_signals) ( void )
             vg_dcss.dcss_sigpending[sigNo] = False;
             vg_dcss.dcss_destthread[sigNo] = VG_INVALID_THREADID;
             continue; /* for (sigNo = 1; ...) loop */
-        }
+        } else if (VG_(ksigismember)(&(tst->sig_mask), sigNo)) {
+            /* signal blocked in specific thread, so we can't
+               deliver it just now */
+            continue; /* for (sigNo = 1; ...) loop */
+         }
       } else {
          /* not directed to a specific thread, so search for a
             suitable candidate */