-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
gh-122728: Fix SystemError in PyEval_GetLocals() #122735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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().
Will test this in Fedora. |
Without the Python/ceval.c fix, the unit test reproduces the SystemError bug. |
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.
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.
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.
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 <[email protected]>
GH-122757 is a backport of this pull request to the 3.13 branch. |
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 <[email protected]>
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