Skip to content

Commit 3945e57

Browse files
committed
Check room available for JUMP_TO_TOP
1 parent a1bca40 commit 3945e57

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Python/optimizer.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,9 +378,11 @@ translate_bytecode_to_trace(
378378
}
379379
case JUMP_BACKWARD:
380380
{
381-
if (instr + 2 - operand == initial_instr) {
381+
if (instr + 2 - operand == initial_instr
382+
&& trace_length + 3 <= max_length)
383+
{
382384
ADD_TO_TRACE(JUMP_TO_TOP, 0);
383-
break;
385+
goto done;
384386
}
385387
// Else fall through!
386388
}

0 commit comments

Comments
 (0)