[Numpy-discussion] Bug in numpy user-define types mechanism causes segfault on multiple calls to a ufunc
Wed Feb 7 17:38:41 CST 2007
Many thanks, Travis. I'll test the new version tonight.
On 2/7/07, Travis Oliphant <email@example.com> wrote:
> Tom Denniston wrote:
> >I am trying to register a custom type to numpy. When I do so it works
> >and the ufuncs work but then when I invoke any ufunc twice the second
> >time my python interpretter segfaults. I think i know what the
> >problem is. In the select_types method in ufuncobject.c in
> >numpy/core/src/ numpy gets a reference to the key for the loop via a
> Thank you very much for your review of this less-used code.
> >If I comment out the obj DECREF it works. I think one needs to either
> >do that or add an INCREF right after retrieving key. I think either
> >will work but the multithreading implications are different. I don't
> >think it matters give that (I believe) numpy doesn't release the GIL
> >but I thought someone on this list would be a better judge than I
> >(maybe Travis) of what the correct fix should be.
> >Am I correct in my analysis?
> Your analysis seems spot on. I think removing the is the right course
> of action. I've done it in SVN.
> Numpy-discussion mailing list
More information about the Numpy-discussion