GeezerVison is showing github.com — gh-117139: Fix a few wrong steals in bytecodes.c by Fidget-Spinner · Pull Request #121127 · python/cpython
Conversation
Fidget-Spinner
commented
Jun 28, 2024
•
edited by bedevere-app
Bot
Loading
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.
|
|
}
|
|
|
else {
|
|
|
err = PyObject_SetItem(PyStackRef_AsPyObjectBorrow(container), slice, PyStackRef_AsPyObjectSteal(v));
|
|
|
err = PyObject_SetItem(PyStackRef_AsPyObjectBorrow(container), slice, PyStackRef_AsPyObjectBorrow(v));
|
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.
PyObject_SetItem and the entire family actually takes borrowed references to the container and item. So this steal is wrong, it should be borrow.
This was caught when the PyStackRef_CLOSE(v) below tried to close an already invalid stackref (it was made invalid by the steal).
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
|
inst(SET_ADD, (set, unused[oparg-1], v -- set, unused[oparg-1])) {
|
|
|
int err = PySet_Add(PyStackRef_AsPyObjectBorrow(set),
|
|
|
PyStackRef_AsPyObjectSteal(v));
|
|
|
PyStackRef_AsPyObjectBorrow(v));
|
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.
|
|
PyObject *name = GETITEM(FRAME_CO_NAMES, oparg);
|
|
|
int err = PyObject_SetAttr(PyStackRef_AsPyObjectBorrow(owner),
|
|
|
name, PyStackRef_AsPyObjectSteal(v));
|
|
|
name, PyStackRef_AsPyObjectBorrow(v));
|
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.
PyObject_SetAttr actually takes borrowed refs too, so this shouldn't be stolen. This was caught when the DECREF_INPUTS tried to close an already stolen stackref.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️
Hi! The buildbot AMD64 Debian root 3.x has failed when building commit e6543da.
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/all/#builders/345/builds/8384) and take a look at the build logs.
- Check if the failure is related to this commit (e6543da) 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/all/#builders/345/builds/8384
Failed tests:
Failed subtests:
- test_asyncio_repl_is_ok - test.test_repl.TestInteractiveInterpreter.test_asyncio_repl_is_ok
Summary of the results of the build (if available):
==
Click to see traceback logs
Traceback (most recent call last):
xiting asyncio REPL...
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/asyncio/__main__.py", line 109, in run
raise OSError(errno.ENOTTY, "tty required", "stdin")
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x000055da69db5ad0)
Traceback (most recent call last):
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/test_repl.py", line 199, in test_asyncio_repl_is_ok
assert_python_ok("-m", "asyncio")
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 180, in assert_python_ok
return _assert_python(True, *args, **env_vars)
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 165, in _assert_python
res.fail(cmd_line)
~~~~~~~~^^^^^^^^^^
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/test/support/script_helper.py", line 75, in fail
raise AssertionError("Process return code is %d\n"
...<13 lines>...
err))
AssertionError: Process return code is -6
command line: ['/root/buildarea/3.x.angelico-debian-amd64/build/python', '-X', 'faulthandler', '-I', '-m', 'asyncio']
Traceback (most recent call last):
xiting asyncio REPL...
File "/root/buildarea/3.x.angelico-debian-amd64/build/Lib/asyncio/__main__.py", line 109, in run
raise OSError(errno.ENOTTY, "tty required", "stdin")
Fatal Python error: _enter_buffered_busy: could not acquire lock for <_io.BufferedWriter name='<stderr>'> at interpreter shutdown, possibly due to daemon threads
Python runtime state: finalizing (tstate=0x000055bec2fccad0)
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
It looks unrelated and more like a buildbot problem.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mrahtz
pushed a commit
to mrahtz/cpython
that referenced
this pull request
Jun 30, 2024
Fix a few wrong steals in bytecodes.c
estyxx
pushed a commit
to estyxx/cpython
that referenced
this pull request
Jul 17, 2024
Fix a few wrong steals in bytecodes.c
Reviewers
colesbury
Awaiting requested review from colesbury
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.
|