-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
bpo-37188: Fix a divide-by-zero in arrays of size-0 objects #13881
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
`itemsize` can be zero when `_type_` is an empty struct or length-0 array. This line used to be `length * itemsize < 0`, which didn't exhibit this problem.
@skrah: Please replace |
Thanks @eric-wieser for the PR, and @skrah for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Thanks @eric-wieser for the PR, and @skrah for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
Sorry @eric-wieser and @skrah, I had trouble checking out the |
GH-13882 is a backport of this pull request to the 3.7 branch. |
…-13881) (cherry picked from commit 0690c79) Co-authored-by: Eric Wieser <[email protected]>
@eric-wieser Thanks for catching this! This appears to have been backported to 2.7 and the auto-backport fails. Do you have time to do a manual backport PR? |
Actually I missed |
Thanks @eric-wieser for the PR, and @skrah for merging it 🌮🎉.. I'm working now to backport this PR to: 2.7. |
Sorry, @eric-wieser and @skrah, I could not cleanly backport this to |
GH-13906 is a backport of this pull request to the 2.7 branch. |
Thanks @eric-wieser for the PR, and @skrah for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
GH-13911 is a backport of this pull request to the 3.8 branch. |
itemsize
can be zero when_type_
is an empty struct or length-0 array.This line used to be
length * itemsize < 0
, which didn't exhibit this problem.https://bugs.python.org/issue37188