Skip to content

Commit cee2887

Browse files
committed
Let's try Brandt's patch
1 parent 968d0ba commit cee2887

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

Python/ceval.c

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5683,16 +5683,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
56835683
err = maybe_call_line_trace(tstate->c_tracefunc,
56845684
tstate->c_traceobj,
56855685
tstate, frame, instr_prev);
5686+
stack_pointer = _PyFrame_GetStackPointer(frame);
5687+
frame->stacktop = -1;
56865688
if (err) {
56875689
/* trace function raised an exception */
56885690
next_instr++;
56895691
goto error;
56905692
}
56915693
/* Reload possibly changed frame fields */
56925694
next_instr = frame->prev_instr;
5693-
5694-
stack_pointer = _PyFrame_GetStackPointer(frame);
5695-
frame->stacktop = -1;
56965695
}
56975696
}
56985697
}
@@ -5795,11 +5794,6 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
57955794

57965795
/* Pop remaining stack entries. */
57975796
PyObject **stackbase = _PyFrame_Stackbase(frame);
5798-
if (frame->stacktop != -1) {
5799-
// frame_setlineno() may have popped off additional stacks in
5800-
// frame_stack_pop(). Re-calculate stack pointer.
5801-
stack_pointer = _PyFrame_GetStackPointer(frame);
5802-
}
58035797
while (stack_pointer > stackbase) {
58045798
PyObject *o = POP();
58055799
Py_XDECREF(o);

0 commit comments

Comments
 (0)