[NumPy-Tickets] [NumPy] #1464: numpy.set_numeric_ops causes double free

NumPy Trac numpy-tickets@scipy....
Sun Apr 25 13:33:15 CDT 2010


#1464: numpy.set_numeric_ops causes double free
-------------------------+--------------------------------------------------
  Reporter:  mras        |       Owner:  somebody       
      Type:  defect      |      Status:  closed         
  Priority:  normal      |   Milestone:                 
 Component:  numpy.core  |     Version:  devel          
Resolution:  fixed       |    Keywords:  set_numeric_ops
-------------------------+--------------------------------------------------

Comment(by mras):

 Replying to [comment:1 pv]:
 > Thanks, yes, the old code looks incorrect.
 >
 > Fixed in r8364

 Thanks for the quick response.

 I subsequently did a search for other calls to PyDict_GetItemString in the
 source code and I think the following (from
 numpy/core/src/umath/umathmodule.c.src) might be incorrect as well:
 {{{
 229 #if defined(NPY_PY3K)
 230     f = PyDict_GetItemString(dictionary, "true_divide");
 231     PyDict_SetItemString(dictionary, "divide", f);
 232     Py_DECREF(f);
 233 #endif
 }}}

 I don't have py3k installed though, just figured it was worth mentioning.

-- 
Ticket URL: <http://projects.scipy.org/numpy/ticket/1464#comment:2>
NumPy <http://projects.scipy.org/numpy>
My example project


More information about the NumPy-Tickets mailing list