Staging
v0.5.1
https://github.com/python/cpython
Revision f8e943f193a3b34f056d7b3a79b794d3b747685f authored by Tim Peters on 08 October 2002, 21:03:26 UTC, committed by Tim Peters on 08 October 2002, 21:03:26 UTC
        list(xrange(sys.maxint / 4))
test.  Changed 4 to 2.

The belief is that this test intended to trigger a bit of code in
listobject.c's NRESIZE macro that's looking for arithmetic overflow.  As
written, it doesn't achieve that, though, and leaves it up to the platform
realloc() as to whether it wants to allocate 2 gigabytes.  Some platforms
say "sure!", although they don't appear to mean it, and disaster ensues.

Changing 4 to 2 (just barely) manages to trigger the arithmetic overflow
test instead, leaving the platform realloc() out of it.
1 parent aff84f7
History
Tip revision: f8e943f193a3b34f056d7b3a79b794d3b747685f authored by Tim Peters on 08 October 2002, 21:03:26 UTC
The
Tip revision: f8e943f
File Mode Size
Demo
Doc
Grammar
Include
Lib
Mac
Misc
Modules
Objects
PC
PCbuild
Parser
Python
RISCOS
Tools
.cvsignore -rw-r--r-- 109 bytes
.hgtags -rw-r--r-- 2.3 KB
LICENSE -rw-r--r-- 12.3 KB
Makefile.pre.in -rw-r--r-- 25.9 KB
PLAN.txt -rw-r--r-- 14.1 KB
README -rw-r--r-- 41.7 KB
acconfig.h -rw-r--r-- 7.5 KB
configure -rwxr-xr-x 210.1 KB
configure.in -rw-r--r-- 55.0 KB
install-sh -rwxr-xr-x 5.5 KB
pyconfig.h.in -rw-r--r-- 19.6 KB
setup.py -rw-r--r-- 34.4 KB

README

back to top