diff --git a/sys/platform/pc32/i386/trap.c b/sys/platform/pc32/i386/trap.c index e9b125d..3928caf 100644 --- a/sys/platform/pc32/i386/trap.c +++ b/sys/platform/pc32/i386/trap.c @@ -240,6 +240,8 @@ userret(struct lwp *lp, struct trapframe *frame, int sticks) void (*hook)(void); int sig; + KKASSERT(lp->lwp_thread->td_toks_stop == + &lp->lwp_thread->td_toks_array[0]); if (p->p_userret != NULL) { hook = p->p_userret; p->p_userret = NULL;