diff --git a/lib/libc/i386/gen/signalcontext.c b/lib/libc/i386/gen/signalcontext.c index 28bcfeceb0a6..877b6556a3f2 100644 --- a/lib/libc/i386/gen/signalcontext.c +++ b/lib/libc/i386/gen/signalcontext.c @@ -69,7 +69,7 @@ __signalcontext(ucontext_t *ucp, int sig, __sighandler_t *func) /* * Set up ucontext_t. */ - ucp->uc_mcontext.mc_ebp = ucp->uc_mcontext.mc_esp - sizeof(int); + ucp->uc_mcontext.mc_esi = ucp->uc_mcontext.mc_esp - sizeof(int); ucp->uc_mcontext.mc_esp = (register_t)(intptr_t)p; ucp->uc_mcontext.mc_eip = (register_t)(intptr_t)_ctx_start; ucp->uc_mcontext.mc_eflags &= ~PSL_T;