* exceptions.cc (sigpacket::process): Make sure that 'tls' is never NULL when
used.
This commit is contained in:
parent
27171a8cfa
commit
65ebf94e53
|
@ -1,3 +1,8 @@
|
||||||
|
2008-11-27 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
|
* exceptions.cc (sigpacket::process): Make sure that 'tls' is never
|
||||||
|
NULL when used.
|
||||||
|
|
||||||
2008-11-26 Christopher Faylor <me+cygwin@cgf.cx>
|
2008-11-26 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
Remove unneeded whitespace throughout.
|
Remove unneeded whitespace throughout.
|
||||||
|
@ -207,7 +212,7 @@
|
||||||
2008-10-06 Christopher Faylor <me+cygwin@cgf.cx>
|
2008-10-06 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* cygtls.h (_cygtls::initialized): Remove bogus stack check which would
|
* cygtls.h (_cygtls::initialized): Remove bogus stack check which would
|
||||||
when checking the current thread from the current thread.
|
crash when checking the current thread from the current thread.
|
||||||
* tlsoffsets.h: Regenerate.
|
* tlsoffsets.h: Regenerate.
|
||||||
|
|
||||||
2008-10-05 Christopher Faylor <me+cygwin@cgf.cx>
|
2008-10-05 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
|
@ -1191,20 +1191,22 @@ sigpacket::process ()
|
||||||
else
|
else
|
||||||
handler = NULL;
|
handler = NULL;
|
||||||
|
|
||||||
|
bool tls_was_null = !tls;
|
||||||
|
if (tls_was_null)
|
||||||
|
tls = _main_tls;
|
||||||
|
|
||||||
if (si.si_signo == SIGKILL)
|
if (si.si_signo == SIGKILL)
|
||||||
goto exit_sig;
|
goto exit_sig;
|
||||||
if (si.si_signo == SIGSTOP)
|
if (si.si_signo == SIGSTOP)
|
||||||
{
|
{
|
||||||
sig_clear (SIGCONT);
|
sig_clear (SIGCONT);
|
||||||
if (!tls)
|
|
||||||
tls = _main_tls;
|
|
||||||
goto stop;
|
goto stop;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool insigwait_mask;
|
bool insigwait_mask;
|
||||||
if ((masked = ISSTATE (myself, PID_STOPPED)))
|
if ((masked = ISSTATE (myself, PID_STOPPED)))
|
||||||
insigwait_mask = false;
|
insigwait_mask = false;
|
||||||
else if (!tls)
|
else if (tls_was_null)
|
||||||
insigwait_mask = !handler && (tls = _cygtls::find_tls (si.si_signo));
|
insigwait_mask = !handler && (tls = _cygtls::find_tls (si.si_signo));
|
||||||
else
|
else
|
||||||
insigwait_mask = sigismember (&tls->sigwait_mask, si.si_signo);
|
insigwait_mask = sigismember (&tls->sigwait_mask, si.si_signo);
|
||||||
|
@ -1216,12 +1218,9 @@ sigpacket::process ()
|
||||||
/* nothing to do */;
|
/* nothing to do */;
|
||||||
else if (sigismember (mask, si.si_signo))
|
else if (sigismember (mask, si.si_signo))
|
||||||
masked = true;
|
masked = true;
|
||||||
else if (tls)
|
else
|
||||||
masked = sigismember (&tls->sigmask, si.si_signo);
|
masked = sigismember (&tls->sigmask, si.si_signo);
|
||||||
|
|
||||||
if (!tls)
|
|
||||||
tls = _main_tls;
|
|
||||||
|
|
||||||
if (masked)
|
if (masked)
|
||||||
{
|
{
|
||||||
sigproc_printf ("signal %d blocked", si.si_signo);
|
sigproc_printf ("signal %d blocked", si.si_signo);
|
||||||
|
|
Loading…
Reference in New Issue