[Numpy-tickets] [NumPy] #658: Segfault on reshape

NumPy numpy-tickets@scipy....
Tue Feb 12 07:13:13 CST 2008


#658: Segfault on reshape
------------------------+---------------------------------------------------
 Reporter:  stefan      |       Owner:  somebody
     Type:  defect      |      Status:  new     
 Priority:  normal      |   Milestone:  1.0.5   
Component:  numpy.core  |     Version:  none    
 Severity:  normal      |    Keywords:          
------------------------+---------------------------------------------------
 {{{
 import numpy as np
 np.indices((0,3,4)).T.reshape(-1,3)
 }}}

 {{{
 ==10171== 233675 errors in context 93 of 95:
 ==10171== Invalid read of size 4
 ==10171==    at 0x4550E79: PyArray_Newshape (multiarraymodule.c:516)
 ==10171==    by 0x4551B17: array_reshape (arraymethods.c:87)
 ==10171==    by 0x80C8EEB: PyEval_EvalFrameEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA114: PyEval_EvalCodeEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA186: PyEval_EvalCode (in /usr/bin/python2.5)
 ==10171==    by 0x80E9697: PyRun_FileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x80E9926: PyRun_SimpleFileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x805938F: Py_Main (in /usr/bin/python2.5)
 ==10171==    by 0x80588C1: main (in /usr/bin/python2.5)
 ==10171==  Address 0x59A3F50 is 0 bytes after a block of size 8 alloc'd
 ==10171==    at 0x4022765: malloc (vg_replace_malloc.c:149)
 ==10171==    by 0x453885E: PyArray_IntpConverter (multiarraymodule.c:4549)
 ==10171==    by 0x4551AF9: array_reshape (arraymethods.c:79)
 ==10171==    by 0x80C8EEB: PyEval_EvalFrameEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA114: PyEval_EvalCodeEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA186: PyEval_EvalCode (in /usr/bin/python2.5)
 ==10171==    by 0x80E9697: PyRun_FileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x80E9926: PyRun_SimpleFileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x805938F: Py_Main (in /usr/bin/python2.5)
 ==10171==    by 0x80588C1: main (in /usr/bin/python2.5)
 ==10171==
 ==10171== 639859 errors in context 94 of 95:
 ==10171== Conditional jump or move depends on uninitialised value(s)
 ==10171==    at 0x4550E8A: PyArray_Newshape (multiarraymodule.c:515)
 ==10171==    by 0x4551B17: array_reshape (arraymethods.c:87)
 ==10171==    by 0x80C8EEB: PyEval_EvalFrameEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA114: PyEval_EvalCodeEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA186: PyEval_EvalCode (in /usr/bin/python2.5)
 ==10171==    by 0x80E9697: PyRun_FileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x80E9926: PyRun_SimpleFileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x805938F: Py_Main (in /usr/bin/python2.5)
 ==10171==    by 0x80588C1: main (in /usr/bin/python2.5)
 ==10171== 639859 errors in context 95 of 95:
 ==10171==
 ==10171== Conditional jump or move depends on uninitialised value(s)
 ==10171==    at 0x4550E82: PyArray_Newshape (multiarraymodule.c:514)
 ==10171==    by 0x4551B17: array_reshape (arraymethods.c:87)
 ==10171==    by 0x80C8EEB: PyEval_EvalFrameEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA114: PyEval_EvalCodeEx (in /usr/bin/python2.5)
 ==10171==    by 0x80CA186: PyEval_EvalCode (in /usr/bin/python2.5)
 ==10171==    by 0x80E9697: PyRun_FileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x80E9926: PyRun_SimpleFileExFlags (in /usr/bin/python2.5)
 ==10171==    by 0x805938F: Py_Main (in /usr/bin/python2.5)
 ==10171==    by 0x80588C1: main (in /usr/bin/python2.5)
 }}}

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


More information about the Numpy-tickets mailing list