diff --git a/sys/i386/i386/exec_machdep.c b/sys/i386/i386/exec_machdep.c index 29c06ff86ca8..45921193ec94 100644 --- a/sys/i386/i386/exec_machdep.c +++ b/sys/i386/i386/exec_machdep.c @@ -640,6 +640,7 @@ osigreturn(struct thread *td, struct osigreturn_args *uap) regs->tf_esp = scp->sc_sp; regs->tf_eip = scp->sc_pc; regs->tf_eflags = eflags; + regs->tf_trapno = T_RESERVED; #if defined(COMPAT_43) if (scp->sc_onstack & 1) @@ -739,6 +740,7 @@ freebsd4_sigreturn(struct thread *td, struct freebsd4_sigreturn_args *uap) bcopy(&ucp->uc_mcontext.mc_fs, regs, sizeof(*regs)); } + regs->tf_trapno = T_RESERVED; #if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1) @@ -873,6 +875,7 @@ sys_sigreturn(struct thread *td, struct sigreturn_args *uap) return (ret); bcopy(&ucp->uc_mcontext.mc_fs, regs, sizeof(*regs)); } + regs->tf_trapno = T_RESERVED; #if defined(COMPAT_43) if (ucp->uc_mcontext.mc_onstack & 1)