[Numpy-tickets] [NumPy] #273: crash in broadcast code (segfault)

NumPy numpy-tickets at scipy.net
Wed Sep 6 09:06:55 CDT 2006


#273: crash in broadcast code (segfault)
------------------------------+---------------------------------------------
 Reporter:  benjamin.thyreau  |       Owner:  somebody
     Type:  defect            |      Status:  new     
 Priority:  high              |   Milestone:          
Component:  numpy.core        |     Version:  devel   
 Severity:  major             |    Keywords:          
------------------------------+---------------------------------------------
 Hi..
 Just found a crash condition.
 {{{
 $ cat crash.py
 from numpy import *
 print __version__
 a = zeros((3, 1), int)
 a[[1,2]] = 1

 $ python crash.py
 1.0rc1.dev3124
 Erreur de segmentation
 }}}

 According to valgrind :
 {{{
 ==17992== Process terminating with default action of signal 11 (SIGSEGV)
 ==17992==  Access not within mapped region at address 0x4
 ==17992==    at 0x454FAC9: PyArray_BroadcastToShape (arrayobject.c:8694)
 ==17992==    by 0x4583563: array_ass_sub (arrayobject.c:2417)
 ==17992==    by 0x80B20DE: PyEval_EvalFrame (ceval.c:1474)
 }}}

 The example wouldn't crash if the a array were (3,)-shaped
 Thanks!

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


More information about the Numpy-tickets mailing list