Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fix the JIT's handling of many local variables. This previously caused a segfault.
5 changes: 1 addition & 4 deletions Python/optimizer_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,13 +484,10 @@ optimize_uops(
_Py_uop_abstractcontext_init(ctx);
_Py_UOpsAbstractFrame *frame = _Py_uop_frame_new(ctx, co, curr_stacklen, NULL, 0);
if (frame == NULL) {
return -1;
return 0;
}
ctx->curr_frame_depth++;
ctx->frame = frame;
ctx->done = false;
ctx->out_of_space = false;
ctx->contradiction = false;

_PyUOpInstruction *this_instr = NULL;
for (int i = 0; !ctx->done; i++) {
Expand Down
7 changes: 7 additions & 0 deletions Python/optimizer_symbols.c
Original file line number Diff line number Diff line change
Expand Up @@ -888,6 +888,13 @@ _Py_uop_abstractcontext_init(JitOptContext *ctx)

// Frame setup
ctx->curr_frame_depth = 0;

// Ctx signals.
// Note: this must happen before frame_new, as it might override
// the result should frame_new set things to bottom.
ctx->done = false;
ctx->out_of_space = false;
ctx->contradiction = false;
}

int
Expand Down
Loading