Andrew Straw | 20 Aug 11:04
Gravatar

[Cython] patch for bad buffer creation

Hi,

I tracked down an issue that was giving me segfaults with a poor 
__getbuffer__ implementation and modified the compiler to catch this case.

I couldn't figure out how to create an account on Trac, so instead of 
submitting a patch there, I'm just sending this email. Included is a 
testcase added to tests/run/bufaccess.pyx. This is a patch against 
cython-devel and I release this under the PSF license (like the rest of 
Cython).

I had to use "hg diff -b" to create this patch while ignoring whitespace 
because I have emacs configured to strip trailing whitespace, which 
caused lots of false positives on the code. So, hopefully, this patch 
will still apply cleanly.

(The patch also includes a tiny fix to the ErrorBuffer implementation in 
tests/run/bufaccess.pyx.)

-Andrew
Hi,

I tracked down an issue that was giving me segfaults with a poor 
__getbuffer__ implementation and modified the compiler to catch this case.

I couldn't figure out how to create an account on Trac, so instead of 
submitting a patch there, I'm just sending this email. Included is a 
testcase added to tests/run/bufaccess.pyx. This is a patch against 
cython-devel and I release this under the PSF license (like the rest of 
Cython).

I had to use "hg diff -b" to create this patch while ignoring whitespace 
because I have emacs configured to strip trailing whitespace, which 
caused lots of false positives on the code. So, hopefully, this patch 
will still apply cleanly.

(The patch also includes a tiny fix to the ErrorBuffer implementation in 
tests/run/bufaccess.pyx.)

-Andrew

Gmane