Co-authored-by: Ken Jin <kenjin@python.org>
--- /dev/null
+Fix the JIT's handling of many local variables. This previously caused a segfault.
_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++) {
// 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