Uh oh!
There was an error while loading. Please reload this page.
gh-122728: Fix SystemError in PyEval_GetLocals() - #122735
Conversation
Fix PyEval_GetLocals() to avoid SystemError ("bad argument to
internal function"). Don't redefine the 'ret' variable in the if
block.
Add an unit test on PyEval_GetLocals().vstinner
commented
Aug 6, 2024
hroncok
commented
Aug 6, 2024
Will test this in Fedora. |
vstinner
commented
Aug 6, 2024
Without the Python/ceval.c fix, the unit test reproduces the SystemError bug. |
hroncok
left a comment
There was a problem hiding this comment.
The change makes sense, is justified in the commit message, and fixes the problem in Fedora.
I have not verified the test fails without the fix, but I trust @vstinner that he has.
The test makes reasonable assertions and calls PyEval_GetLocals.
The news fragment is as detailed as needed.
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13. |
Fix PyEval_GetLocals() to avoid SystemError ("bad argument to
internal function"). Don't redefine the 'ret' variable in the if
block.
Add an unit test on PyEval_GetLocals().
(cherry picked from commit 4767a6e)
Co-authored-by: Victor Stinner <vstinner@python.org>GH-122757 is a backport of this pull request to the 3.13 branch. |
thesamesam
commented
Aug 6, 2024
Many thanks for the quick fix and @hroncok for testing it too. Lovely to wake up to :) |
…122757) gh-122728: Fix SystemError in PyEval_GetLocals() (GH-122735) Fix PyEval_GetLocals() to avoid SystemError ("bad argument to internal function"). Don't redefine the 'ret' variable in the if block. Add an unit test on PyEval_GetLocals(). (cherry picked from commit 4767a6e) Co-authored-by: Victor Stinner <vstinner@python.org>
Fix PyEval_GetLocals() to avoid SystemError ("bad argument to
internal function"). Don't redefine the 'ret' variable in the if
block.
Add an unit test on PyEval_GetLocals().Fix PyEval_GetLocals() to avoid SystemError ("bad argument to
internal function"). Don't redefine the 'ret' variable in the if
block.
Add an unit test on PyEval_GetLocals().
Fix PyEval_GetLocals() to avoid SystemError ("bad argument to internal function"). Don't redefine the 'ret' variable in the if block.
Add an unit test on PyEval_GetLocals().
SystemError: Objects/dictobject.c:3774: bad argument to internal function#122728