[Scipy-tickets] [SciPy] #392: optimize.leastsq segfaults

SciPy scipy-tickets@scipy....
Sun Apr 8 02:06:04 CDT 2007


#392: optimize.leastsq segfaults
-----------------------------------------------+----------------------------
 Reporter:  pwuertz                            |        Owner:  somebody
     Type:  defect                             |       Status:  new     
 Priority:  normal                             |    Milestone:          
Component:  scipy.optimize                     |      Version:  0.5.2   
 Severity:  critical                           |   Resolution:          
 Keywords:  minpack optimize leastsq segfault  |  
-----------------------------------------------+----------------------------
Comment (by AJennings):

 Looks like a double DECREF on line 588, doesn't it.  Here's a patch to fix
 it:

 Index: Lib/optimize/__minpack.h
 ===================================================================
 --- Lib/optimize/__minpack.h    (revision 2900)
 +++ Lib/optimize/__minpack.h    (working copy)
 @@ -585,7 +585,6 @@
    else {
      Py_DECREF(ap_fvec);
      Py_DECREF(ap_fjac);
 -    Py_DECREF(ap_diag);
      Py_DECREF(ap_ipvt);
      Py_DECREF(ap_qtf);
      return Py_BuildValue("Ni",PyArray_Return(ap_x),info);

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


More information about the Scipy-tickets mailing list