gh-146388: Add null check for sym_new(ctx) in make_bottom#146389
gh-146388: Add null check for sym_new(ctx) in make_bottom#146389Fidget-Spinner merged 7 commits intopython:mainfrom
sym_new(ctx) in make_bottom#146389Conversation
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
I think this fix is simple enough which doesn't requires a test, but the news entry is required. Can you add it follow the Dev Guide? https://devguide.python.org/getting-started/pull-request-lifecycle/#updating-news-and-what-s-new-in-python |
|
@aisk, blurb added. Thanks for the review! |
| @@ -0,0 +1 @@ | |||
| Add a null check for :func:`sym_new(ctx)` in :func:`make_bottom` | |||
There was a problem hiding this comment.
This doesn't tell much. Can it be more descriptive please? Something like
Handle when JIT optimizer runs out of space when dealing with contradictions.
Misc/NEWS.d/next/Core_and_Builtins/2026-03-26-11-18-45.gh-issue-146388.O0u1c3.rst
Outdated
Show resolved
Hide resolved
Co-authored-by: AN Long <[email protected]>
vstinner
left a comment
There was a problem hiding this comment.
LGTM. I'm not sure that the NEWS entry is worth it, it's a corner case which is unlikely to occur in practice, no?
optimizer_symbols.c: make_bottom NULL deref when arena full
sym_new(ctx)at line 1535 can return NULL when the type arena is full. Result immediately dereferenced without check. Every othersym_newcall site checks for NULL.This is a sub-issue of #146102 with gist details
optimizer_symbols.c:make_bottomNULL deref when arena full #146388