diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2020-05-29 06:12:17 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2020-05-29 06:12:17 -0700 |
commit | 64ba99161ac55d77b09a72a0a64f2333ab7f0ffb (patch) | |
tree | 1a88d6554cbd9185856eef986ffde7c35bdca7a1 /args.h | |
parent | 69fd1c3054df29be26299b4b23bac29e2c2bceb5 (diff) | |
download | txr-64ba99161ac55d77b09a72a0a64f2333ab7f0ffb.tar.gz txr-64ba99161ac55d77b09a72a0a64f2333ab7f0ffb.tar.bz2 txr-64ba99161ac55d77b09a72a0a64f2333ab7f0ffb.zip |
signal: bugfix: sharing of alt stack.
The alternative stack is shared by SIGSEGV and SIGBUS.
Therefore, we cannot tear it down when disabling either
signal; the other may be using it.
* signal.c (stack_refcount): New static variable.
(setup_alt_stack, teardown_alt_stack): Functions removed.
(addref_alt_stack, release_alt_stack): New functions to manage
stack with reference counting.
(set_sig_handler): Rearrange the code to only call addref_alt_stack
when transitioning from no-handler to handler for SIGSEGV and
SIGBUS and to only call release_alt_stack when transitioning
from handler to no-handler for these signals.
Diffstat (limited to 'args.h')
0 files changed, 0 insertions, 0 deletions