]> granicus.if.org Git - gc/commitdiff
Fix unchecked sigdelset() result in pthread_support
authorIvan Maidanski <ivmai@mail.ru>
Mon, 29 Feb 2016 21:13:57 +0000 (00:13 +0300)
committerIvan Maidanski <ivmai@mail.ru>
Fri, 11 Mar 2016 21:06:53 +0000 (00:06 +0300)
* pthread_support.c (GC_pthread_sigmask): Abort in case of sigdelset
failure.

pthread_support.c

index 75c9b2b70a15862a44fcec0579ae278514433d44..b7f0ad52fb73b13a9dce269d94986ce640c3b108 100644 (file)
@@ -1178,7 +1178,8 @@ GC_INNER void GC_init_parallel(void)
         fudged_set = *set;
         sig_suspend = GC_get_suspend_signal();
         GC_ASSERT(sig_suspend >= 0);
-        sigdelset(&fudged_set, sig_suspend);
+        if (sigdelset(&fudged_set, sig_suspend) != 0)
+            ABORT("sigdelset failed");
         set = &fudged_set;
     }
     return(REAL_FUNC(pthread_sigmask)(how, set, oset));