Corinna Vinschen via Cygwin wrote:
On Mar 6 13:24, Christian Franke via Cygwin wrote:
Found because 'stress-ng --context 1 ...' always hangs.
The attached testcase uses the example from Linux swapcontext(3) to call the
context functions.
Just tested with 3.5.3 and it doesn't work there, either.
So yeah, it's a bug, but it's not a 3.6 regression and of minor
importance. We can look into that for 3.7.
This is possibly a regression introduced in 3.0.6. A comparison of
strace outputs of signal handling before and after the swapcontext()
calls reveals that 'incyg' is incorrectly set after swapcontext(). A
revert of
https://cygwin.com/git/?p=newlib-cygwin.git;a=commit;h=c5f9eed1
fixes both the testcase and 'stress-ng --context ...'.
No patch provided because I'm not sure how to handle the (at least) two
other use cases of setcontext() correctly:
- the call from _cygtls::call_signal_handler(), and
- a call from a signal handler.
--
Regards,
Christian
--
Problem reports: https://cygwin.com/problems.html
FAQ: https://cygwin.com/faq/
Documentation: https://cygwin.com/docs.html
Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple