[Cython] PR on refcounting memoryview buffers

Sturla Molden sturla at molden.no
Wed Feb 20 11:55:51 CET 2013


Den 18. feb. 2013 kl. 19:32 skrev Sturla Molden <sturla at molden.no>:

> The problem this addresses is when GCC does not use atomic builtins and emits __synch_fetch_and_add_4 and __synch_fetch_and_sub_4 when Cython are internally refcounting memoryview buffers. For some reason it can even happen on x86 and amd64.
> 

Specifically, atomic builtins are not used when compiling for i386, which is MinGWs default target architecture (unless we specify a different -march). GCC will always encounter this problem when targeting i386.

Thus the correct fix is to use fallback when GCC is targeting i386 — not when GCC is targeting MS Windows. 

So I am closing this PR. But Mark's fix must be corrected, because it does not really address the problem (which is i386, not MinGW)! 

Sturla







More information about the cython-devel mailing list