[Numpy-discussion] fromfile (binary) double free or corruption
Travis E. Oliphant
oliphant at enthought.com
Sun Mar 2 11:36:05 EST 2008
Scott Ransom wrote:
>
>
> Seems like the bad call is the Py_DECREF(ret); on line 6316 of
> multiarraymodule.c, which occurs just after a PyDataMem_RENEW()
> (i.e. realloc) call.
>
> I tried to find recent changes in svn that might have caused this,
> but couldn't see anything that seemed relevant. One thing that
> has changed recently on my system is that I'm now using the new
> glibc (v2.7) on Debian unstable.
>
This looks like the behavior of realloc has changed when called with 0
as the size. We should avoid calling realloc with a size of 0 as it
looks like the behavior is different depending on libc.
Please check out the latest SVN and see if my fix improves things.
-Travis O.
More information about the NumPy-Discussion
mailing list