[Numpy-tickets] [NumPy] #570: Vectorize leaks

NumPy numpy-tickets@scipy....
Sat Oct 6 19:34:26 CDT 2007


#570: Vectorize leaks
-----------------------------+----------------------------------------------
 Reporter:  albertstrasheim  |        Owner:  somebody     
     Type:  defect           |       Status:  new          
 Priority:  normal           |    Milestone:  1.0.4 Release
Component:  numpy.core       |      Version:  none         
 Severity:  normal           |   Resolution:               
 Keywords:                   |  
-----------------------------+----------------------------------------------
Comment (by stefan):

 More vectorize fun:

 {{{
 from numpy import *
 vectorize(lambda x: "%5.3g" % x)(ones((2,2,2)))
 }}}

 {{{
 ==15041== Invalid write of size 1
 ==15041==    at 0x4024429: memcpy (mc_replace_strmem.c:406)
 ==15041==    by 0x4948A20: STRING_setitem (arraytypes.inc.src:400)
 ==15041==    by 0x4949188: OBJECT_to_STRING (arraytypes.inc.src:792)
 ==15041==    by 0x495A33C: PyArray_CastTo (arrayobject.c:7734)
 ==15041==    by 0x495A49E: PyArray_CastToType (arrayobject.c:7507)
 ==15041==    by 0x4963DA8: array_cast (arraymethods.c:667)
 ==15041==    by 0x80C8EEB: PyEval_EvalFrameEx (in /usr/bin/python2.5)
 ==15041==    by 0x80CA114: PyEval_EvalCodeEx (in /usr/bin/python2.5)
 ==15041==    by 0x81123C0: (within /usr/bin/python2.5)
 ==15041==    by 0x805C9E6: PyObject_Call (in /usr/bin/python2.5)
 }}}

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


More information about the Numpy-tickets mailing list