]> granicus.if.org Git - python/commitdiff
Issue #18004: test_overflow in test_list by mistake consumed 40 GiB of memory
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 6 Aug 2014 15:31:54 +0000 (18:31 +0300)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 6 Aug 2014 15:31:54 +0000 (18:31 +0300)
on 64-bit systems.

Lib/test/test_list.py
Misc/NEWS

index 6e080dc342e49d100b5aa2c2d23a20bf6f0be035..25ecf4965efc33a5efa1c95fb5147127f9d5209b 100644 (file)
@@ -53,7 +53,7 @@ class ListTest(list_tests.CommonTest):
 
     def test_overflow(self):
         lst = [4, 5, 6, 7]
-        n = int((sys.maxint*2+2) // len(lst))
+        n = int((sys.maxsize*2+2) // len(lst))
         def mul(a, b): return a * b
         def imul(a, b): a *= b
         self.assertRaises((MemoryError, OverflowError), mul, lst, n)
index 80da2e6fb70129aaa44d9b51a539bc2f4a7569ad..34269ac194483807e45462868d100948bea7c5d5 100644 (file)
--- a/Misc/NEWS
+++ b/Misc/NEWS
@@ -74,6 +74,9 @@ Library
 Tests
 -----
 
+- Issue #18004: test_overflow in test_list by mistake consumed 40 GiB of memory
+  on 64-bit systems.
+
 - Issue #21976: Fix test_ssl to accept LibreSSL version strings.  Thanks
   to William Orr.