Skip to content

Commit 547f587

Browse files
Update optimizer.c
1 parent aaf6873 commit 547f587

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Python/optimizer.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,10 @@ _PyJit_translate_single_bytecode_to_trace(
711711
max_length--;
712712
}
713713

714-
RESERVE_RAW(expansion->nuops + needs_guard_ip + 3 + (!OPCODE_HAS_NO_SAVE_IP(opcode)), "uop and various checks");
714+
// _GUARD_IP leads to an exit.
715+
max_length -= needs_guard_ip;
716+
717+
RESERVE_RAW(expansion->nuops + needs_guard_ip + 2 + (!OPCODE_HAS_NO_SAVE_IP(opcode)), "uop and various checks");
715718

716719
ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target);
717720

0 commit comments

Comments
 (0)