From: Ivan Maidanski Date: Fri, 28 Oct 2016 07:07:43 +0000 (+0300) Subject: Fix 'address of fudged_set is used out of scope' code defect (sigmask) X-Git-Tag: v8.0.0~1061 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=65347c05120cc72eb8a34a67b940d817372743ae;p=platform%2Fupstream%2Flibgc.git Fix 'address of fudged_set is used out of scope' code defect (sigmask) (fix commit 81d04a6) * pthread_support.c [!GC_NO_PTHREAD_SIGMASK] (pthread_sigmask): Move fudged_set to the outer scope where REAL_FUNC(pthread_sigmask) is called (a pointer to fudged_set could be passed to the latter function). --- diff --git a/pthread_support.c b/pthread_support.c index 1b6a302..86e6c44 100644 --- a/pthread_support.c +++ b/pthread_support.c @@ -1243,11 +1243,13 @@ GC_INNER void GC_init_parallel(void) GC_API int WRAP_FUNC(pthread_sigmask)(int how, const sigset_t *set, sigset_t *oset) { + sigset_t fudged_set; + INIT_REAL_SYMS(); if (set != NULL && (how == SIG_BLOCK || how == SIG_SETMASK)) { - sigset_t fudged_set = *set; int sig_suspend = GC_get_suspend_signal(); + fudged_set = *set; GC_ASSERT(sig_suspend >= 0); if (sigdelset(&fudged_set, sig_suspend) != 0) ABORT("sigdelset failed");