Skip to content

Commit fe6a1d3

Browse files
committed
Assert that _co_firsttraceable is a RESUME
1 parent 643a614 commit fe6a1d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5611,6 +5611,10 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
56115611
if (tstate->tracing == 0 &&
56125612
INSTR_OFFSET() >= frame->f_code->_co_firsttraceable
56135613
) {
5614+
assert(
5615+
_PyOpcode_Deopt[first_instr[frame->f_code->_co_firsttraceable]]
5616+
== RESUME
5617+
);
56145618
int instr_prev = _PyInterpreterFrame_LASTI(frame);
56155619
frame->prev_instr = next_instr;
56165620
TRACING_NEXTOPARG();

0 commit comments

Comments
 (0)