diff --git a/Python/ceval.c b/Python/ceval.c index 034166911ec7ca4..1df7f82f4084dc3 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -718,6 +718,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int /* Because this avoids the RESUME, * we need to update instrumentation */ _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp); + assert (frame->instr_ptr == frame->prev_instr + 1); monitor_throw(tstate, frame, frame->prev_instr); /* TO DO -- Monitor throw entry. */ goto resume_with_error; @@ -733,7 +734,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int #define SET_LOCALS_FROM_FRAME() \ /* Jump back to the last instruction executed... */ \ assert (frame->instr_ptr == frame->prev_instr + 1); \ - next_instr = frame->prev_instr + 1; \ + next_instr = frame->instr_ptr; \ stack_pointer = _PyFrame_GetStackPointer(frame); start_frame: