[Numpy-tickets] [NumPy] #378: NumPy or Python crashing with segfault

NumPy numpy-tickets at scipy.net
Thu Nov 16 18:28:37 CST 2006


#378: NumPy or Python crashing with segfault
--------------------------------+-------------------------------------------
 Reporter:  tecki               |        Owner:  somebody
     Type:  defect              |       Status:  closed  
 Priority:  normal              |    Milestone:          
Component:  numpy.core          |      Version:          
 Severity:  normal              |   Resolution:  fixed   
 Keywords:  segfault vectorize  |  
--------------------------------+-------------------------------------------
Changes (by oliphant):

  * status:  reopened => closed
  * resolution:  => fixed

Comment:

 Thanks for this detective work.  Getting the reference counting of OBJECT
 arrays right in the buffered section of the ufunc loop is certainly
 challenging.  I thought I had accounted for the cases.  Look in
 numpy/numpy/doc/ufunc.txt for some of the explanation.

 At any rate.  Using Py_CLEAR certaintly doesn't hurt as the object in the
 casting buffer should not
 be re-used anyway and it seems to help.  Perhaps what is happening, is
 that when the buffer is re-used it is not filling up and a new decref is
 being performed on an "un-copied" object.

 So, I've accepted and applied the changes.  I changed both XDECREF's in
 that section of code to CLEAR.

 Thanks very much,

 Travis

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


More information about the Numpy-tickets mailing list