Skip to content

Commit

Permalink
Reset next_instr_offset on error path (just to be sure)
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Oct 21, 2023
1 parent 868e73b commit d3db1e0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions Python/executor.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ _PyUopExecute(_PyExecutorObject *executor, _PyInterpreterFrame *frame, PyObject
// The caller recovers the frame from tstate->current_frame.
DPRINTF(2, "Error: [Opcode %d, operand %" PRIu64 "]\n", opcode, operand);
OPT_HIST(trace_uop_execution_counter, trace_run_length_hist);
frame->next_instr_offset = 0; // Don't leave this random
_PyFrame_SetStackPointer(frame, stack_pointer);
Py_DECREF(self);
return NULL;
Expand Down

0 comments on commit d3db1e0

Please sign in to comment.