next_instr = _Py_jit_entry((EXECUTOR), frame, stack_pointer, tstate); \
frame = tstate->current_frame; \
stack_pointer = _PyFrame_GetStackPointer(frame); \
+ int keep_tracing_bit = (uintptr_t)next_instr & 1; \
+ next_instr = (_Py_CODEUNIT *)(((uintptr_t)next_instr) & (~1)); \
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); \
} \
+ if (keep_tracing_bit) { \
+ assert(next_instr->op.code != ENTER_EXECUTOR); \
+ assert(tstate->interp->jit_state.code_curr_size == 2); \
+ ENTER_TRACING(); \
+ DISPATCH_NON_TRACING(); \
+ } \
DISPATCH(); \
} while (0)