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-100942: Fix incorrect cast in property_copy(). #100965
Conversation
rhettinger
commented
Jan 12, 2023
•
edited by bedevere-bot
edited by bedevere-bot
- Issue: segfault in property.getter/setter/deleter if property subclass has weird __new__ #100942
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.
Oh, nice to see that my idea in #100955 was correct.
I will close mine, since you probably haven't seen it :)
pass | ||
|
||
p = property.__new__(pro) | ||
p.__set_name__(A, 1) |
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.
This line is not really required. Segfault happens and without it.
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.
I prefer to leave it because it covers an additional code path that could fail and it is an accurate record of how the issue was discovered.
Thanks @rhettinger for the PR |
Sorry, @rhettinger, I could not cleanly backport this to |
Sorry @rhettinger, I had trouble checking out the |
@sobolevn Would you like to take care of the backport. This PR won't apply cleanly and needs to be recreated for 3.11 and prior. |
Yeah, why not :) |
…nGH-100965). (cherry picked from commit 94fc770) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
GH-101008 is a backport of this pull request to the 3.11 branch. |
…nGH-100965). (cherry picked from commit 94fc770) Co-authored-by: Raymond Hettinger <rhettinger@users.noreply.github.com>
GH-101009 is a backport of this pull request to the 3.10 branch. |
Done! |