55a1911ef2
check_deferred_signal() returns twice, since handle_signal() emulates the return from the normal signal handler by sigreturn(2)ing the passed context. Second return is performed on the destroyed stack frame, because __fillcontextx() has already returned. This causes undefined and bad behaviour, usually the victim thread gets SIGSEGV. Avoid nested frame and the need to return from it by doing direct call to getcontext() in the check_deferred_signal() and using a new private libc helper __fillcontextx2() to complement the context with the extended CPU state if the deferred signal is still present. The __fillcontextx() is now unused, but is kept to allow older libthr.so to be used with the new libc. Mark __fillcontextx() as returning twice [1]. Reported by: pgj Pointy hat to: kib Discussed with: dim Tested by: pgj, dim Suggested by: jilles [1] MFC after: 1 week |
||
---|---|---|
.. | ||
_ctx_start.S | ||
_set_tp.c | ||
_setjmp.S | ||
assym.s | ||
fabs.S | ||
fixunsdfsi.S | ||
flt_rounds.c | ||
fpgetmask.c | ||
fpgetround.c | ||
fpgetsticky.c | ||
fpsetmask.c | ||
fpsetround.c | ||
getcontextx.c | ||
infinity.c | ||
makecontext.c | ||
Makefile.inc | ||
setjmp.S | ||
signalcontext.c | ||
sigsetjmp.S |