]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-146388: Add null check for `sym_new(ctx)` in `make_bottom` (GH-146389)
authorBrandon <a0sugm41l@gmail.com>
Fri, 27 Mar 2026 14:50:29 +0000 (09:50 -0500)
committerGitHub <noreply@github.com>
Fri, 27 Mar 2026 14:50:29 +0000 (22:50 +0800)
Misc/NEWS.d/next/Core_and_Builtins/2026-03-26-11-18-45.gh-issue-146388.O0u1c3.rst [new file with mode: 0644]
Python/optimizer_symbols.c

diff --git a/Misc/NEWS.d/next/Core_and_Builtins/2026-03-26-11-18-45.gh-issue-146388.O0u1c3.rst b/Misc/NEWS.d/next/Core_and_Builtins/2026-03-26-11-18-45.gh-issue-146388.O0u1c3.rst
new file mode 100644 (file)
index 0000000..7cf5edf
--- /dev/null
@@ -0,0 +1 @@
+Adds a null check to handle when the JIT optimizer runs out of space when dealing with contradictions in ``make_bottom``.
index 2a8d8c45c588baa275fc53c715f82845d22e4790..0bc3c5055812c4703ed3e6c325a0eede562a5410 100644 (file)
@@ -1684,6 +1684,9 @@ static JitOptSymbol *
 make_bottom(JitOptContext *ctx)
 {
     JitOptSymbol *sym = sym_new(ctx);
+    if (sym == NULL) {
+        return out_of_space(ctx);
+    }
     sym->tag = JIT_SYM_BOTTOM_TAG;
     return sym;
 }