Skip to content

Commit c8ee196

Browse files
authored
gh-146388: Add null check for sym_new(ctx) in make_bottom (GH-146389)
1 parent a209dd2 commit c8ee196

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Adds a null check to handle when the JIT optimizer runs out of space when dealing with contradictions in ``make_bottom``.

Python/optimizer_symbols.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1684,6 +1684,9 @@ static JitOptSymbol *
16841684
make_bottom(JitOptContext *ctx)
16851685
{
16861686
JitOptSymbol *sym = sym_new(ctx);
1687+
if (sym == NULL) {
1688+
return out_of_space(ctx);
1689+
}
16871690
sym->tag = JIT_SYM_BOTTOM_TAG;
16881691
return sym;
16891692
}

0 commit comments

Comments
 (0)