mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-08 18:19:08 +08:00
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: 195169186bfd5 ("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
8fe5b333b3
commit
a4584410fc
@ -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
|
||||||
|
@ -1382,7 +1382,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…
x
Reference in New Issue
Block a user