Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 34k
gh-82565: Fix a possible assertion failure in _pickle#16606
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
gh-82565: Fix a possible assertion failure in _pickle #16606
Uh oh!
There was an error while loading. Please reload this page.
Conversation
ZackerySpytz commented Oct 6, 2019 • edited by bedevere-bot
Loading Uh oh!
There was an error while loading. Please reload this page.
edited by bedevere-bot
Uh oh!
There was an error while loading. Please reload this page.
In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called three times in a row without any error handling. If an exception occurs during the first or second call, _PyObject_LookupAttrId() will be called with a live exception.
serhiy-storchaka left a comment
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.
Please add a test.
bedevere-bot commented Oct 6, 2019
A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated. Once you have made the requested changes, please leave a comment on this pull request containing the phrase |
serhiy-storchaka commented Oct 21, 2019
Minimal reproducer (but you can add classF: @propertydefread(self): 1/0importpicklepickle.load(F()) |
taleinat commented Nov 13, 2019
@ZackerySpytz Ping? |
taleinat commented Nov 22, 2019
Hi @ZackerySpytz! This is looking good! Make sure to also add a NEWS entry (you can use blurb-it). |
iritkatriel commented Oct 17, 2021
@ZackerySpytz has added a test. Shall we merge this? |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
furkanonder commented Dec 22, 2022
LGTM. @serhiy-storchaka |
serhiy-storchaka left a comment
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.
Please add few more test cases:
- no
read, noreadline read = bad_property, noreadlinereadline = bad_property, noread
serhiy-storchaka commented Dec 1, 2023
Sorry, I forget to merge this PR at its time, so the original issue was fixed in #105667. But the tests may still be useful. |
Thanks @ZackerySpytz for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
…honGH-16606) (cherry picked from commit 0584443) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
GH-112591 is a backport of this pull request to the 3.12 branch. |
GH-112592 is a backport of this pull request to the 3.11 branch. |
…honGH-16606) (cherry picked from commit 0584443) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
In _Unpickler_SetInputStream(), _PyObject_LookupAttrId() is called
three times in a row without any error handling. If an exception
occurs during the first or second call, _PyObject_LookupAttrId()
will be called with a live exception.
https://bugs.python.org/issue38384