[Numpy-tickets] [NumPy] #384: numpy.fft.fft segfaults when called with null of negative argument for size

NumPy numpy-tickets at scipy.net
Mon Nov 20 00:20:23 CST 2006


#384: numpy.fft.fft segfaults when called with null of negative argument for size
------------------------------+---------------------------------------------
 Reporter:  david cournapeau  |       Owner:  somebody
     Type:  defect            |      Status:  new     
 Priority:  normal            |   Milestone:          
Component:  Other             |     Version:          
 Severity:  minor             |    Keywords:          
------------------------------+---------------------------------------------
 I made a mistake in my code by giving an axis argument instead of the
 expected size argument in numpy.fft.fft: this resulted in segfault.

 {{{
 #!python
 from numpy import fft
 fft(random.randn(10, 2), 0)
 }}}

 ->segfaults

 {{{
 #!python
 from numpy import fft
 fft(random.randn(10, 2), -1)
 }}}

 ->100% CPU, and fails with floating point excetpion

 I understand the arguments does not make any sense, but would it be
 possible to detect this ?

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


More information about the Numpy-tickets mailing list