From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Mon, 27 Oct 2025 18:30:18 +0000 (+0000) Subject: merge from upstream X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8adaf4dc6ae5ee519c2adf184d8548670e454a1b;p=thirdparty%2FPython%2Fcpython.git merge from upstream --- diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 0fad05e9c183..971660ace56a 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -5392,10 +5392,7 @@ dummy_func( tier2 op(_ERROR_POP_N, (target/2 --)) { assert(oparg == 0); - _Py_CODEUNIT *current_instr = _PyFrame_GetBytecode(frame) + target; - _Py_CODEUNIT *next_instr = current_instr + 1 + _PyOpcode_Caches[_PyOpcode_Deopt[current_instr->op.code]]; - // gh-140104: The exception handler expects frame->instr_ptr to be pointing to next_instr, not this_instr! - frame->instr_ptr = next_instr; + frame->instr_ptr = _PyFrame_GetBytecode(frame) + target; SYNC_SP(); GOTO_TIER_ONE(NULL); } diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index 9e46786d050e..5273670008c0 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -7439,9 +7439,7 @@ oparg = CURRENT_OPARG(); uint32_t target = (uint32_t)CURRENT_OPERAND0(); assert(oparg == 0); - _Py_CODEUNIT *current_instr = _PyFrame_GetBytecode(frame) + target; - _Py_CODEUNIT *next_instr = current_instr + 1 + _PyOpcode_Caches[_PyOpcode_Deopt[current_instr->op.code]]; - frame->instr_ptr = next_instr; + frame->instr_ptr = _PyFrame_GetBytecode(frame) + target; GOTO_TIER_ONE(NULL); break; } diff --git a/Python/optimizer.c b/Python/optimizer.c index c7f7f0209318..4b41236b69ba 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -1352,7 +1352,6 @@ uop_optimize( assert(length <= UOP_MAX_TRACE_LENGTH); // Check executor coldness - PyThreadState *tstate = PyThreadState_Get(); // It's okay if this ends up going negative. if (--tstate->interp->executor_creation_counter == 0) { _Py_set_eval_breaker_bit(tstate, _PY_EVAL_JIT_INVALIDATE_COLD_BIT);