mirror of
https://github.com/python/cpython.git
synced 2025-12-15 21:44:50 +00:00
bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639)
This is a complement to PR 13375.
This commit is contained in:
parent
32a960f8e1
commit
3c87a667bb
4 changed files with 12 additions and 3 deletions
|
|
@ -150,6 +150,11 @@ class ListTest(list_tests.CommonTest):
|
|||
a[:] = data
|
||||
self.assertEqual(list(it), [])
|
||||
|
||||
def test_step_overflow(self):
|
||||
a = [0, 1, 2, 3, 4]
|
||||
a[1::sys.maxsize] = [0]
|
||||
self.assertEqual(a[3::sys.maxsize], [3])
|
||||
|
||||
def test_no_comdat_folding(self):
|
||||
# Issue 8847: In the PGO build, the MSVC linker's COMDAT folding
|
||||
# optimization causes failures in code that relies on distinct
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue