-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-36946:Fix possible signed integer overflow when handling slices #15639
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
bpo-36946:Fix possible signed integer overflow when handling slices #15639
Conversation
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.
There is a similar issue in list_ass_subscript
. Could you pleas check and fix all other occurrences of cur +=
?
Misc/NEWS.d/next/Core and Builtins/2019-09-02-16-17-42.bpo-36946._lAuSR.rst
Outdated
Show resolved
Hide resolved
I have checked all of |
def test_step_overflow(self): | ||
a = [0, 1, 2, 3, 4] | ||
a[1::sys.maxsize] = [0] | ||
self.assertEqual(a[3::sys.maxsize], [3]) |
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.
Maybe add also the assertion for the whole list after modification?
self.assertEqual(a, [...])
Thanks @hongweipeng for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
GH-15729 is a backport of this pull request to the 3.7 branch. |
…ythonGH-15639) This is a complement to PR 13375. (cherry picked from commit 3c87a66) Co-authored-by: HongWeipeng <[email protected]>
…H-15639) This is a complement to PR 13375. (cherry picked from commit 3c87a66) Co-authored-by: HongWeipeng <[email protected]>
…ythonGH-15639) This is a complement to PR 13375.
…ythonGH-15639) This is a complement to PR 13375.
…ythonGH-15639) This is a complement to PR 13375.
This is a complement to that PR #13375 .
https://bugs.python.org/issue36946