From 5e17707b9353592feb13e72aee72d1d56bd7b74f Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Sat, 25 Oct 2025 19:04:29 +0100 Subject: [PATCH] Fix a bug with ENTER_EXECUTOR linking --- Python/optimizer.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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); -- 2.47.3