diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 31b429ba1..01bb3eb68 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2015-06-30 Corinna Vinschen + + * signal.cc (sigaltstack): Add comment. + 2015-06-27 Corinna Vinschen * exceptions.cc (_cygtls::call_signal_handler): Drop manipulating diff --git a/winsup/cygwin/signal.cc b/winsup/cygwin/signal.cc index 467c919c3..2b9cfda3e 100644 --- a/winsup/cygwin/signal.cc +++ b/winsup/cygwin/signal.cc @@ -670,6 +670,10 @@ sigaltstack (const stack_t *ss, stack_t *oss) { char stack_marker; memcpy (oss, &me.altstack, sizeof *oss); + /* Check if the current stack is the alternate signal stack. If so, + set ss_flags accordingly. We do this here rather than setting + ss_flags in _cygtls::call_signal_handler since the signal handler + calls longjmp, so we never return to reset the flag. */ if (!me.altstack.ss_flags && me.altstack.ss_sp) { if (&stack_marker >= (char *) me.altstack.ss_sp