[Python-checkins] r60793 - in python/branches/release25-maint: Include/pymem.h Include/pyport.h Lib/test/test_array.py Lib/test/test_struct.py Misc/NEWS Modules/_csv.c Modules/_struct.c Modules/arraymodule.c Modules/audioop.c Modules/binascii.c M

Neal Norwitz nnorwitz at gmail.com
Thu Feb 14 19:45:50 CET 2008


On Thu, Feb 14, 2008 at 5:40 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> martin.v.loewis wrote:
>  > Modified: python/branches/release25-maint/Lib/test/test_array.py
>  > ==============================================================================
>  > --- python/branches/release25-maint/Lib/test/test_array.py    (original)
>  > +++ python/branches/release25-maint/Lib/test/test_array.py    Thu Feb 14 12:26:18 2008
>  > @@ -975,6 +975,23 @@
>  >  class DoubleTest(FPTest):
>  >      typecode = 'd'
>  >      minitemsize = 8
>  > +
>  > +    def test_alloc_overflow(self):
>  > +        a = array.array('d', [-1]*65536)
>  > +        try:
>  > +            a *= 65536
>  > +        except MemoryError:
>  > +            pass
>  > +        else:
>  > +            self.fail("a *= 2**16 didn't raise MemoryError")
>  > +        b = array.array('d', [ 2.71828183, 3.14159265, -1])
>  > +        try:
>  > +            b * 1431655766
>  > +        except MemoryError:
>  > +            pass
>  > +        else:
>  > +            self.fail("a * 1431655766 didn't raise MemoryError")
>  > +
>
>  Will those tests necessarily work properly on a 64-bit machine? The
>  sizes being tested seem very 32-bit-ish (and the relevant arraymodule
>  code seems to adjust dynamically to the larger 64-bit address space).

I don't know if it's related or not, but it seems a bunch of buildbots
crashed after this checkin.  It would be great if someone could look
into this (assuming it hasn't already been fixed).

n


More information about the Python-checkins mailing list