Avoid to touch red zone, in libpthread, ucontext may be saved by kernel's
get_mcontext, and libpthread will use signalcontext to deliver signal in userland, it looks same as kernel's send_sig does. Reviewed by: deischen, tjr
This commit is contained in:
parent
da8f1aa53d
commit
2ff285bf2e
@ -58,7 +58,7 @@ __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func)
|
||||
* This means that we need an 8-byte-odd alignment since the ABI expects
|
||||
* the return address to be pushed, thus breaking the 16 byte alignment.
|
||||
*/
|
||||
sp = (ucp->uc_mcontext.mc_rsp - sizeof(ucontext_t)) & ~15UL;
|
||||
sp = (ucp->uc_mcontext.mc_rsp - 128 - sizeof(ucontext_t)) & ~15UL;
|
||||
sig_uc = (ucontext_t *)sp;
|
||||
bcopy(ucp, sig_uc, sizeof(*sig_uc));
|
||||
sp = (sp - sizeof(siginfo_t)) & ~15UL;
|
||||
|
Loading…
Reference in New Issue
Block a user