Cygwin: /proc/<PID>/status: avoid crash computing signal info
The code computing the mask of pending signals used the per-queued
signal TLS pointer without checking it for NULL. Fix this by using
the process-wide signal mask in that case.
Fixes: 195169186b
("Cygwin: wait_sig: allow to compute process-wide mask of pending signals")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
parent
1a9f95d894
commit
7c14e5a10a
|
@ -10,3 +10,6 @@ Bug Fixes
|
||||||
|
|
||||||
- Reinstantiate exporting _alloca.
|
- Reinstantiate exporting _alloca.
|
||||||
Addresses: https://cygwin.com/pipermail/cygwin/2023-January/252797.html
|
Addresses: https://cygwin.com/pipermail/cygwin/2023-January/252797.html
|
||||||
|
|
||||||
|
- Avoid hangs when reading /proc/<PID>/status.
|
||||||
|
Addresses: https://cygwin.com/pipermail/cygwin/2022-December/252756.html
|
||||||
|
|
|
@ -1375,7 +1375,8 @@ wait_sig (VOID *)
|
||||||
*pack.mask = 0;
|
*pack.mask = 0;
|
||||||
while ((q = q->next))
|
while ((q = q->next))
|
||||||
{
|
{
|
||||||
if (q->sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
|
_cygtls *sigtls = q->sigtls ?: _main_tls;
|
||||||
|
if (sigtls->sigmask & (bit = SIGTOMASK (q->si.si_signo)))
|
||||||
{
|
{
|
||||||
tl_entry = cygheap->find_tls (q->si.si_signo, issig_wait);
|
tl_entry = cygheap->find_tls (q->si.si_signo, issig_wait);
|
||||||
if (tl_entry)
|
if (tl_entry)
|
||||||
|
|
Loading…
Reference in New Issue