From 547f5872e020e2fd4abfa86e9d4b5162d4d3b511 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Fri, 7 Nov 2025 22:59:14 +0000 Subject: [PATCH] Update optimizer.c --- Python/optimizer.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Python/optimizer.c b/Python/optimizer.c index c38f28e224a8..f1d0ca811c7e 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -711,7 +711,10 @@ _PyJit_translate_single_bytecode_to_trace( max_length--; } - RESERVE_RAW(expansion->nuops + needs_guard_ip + 3 + (!OPCODE_HAS_NO_SAVE_IP(opcode)), "uop and various checks"); + // _GUARD_IP leads to an exit. + max_length -= needs_guard_ip; + + RESERVE_RAW(expansion->nuops + needs_guard_ip + 2 + (!OPCODE_HAS_NO_SAVE_IP(opcode)), "uop and various checks"); ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target); -- 2.47.3