gh-151126: Fix missing PyErr_NoMemory() in remove_unused_consts#151127
Conversation
| @@ -0,0 +1 @@ | |||
| Add missing :c:func:`PyErr_NoMemory` call to ``Python/flowgraph.c`` module. | |||
There was a problem hiding this comment.
Nitpick: there's a role for that.
| Add missing :c:func:`PyErr_NoMemory` call to ``Python/flowgraph.c`` module. | |
| Add missing :c:func:`PyErr_NoMemory` call to :file:`Python/flowgraph.c` module. |
There was a problem hiding this comment.
No, I don't think this is an appropriate NEWS entry. Most of Python users know nothing about PyErr_NoMemory and Python/flowgraph.c, and should not. This is information only for core developers. We can write this in a commit message.
Please rewrite the NEWS entry in terms understandable for average Python user.
vstinner
left a comment
There was a problem hiding this comment.
LGTM. remove_unused_consts() is the only function of Python/flowgraph.c which allocates memory without calling PyErr_NoMemory() on error. The "end:" label frees memory correctly.
|
Thanks everyone! |
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15. |
|
GH-151134 is a backport of this pull request to the 3.15 branch. |
|
GH-151135 is a backport of this pull request to the 3.14 branch. |
|
GH-151136 is a backport of this pull request to the 3.13 branch. |
|
|
|
|
|
|
|
|
"AMD64 Fedora Stable" buildbot worker disk was full. I fixed the issue (I removed all buildbot build directories). |
All supported versions down to 3.13 have this problem.
PyErr_NoMemory()call after failing memory allocation #151126