[Numpy-discussion] How to debug reference counting errors

Richard Hattersley rhattersley@gmail....
Fri Aug 31 03:08:02 CDT 2012


Hi,

re: valgrind - to get better results you might try the suggestions from:
http://svn.python.org/projects/python/trunk/Misc/README.valgrind

Richard

On 31 August 2012 09:03, Ondřej Čertík <ondrej.certik@gmail.com> wrote:

> Hi,
>
> There is segfault reported here:
>
> http://projects.scipy.org/numpy/ticket/1588
>
> I've managed to isolate the problem and even provide a simple patch,
> that fixes it here:
>
> https://github.com/numpy/numpy/issues/398
>
> however the patch simply doesn't decrease the proper reference, so it
> might leak. I've used
> bisection (took the whole evening unfortunately...) but the good news
> is that I've isolated commits
> that actually broke it. See the github issue #398 for details, diffs etc.
>
> Unfortunately, it's 12 commits from Mark and the individual commits
> raise exception on the segfaulting code,
> so I can't pin point the problem further.
>
> In general, how can I debug this sort of problem? I tried to use
> valgrind, with a debugging build of numpy,
> but it provides tons of false (?) positives:
> https://gist.github.com/3549063
>
> Mark, by looking at the changes that broke it, as well as at my "fix",
> do you see where the problem could be?
>
> I suspect it is something with the changes in PyArray_FromAny() or
> PyArray_FromArray() in ctors.c.
> But I don't see anything so far that could cause it.
>
> Thanks for any help. This is one of the issues blocking the 1.7.0 release.
>
> Ondrej
> _______________________________________________
> NumPy-Discussion mailing list
> NumPy-Discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20120831/a500f952/attachment.html 


More information about the NumPy-Discussion mailing list