From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 25 Oct 2025 18:04:29 +0000 (+0100) Subject: Fix a bug with ENTER_EXECUTOR linking X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5e17707b9353592feb13e72aee72d1d56bd7b74f;p=thirdparty%2FPython%2Fcpython.git Fix a bug with ENTER_EXECUTOR linking --- diff --git a/Python/optimizer.c b/Python/optimizer.c index ef7e518faaed..38fccafeda49 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -621,6 +621,10 @@ _PyJit_translate_single_bytecode_to_trace( return 1; } + if (opcode == ENTER_EXECUTOR) { + goto full; + } + if (!tstate->interp->jit_state.dependencies_still_valid) { goto done; } @@ -686,10 +690,6 @@ _PyJit_translate_single_bytecode_to_trace( // One for possible _DEOPT, one because _CHECK_VALIDITY itself might _DEOPT max_length -= 2; - if (opcode == ENTER_EXECUTOR) { - goto full; - } - const struct opcode_macro_expansion *expansion = &_PyOpcode_macro_expansion[opcode]; ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target);