diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2025-03-12 17:17:31 +0100 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2025-03-12 17:20:49 +0100 |
commit | a942476236b5e39bf30c533d08df7392e326a4c6 (patch) | |
tree | 57513188aeca1b138d3796f3dac829963769d160 /libgloss | |
parent | bc026427bd5408999e73ff61ca2b91a343176864 (diff) | |
download | newlib-main.zip newlib-main.tar.gz newlib-main.tar.bz2 |
Cygwin: sigdelayed: pop return address from signal stack earlierHEADgithub/mastergithub/mainmastermain
When a signal handler is called via sigdelayed, sigdelayed pops
the original address to return to from the signal stack. It only
does so after the signal handler has been called and returned.
If the signal handler never returns, for instance because it calls
longjmp or setcontext, the address stays on the signal stack and
the stack loses one slot. Given the stack has a depth of 256 entries,
no signal handler will be called after 256 signal handlers long
jumping out.
Pop the return address from the signal stack prior to calling the
signal handler and store it in a callee-saved register. This avoids
filling up the signal stack in a scenario like this.
Addresses: https://cygwin.com/pipermail/cygwin/2025-March/257648.html
Fixes: 61522196c715 ("* Merge in cygwin-64bit-branch.")
Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
Diffstat (limited to 'libgloss')
0 files changed, 0 insertions, 0 deletions