[Cython] test crash in Py3.2 (NumPy/memoryview/refcounting related?)

Stefan Behnel stefan_ml at behnel.de
Mon Apr 23 10:23:21 CEST 2012


mark florisson, 22.04.2012 16:41:
> On 22 April 2012 15:31, mark florisson wrote:
>> I think the problem here
>> is that a single memoryview object is traversed multiple times through
>> different traverse functions, and that the refcount doesn't match the
>> number of traverses. Indeed, the refcount is only one, as the actual
>> count is the acquisition count. So we shouldn't traverse the
>> memoryview objects in memoryview slices, i.e. not
>> _memoryviewslice.from_slice.memview. I'll come up with a commit
>> shortly, would you be willing to test it?
> 
> A fix is here: https://github.com/markflorisson88/cython/commit/cd32184f3f782b6d7275cf430694b59801ce642a
> 
> Lets see what jenkins has to say :)

Seems to like it.


> BTW, tp_clear calls Py_CLEAR on Py_buffer.obj, shouldn't it call
> releasebuffer instead?

Where is that? The memoryview class calls __Pyx_ReleaseBuffer() here.

BTW, why are some of the self arguments in MemoryView.pyx explicitly typed
as "memoryview"?

Stefan


More information about the cython-devel mailing list