[Numpy-tickets] [NumPy] #329: Memory error array deallocation on 64-bit platforms

NumPy numpy-tickets at scipy.net
Mon Oct 9 16:17:51 CDT 2006


#329: Memory error array deallocation on 64-bit platforms
------------------------+---------------------------------------------------
 Reporter:  stefan      |       Owner:  oliphant   
     Type:  defect      |      Status:  new        
 Priority:  normal      |   Milestone:  1.0 Release
Component:  numpy.core  |     Version:             
 Severity:  normal      |    Keywords:             
------------------------+---------------------------------------------------
 While running

 {{{
 import numpy as N
 N.eye((128))
 }}}

 on a 64-bit machine, Valgrind complained:

 {{{
 ==18199== Invalid read of size 4
 ==18199==    at 0x43CFC6: PyObject_Free (in /usr/bin/python2.4)
 ==18199==    by 0x582179D: arraymultiter_dealloc (arrayobject.c:10352)
 ==18199==    by 0x584AA52: _broadcast_cast (arrayobject.c:7510)
 ==18199==    by 0x584D10C: PyArray_FromArray (arrayobject.c:7851)
 ==18199==    by 0x5842C05: PyArray_FromAny (arrayobject.c:8257)
 ==18199==    by 0x599A8A7: construct_loop (ufuncobject.c:856)
 ==18199==    by 0x599B5BF: PyUFunc_GenericFunction (ufuncobject.c:1475)
 ==18199==    by 0x599C6BF: ufunc_generic_call (ufuncobject.c:2786)
 ==18199==    by 0x41448F: PyObject_Call (in /usr/bin/python2.4)
 ==18199==    by 0x475DE4: PyEval_EvalFrame (in /usr/bin/python2.4)
 ==18199==  Address 0x6F31020 is 56 bytes inside a block of size 1,344
 free'd
 ==18199==    at 0x4A1A5B3: free (vg_replace_malloc.c:235)
 ==18199==    by 0x582179D: arraymultiter_dealloc (arrayobject.c:10352)
 ==18199==    by 0x584AA52: _broadcast_cast (arrayobject.c:7510)
 ==18199==    by 0x584D10C: PyArray_FromArray (arrayobject.c:7851)
 ==18199==    by 0x5842C05: PyArray_FromAny (arrayobject.c:8257)
 ==18199==    by 0x599A8A7: construct_loop (ufuncobject.c:856)
 ==18199==    by 0x599B5BF: PyUFunc_GenericFunction (ufuncobject.c:1475)
 ==18199==    by 0x599C6BF: ufunc_generic_call (ufuncobject.c:2786)
 ==18199==    by 0x41448F: PyObject_Call (in /usr/bin/python2.4)
 ==18199==    by 0x475DE4: PyEval_EvalFrame (in /usr/bin/python2.4)
 unhandled opc_aux = 0x7
 first_opcode == 0xDD
 vex amd64->IR: unhandled instruction bytes: 0xDD 0x7C 0x24 0xFC
 }}}

 This doesn't happen for ```N.eye((127))```.

 Numpy version is r3294.

-- 
Ticket URL: <http://projects.scipy.org/scipy/numpy/ticket/329>
NumPy <http://projects.scipy.org/scipy/numpy>
The fundamental package needed for scientific computing with Python.


More information about the Numpy-tickets mailing list