GeezerVison is showing github.com — gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` by sobolevn · Pull Request #151127 · python/cpython
Conversation
sobolevn
commented
Jun 9, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
All supported versions down to 3.13 have this problem.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
|
@@ -0,0 +1 @@ |
|
|
Add missing :c:func:`PyErr_NoMemory` call to ``Python/flowgraph.c`` module.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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. |
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sobolevn reacted with thumbs up emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
sobolevn reacted with heart emoji
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
|
Thanks @sobolevn for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot PPC64LE Fedora Stable 3.14 (tier-2) has failed when building commit 5c6402e.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1695/builds/807) and take a look at the build logs.
- Check if the failure is related to this commit (5c6402e) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1695/builds/807
Summary of the results of the build (if available):
Click to see traceback logs
Note: switching to '5c6402e6a509b248acf273d613590ce699647a89'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5c6402e6a509 [3.14] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151135)
Switched to and reset branch '3.14'
/usr/bin/ld.bfd: cannot open output file Modules/pyexpat.cpython-314d-powerpc64le-linux-gnu.so: No space left on device
collect2: error: ld returned 1 exit status
make: *** [Makefile:3662: Modules/pyexpat.cpython-314d-powerpc64le-linux-gnu.so] Error 1
make: *** Waiting for unfinished jobs....
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make: *** [Makefile:3642: Modules/zlib.cpython-314d-powerpc64le-linux-gnu.so] Error 1
Assembler messages:
Fatal error: can't create Modules/sha1module.o: No space left on device
make: *** [Makefile:3651: Modules/sha1module.o] Error 1
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make: *** [Makefile:3640: Modules/_zstd.cpython-314d-powerpc64le-linux-gnu.so] Error 1
Assembler messages:
Fatal error: can't create Modules/sha3module.o: No space left on device
make: *** [Makefile:3655: Modules/sha3module.o] Error 1
Assembler messages:
Fatal error: can't create Modules/sha2module.o: No space left on device
make: *** [Makefile:3653: Modules/sha2module.o] Error 1
Assembler messages:
Fatal error: can't create Modules/blake2module.o: No space left on device
make: *** [Makefile:3657: Modules/blake2module.o] Error 1
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make: *** [Makefile:3629: Modules/_decimal.cpython-314d-powerpc64le-linux-gnu.so] Error 1
Assembler messages:
Fatal error: can't create Modules/hmacmodule.o: No space left on device
make: *** [Makefile:3659: Modules/hmacmodule.o] Error 1
Assembler messages:
Fatal error: can't create Modules/_ctypes/_ctypes_test.o: No space left on device
make: *** [Makefile:3819: Modules/_ctypes/_ctypes_test.o] Error 1
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot PPC64LE Fedora Stable Clang 3.14 (tier-3) has failed when building commit 5c6402e.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1779/builds/814) and take a look at the build logs.
- Check if the failure is related to this commit (5c6402e) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1779/builds/814
Summary of the results of the build (if available):
Click to see traceback logs
Note: switching to '5c6402e6a509b248acf273d613590ce699647a89'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 5c6402e6a509 [3.14] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151135)
Switched to and reset branch '3.14'
/usr/bin/ld.bfd: final link failed: No space left on device
clang: error: linker command failed with exit code 1 (use -v to see invocation)
/usr/bin/ld.bfd: final link failed: No space left on device
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make: *** [Makefile:3594: Modules/_bisect.cpython-314d-powerpc64le-linux-gnu.so] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:3590: Modules/array.cpython-314d-powerpc64le-linux-gnu.so] Error 1
rror: unable to open output file 'Modules/_testmultiphase.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3815: Modules/_testmultiphase.o] Error 1
rror: unable to open output file 'Programs/_testembed.o': 'No space left on device'
1 error generated.
make: *** [Makefile:2096: Programs/_testembed.o] Error 1
rror: unable to open output file 'Modules/_testlimitedcapi/unicode.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3804: Modules/_testlimitedcapi/unicode.o] Error 1
rror: unable to open output file 'Modules/_testclinic.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3809: Modules/_testclinic.o] Error 1
rror: unable to open output file 'Modules/_ctypes/_ctypes_test.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3819: Modules/_ctypes/_ctypes_test.o] Error 1
rror: unable to open output file 'Python/ceval.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3311: Python/ceval.o] Error 1
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable Clang Installed 3.15 (tier-2) has failed when building commit 8a2bf2a.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2081/builds/116) and take a look at the build logs.
- Check if the failure is related to this commit (8a2bf2a) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/2081/builds/116
Summary of the results of the build (if available):
Click to see traceback logs
Previous HEAD position was 83e26a43a75 [3.15] gh-149321: Remove lazy_imports=none startup mode (GH-149389) (#150129)
HEAD is now at 8a2bf2a072e [3.15] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151134)
Switched to and reset branch '3.15'
make: [Makefile:3017: libinstall] Error 1 (ignored)
install: error copying 'build/lib.linux-x86_64-3.15/build-details.json' to '/home/buildbot-worker/cstratak-fedora-stable-x86_64/3.15.cstratak-fedora-stable-x86_64.clang-installed/build/target/lib/python3.15/build-details.json': No space left on device
make: *** [Makefile:2614: install] Error 1
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable LTO + PGO 3.15 (tier-1) has failed when building commit 8a2bf2a.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2017/builds/117) and take a look at the build logs.
- Check if the failure is related to this commit (8a2bf2a) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/2017/builds/117
Summary of the results of the build (if available):
Click to see traceback logs
Note: switching to '8a2bf2a072ee2482a22eaed96af3016a6f627303'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8a2bf2a072ee2 [3.15] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151134)
Switched to and reset branch '3.15'
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make[2]: [Makefile:3518: clean-retain-profile] Error 1 (ignored)
./Modules/socketmodule.c: In function ‘getsockaddrarg’:
./Modules/socketmodule.c:2638:9: warning: ‘strncpy’ specified bound 64 equals destination size [-Wstringop-truncation]
2638 | strncpy((char *)sa->salg_name, name, sizeof(sa->salg_name));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ar: libpython3.15.a: error reading Parser/parser.o: No space left on device
make[2]: *** [Makefile:1196: libpython3.15.a] Error 1
make[1]: *** [Makefile:1028: profile-gen-stamp] Error 2
make: *** [Makefile:1040: profile-run-stamp] Error 2
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable LTO 3.15 (tier-1) has failed when building commit 8a2bf2a.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/2090/builds/118) and take a look at the build logs.
- Check if the failure is related to this commit (8a2bf2a) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/2090/builds/118
Summary of the results of the build (if available):
Click to see traceback logs
Note: switching to '8a2bf2a072ee2482a22eaed96af3016a6f627303'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 8a2bf2a072ee2 [3.15] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151134)
Switched to and reset branch '3.15'
/usr/bin/ld.bfd: final link failed: No space left on device
collect2: error: ld returned 1 exit status
make: *** [Makefile:1973: Programs/_freeze_module] Error 1
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable 3.13 (tier-1) has failed when building commit 140af0f.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1498/builds/1563) and take a look at the build logs.
- Check if the failure is related to this commit (140af0f) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1498/builds/1563
Summary of the results of the build (if available):
Click to see traceback logs
Note: switching to '140af0fd14241dead4918211e80306f5d8ea5486'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 140af0fd1424 [3.13] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151136)
Switched to and reset branch '3.13'
/tmp/cckuRHJj.s: Assembler messages:
/tmp/cckuRHJj.s: Fatal error: Modules/_sqlite/blob.o: No space left on device
/tmp/ccDZpoQR.s: make: *** [Makefile:3437: Modules/_sqlite/blob.o] Error 1
make: *** Waiting for unfinished jobs....
Assembler messages:
/tmp/ccDZpoQR.s: Fatal error: Modules/_sqlite/prepare_protocol.o: No space left on device
make: *** [Makefile:3442: Modules/_sqlite/prepare_protocol.o] Error 1
/tmp/ccfNQDyq.s: Assembler messages:
/tmp/ccfNQDyq.s: Fatal error: can't write 3911 bytes to section .gnu.lto_.decls.b1d99a5439b17ebb of Modules/_sqlite/cursor.o: 'No space left on device'
/tmp/ccfNQDyq.s: Fatal error: Modules/_sqlite/cursor.o: No such file or directory
make: *** [Makefile:3439: Modules/_sqlite/cursor.o] Error 1
/tmp/ccWSriio.s: Assembler messages:
/tmp/ccWSriio.s: Fatal error: can't write 3911 bytes to section .gnu.debuglto_.debug_str of Modules/_ctypes/_ctypes.o: 'No space left on device'
/tmp/ccWSriio.s: Fatal error: Modules/_ctypes/_ctypes.o: No such file or directory
make: *** [Makefile:3427: Modules/_ctypes/_ctypes.o] Error 1
/tmp/ccmZn7Qo.s: Assembler messages:
/tmp/ccmZn7Qo.s: Fatal error: can't write 958 bytes to section .gnu.lto_PyTuple_GET_SIZE.6.baac69133e2fa053 of Modules/_sqlite/connection.o: 'No space left on device'
/tmp/ccmZn7Qo.s: Fatal error: Modules/_sqlite/connection.o: No such file or directory
make: *** [Makefile:3438: Modules/_sqlite/connection.o] Error 1
/tmp/cc6hYXDs.s: Assembler messages:
/tmp/cc6hYXDs.s: Fatal error: can't write 3911 bytes to section .gnu.debuglto_.debug_str of Modules/_cursesmodule.o: 'No space left on device'
/tmp/cc6hYXDs.s: Fatal error: Modules/_cursesmodule.o: No such file or directory
make: *** [Makefile:3433: Modules/_cursesmodule.o] Error 1
/tmp/cccmuDGE.s: Assembler messages:
/tmp/cccmuDGE.s: Fatal error: can't write 3912 bytes to section .gnu.debuglto_.debug_info of Modules/_ssl.o: 'No space left on device'
/tmp/cccmuDGE.s: Fatal error: Modules/_ssl.o: No such file or directory
make: *** [Makefile:3447: Modules/_ssl.o] Error 1
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:3126: clean-retain-profile] Error 1 (ignored)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Fedora Stable Clang 3.13 (tier-2) has failed when building commit 140af0f.
What do you need to do:
- Don't panic.
- Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
- Go to the page of the buildbot that failed (https://buildbot.python.org/#/builders/1479/builds/1568) and take a look at the build logs.
- Check if the failure is related to this commit (140af0f) or if it is a false positive.
- If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.
You can take a look at the buildbot page here:
https://buildbot.python.org/#/builders/1479/builds/1568
Summary of the results of the build (if available):
Click to see traceback logs
Note: switching to '140af0fd14241dead4918211e80306f5d8ea5486'.
You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by switching back to a branch.
If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -c with the switch command. Example:
git switch -c <new-branch-name>
Or undo this operation with:
git switch -
Turn off this advice by setting config variable advice.detachedHead to false
HEAD is now at 140af0fd1424 [3.13] gh-151126: Fix missing `PyErr_NoMemory()` in `remove_unused_consts` (GH-151127) (#151136)
Switched to and reset branch '3.13'
rror: unable to open output file 'Objects/unicodeobject.o': 'No space left on device'
1 error generated.
rror: unable to open output file 'Python/dtoa.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3036: Objects/unicodeobject.o] Error 1
make: *** Waiting for unfinished jobs....
make: *** [Makefile:3043: Python/dtoa.o] Error 1
rror: unable to open output file 'Modules/_suggestions.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3552: Modules/_suggestions.o] Error 1
rror: unable to open output file 'Modules/signalmodule.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3548: Modules/signalmodule.o] Error 1
rror: unable to open output file 'Modules/errnomodule.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3558: Modules/errnomodule.o] Error 1
rror: unable to open output file 'Modules/_io/_iomodule.o': 'No space left on device'
1 error generated.
rror: unable to open output file 'Modules/_codecsmodule.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3560: Modules/_io/_iomodule.o] Error 1
make: *** [Makefile:3554: Modules/_codecsmodule.o] Error 1
rror: unable to open output file 'Modules/_collectionsmodule.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3556: Modules/_collectionsmodule.o] Error 1
rror: unable to open output file 'Modules/posixmodule.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3546: Modules/posixmodule.o] Error 1
rror: unable to open output file 'Python/ceval.o': 'No space left on device'
1 error generated.
make: *** [Makefile:3036: Python/ceval.o] Error 1
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
find: ‘build’: No such file or directory
make: [Makefile:3126: clean-retain-profile] Error 1 (ignored)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
"AMD64 Fedora Stable" buildbot worker disk was full. I fixed the issue (I removed all buildbot build directories).
|
sobolevn and encukou reacted with heart emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|