[Scipy-tickets] [SciPy] #364: signal.residue causes crash whenever denominator has repeated roots

SciPy scipy-tickets at scipy.net
Wed Jan 31 02:06:38 CST 2007


#364: signal.residue causes crash whenever denominator has repeated roots
--------------------------+-------------------------------------------------
 Reporter:  kumanna       |       Owner:  somebody            
     Type:  defect        |      Status:  new                 
 Priority:  highest       |   Milestone:                      
Component:  scipy.signal  |     Version:  0.5.2               
 Severity:  normal        |    Keywords:  signal residue crash
--------------------------+-------------------------------------------------
 Here's a session:

 {{{
 Python 2.4.4 (#2, Oct 20 2006, 00:23:25)
 [GCC 4.1.2 20061015 (prerelease) (Debian 4.1.1-16.1)] on linux2
 Type "help", "copyright", "credits" or "license" for more information.
 >>> from scipy import *
 >>> signal.residue([1], [1, 2, 1])
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
   File "/usr/lib/python2.4/site-packages/scipy/signal/signaltools.py",
 line 1056, in residue
     k,b = polydiv(b,a)
   File "/usr/lib/python2.4/site-packages/numpy/lib/polynomial.py", line
 401, in polydiv
     q = NX.zeros((m-n+1,), float)
 ValueError: negative dimensions are not allowed
 >>> signal.residue([0, 1], [1, 2, 1])
 *** glibc detected *** malloc(): memory corruption: 0x08404d90 ***

 Process Python aborted

 }}}

 And this happens whenever there are repeated roots. Please look into this.

 Of course, the dimension checking also may need to be looked at, but the
 crash is more serious.

 Thanks.

-- 
Ticket URL: <http://projects.scipy.org/scipy/scipy/ticket/364>
SciPy <http://www.scipy.org/>
SciPy is open-source software for mathematics, science, and engineering.


More information about the Scipy-tickets mailing list