bpo-37188: Fix a divide-by-zero in arrays of size-0 objects#13881
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. |
|
@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. |
itemsizecan 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