-
-
Notifications
You must be signed in to change notification settings - Fork 32k
gh-101037: Fix potential memory underallocation for zeros of int subtypes #101038
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-101037: Fix potential memory underallocation for zeros of int subtypes #101038
Conversation
@corona10 Would you be willing to review? |
Just a comment: this seems fairly harmless in this case, but I'd note that we don't in general do anything special to make sure that |
🤖 New build scheduled with the buildbot fleet by @mdickinson for commit 2ddd5c1 🤖 If you want to schedule another build, you need to add the |
@mdickinson I will take a look. Thanks |
For refleak:
|
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
The refleak is unrelated to this PR :)
see: #100998 (comment)
2ddd5c1
to
877067c
Compare
@mdickinson Oops, sorry, I tried to rebase the branch for |
@corona10 No problem; thanks for reviewing! |
Thanks @mdickinson for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
…t subtypes (pythonGH-101038) This PR fixes object allocation in long_subtype_new to ensure that there's at least one digit in all cases, and makes sure that the value of that digit is copied over from the source long. Needs backport to 3.11, but not any further: the change to require at least one digit was only introduced for Python 3.11. Fixes pythonGH-101037. (cherry picked from commit 401fdf9) Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
GH-101219 is a backport of this pull request to the 3.11 branch. |
…nt subtypes (GH-101038) (#101219) gh-101037: Fix potential memory underallocation for zeros of int subtypes (GH-101038) This PR fixes object allocation in long_subtype_new to ensure that there's at least one digit in all cases, and makes sure that the value of that digit is copied over from the source long. Needs backport to 3.11, but not any further: the change to require at least one digit was only introduced for Python 3.11. Fixes GH-101037. (cherry picked from commit 401fdf9) Co-authored-by: Mark Dickinson <dickinsm@gmail.com>
This PR fixes object allocation in
long_subtype_new
to ensure that there's at least one digit in all cases, and makes sure that the value of that digit is copied over from the sourcelong
.Needs backport to 3.11, but not any further: the change to require at least one digit was only introduced for Python 3.11.
Fixes #101037.