Skip to content

Commit ca99bfd

Browse files
gh-144016: Fix bad stack assert in the JIT optimizer (GH-144019)
1 parent 4e10fa9 commit ca99bfd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Python/optimizer_analysis.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -507,7 +507,7 @@ optimize_uops(
507507
*(ctx->out_buffer.next++) = *this_instr;
508508
}
509509
assert(ctx->frame != NULL);
510-
if (!CURRENT_FRAME_IS_INIT_SHIM()) {
510+
if (!CURRENT_FRAME_IS_INIT_SHIM() && !ctx->done) {
511511
DPRINTF(3, " stack_level %d\n", STACK_LEVEL());
512512
ctx->frame->stack_pointer = stack_pointer;
513513
assert(STACK_LEVEL() >= 0);

0 commit comments

Comments
 (0)