-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
[2.7] bpo-36126: Fix ref count leakage in structseq_repr #12035
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
Hello, and thanks for your contribution! I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA). Unfortunately we couldn't find an account corresponding to your GitHub username on bugs.python.org (b.p.o) to verify you have signed the CLA (this might be simply due to a missing "GitHub Name" entry in your b.p.o account settings). This is necessary for legal reasons before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue. You can check yourself to see if the CLA has been received. Thanks again for your contribution, we look forward to reviewing it! |
Just signed CLA, might take time for the status to be updated? |
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, Can you add a testcase?
hmm IMO you should open a bpo, this way you will have more reviewers
Try to made the PR on master branch. |
@eamanu The master branch does not have this problem. |
Also @eamanu, is there a way to test ref count for local variables is correctly handled? These variables are not visible outside the function. Also, there are so many edge cases, and I didn't see any similar test for other edge cases. |
Do I need to add news? |
I think this is not required. You can get the leak only in very special situation. SystemError itself is a sign of more severe issues. |
Thank you for your contribution @zasdfgbnm! |
Not sure if I need to open an issue for this one line fix.
This fixes the ref count leakage of
structseq_repr
on Python 2.7. To reproduce the bug, create a new project:setup.py
test_pystructsequence.c
And run the following file and look at the memory usage:
https://bugs.python.org/issue36126