[3.14] gh-140104: Set next_instr properly in the JIT during exceptions (GH-140233) (GH-141495)

This commit is contained in:
Mikhail Efimov
2025-11-13 21:47:25 +03:00
committed by GitHub
parent c5e0ce73f9
commit af20b880fc
3 changed files with 29 additions and 2 deletions
+6 -2
View File
@@ -376,7 +376,9 @@ do { \
frame = tstate->current_frame; \
stack_pointer = _PyFrame_GetStackPointer(frame); \
if (next_instr == NULL) { \
next_instr = frame->instr_ptr; \
/* gh-140104: The exception handler expects frame->instr_ptr
to after this_instr, not this_instr! */ \
next_instr = frame->instr_ptr + 1; \
JUMP_TO_LABEL(error); \
} \
DISPATCH(); \
@@ -404,7 +406,9 @@ do { \
stack_pointer = _PyFrame_GetStackPointer(frame); \
if (next_instr == NULL) \
{ \
next_instr = frame->instr_ptr; \
/* gh-140104: The exception handler expects frame->instr_ptr
to after this_instr, not this_instr! */ \
next_instr = frame->instr_ptr + 1; \
goto error; \
} \
DISPATCH(); \