2008/5/28 Keith Goodman <[EMAIL PROTECTED]>: > Does anyone else get this seg fault? > >>> def fn(): > x = np.random.rand(5,2) > x.cumsum(None, out=x) > return x > ....: >>> fn() > *** glibc detected *** /usr/bin/python: double free or corruption > (out): 0x08212dc8 *** > > I'm running 1.0.4 from Debian Lenny with python 2.5.2 compiled with > gcc 4.2.3-3, if that matters.
Yeap, big bada-boom. Well caught! ==28547== Source and destination overlap in memcpy(0x5B83198, 0x5B83198, 8) ==28547== at 0x4C2508B: memcpy (mc_replace_strmem.c:402) ==28547== by 0x60C2574: PyUFunc_GenericReduction (ufuncobject.c:2758) ==28547== by 0x417E72: PyObject_Call (abstract.c:1861) ==28547== by 0x5E5AD22: PyArray_GenericAccumulateFunction (arrayobject.c:3531) ==28547== by 0x5E76031: PyArray_CumSum (multiarraymodule.c:991) ==28547== by 0x5E7611C: array_cumsum (arraymethods.c:1533) ==28547== by 0x417E72: PyObject_Call (abstract.c:1861) ==28547== by 0x4860E9: PyEval_EvalFrameEx (ceval.c:3784) ==28547== by 0x488B76: PyEval_EvalFrameEx (ceval.c:3659) ==28547== by 0x48A375: PyEval_EvalCodeEx (ceval.c:2836) ==28547== Invalid write of size 8 ==28547== at 0x60B6362: DOUBLE_add (umathmodule.c.src:1019) ==28547== by 0x60C25A3: PyUFunc_GenericReduction (ufuncobject.c:2762) ==28547== by 0x417E72: PyObject_Call (abstract.c:1861) ==28547== by 0x5E5AD22: PyArray_GenericAccumulateFunction (arrayobject.c:3531) ==28547== by 0x5E76031: PyArray_CumSum (multiarraymodule.c:991) ==28547== by 0x5E7611C: array_cumsum (arraymethods.c:1533) ==28547== by 0x417E72: PyObject_Call (abstract.c:1861) ==28547== by 0x4860E9: PyEval_EvalFrameEx (ceval.c:3784) ==28547== by 0x488B76: PyEval_EvalFrameEx (ceval.c:3659) ==28547== by 0x48A375: PyEval_EvalCodeEx (ceval.c:2836) Cheers Stéfan _______________________________________________ Numpy-discussion mailing list [email protected] http://projects.scipy.org/mailman/listinfo/numpy-discussion
