diff options
Diffstat (limited to 'lib/libthr/thread')
-rw-r--r-- | lib/libthr/thread/thr_sig.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/libthr/thread/thr_sig.c b/lib/libthr/thread/thr_sig.c index 86b3a9b..4dbb252 100644 --- a/lib/libthr/thread/thr_sig.c +++ b/lib/libthr/thread/thr_sig.c @@ -323,8 +323,13 @@ check_deferred_signal(struct pthread *curthread) return; #if defined(__amd64__) || defined(__i386__) - uc = alloca(__getcontextx_size()); - __fillcontextx((char *)uc); + int uc_len; + uc_len = __getcontextx_size(); + uc = alloca(uc_len); + getcontext(uc); + if (curthread->deferred_siginfo.si_signo == 0) + return; + __fillcontextx2((char *)uc); #else ucontext_t ucv; uc = &ucv; |