Set mc_len to sizeof(mcontext_t), otherwise it is an invalid context.

This commit is contained in:
davidxu 2003-07-26 12:58:28 +00:00
parent b3a9102865
commit 3b4f70048c

View File

@ -79,6 +79,7 @@ __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func)
ucp->uc_link = sig_uc;
sigdelset(&ucp->uc_sigmask, sig);
ucp->uc_mcontext.mc_len = sizeof(mcontext_t);
ucp->uc_mcontext.mc_rdi = (register_t)ucp;
ucp->uc_mcontext.mc_rsi = (register_t)func;
ucp->uc_mcontext.mc_rdx = (register_t)args;