From: Serhiy Storchaka Date: Wed, 6 Aug 2014 15:31:54 +0000 (+0300) Subject: Issue #18004: test_overflow in test_list by mistake consumed 40 GiB of memory X-Git-Tag: v2.7.9rc1~318 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a33c8436cdde808061977001da94489b7397456a;p=thirdparty%2FPython%2Fcpython.git Issue #18004: test_overflow in test_list by mistake consumed 40 GiB of memory on 64-bit systems. --- diff --git a/Lib/test/test_list.py b/Lib/test/test_list.py index 6e080dc342e4..25ecf4965efc 100644 --- a/Lib/test/test_list.py +++ b/Lib/test/test_list.py @@ -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) diff --git a/Misc/NEWS b/Misc/NEWS index 80da2e6fb701..34269ac19448 100644 --- 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.