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

This commit is contained in:
David Xu 2003-07-26 12:58:28 +00:00
parent 4a52a070f8
commit 4160fed551

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;