[Cython] Incompatibility with numpy-1.5.1 - fixed in master?!

Lisandro Dalcin dalcinl at gmail.com
Fri Apr 15 18:52:29 CEST 2011


On 15 April 2011 11:48, Yury V. Zaytsev <yury at shurup.com> wrote:
> On Fri, 2011-04-15 at 16:20 +0200, Yury V. Zaytsev wrote:
>
>> To my surprise I discovered that my code started working and I don't
>> have the buffer interface problem that I was facing before anymore.
>
> I am under impression that the culprit was this commit:
>
> Commit SHA1: dd3da6c283a0750c9c6514991be719ac064e79b4
> Commit message: PEP 3118: fix for NULL Py_buffer arg
> Committer: Lisandro Dalcin <dalcinl at gmail.com>  2011-04-08 00:25:45
>

This commit should be easy to cherry-pick and backport to latest
release. However, there is a potential risk that user code
implementing __getbuffer__ in extension classes do not make the check
"if info == NULL: return", and then you get a SEGFAULT. AFAIK, all
this business with Py_buffer pointer being NULL was added because of
some obscure bug in Python==3.0.x, but I would expect people out there
to be using Python >= 3.1.x, so not a big deal.


-- 
Lisandro Dalcin
---------------
CIMEC (INTEC/CONICET-UNL)
Predio CONICET-Santa Fe
Colectora RN 168 Km 472, Paraje El Pozo
3000 Santa Fe, Argentina
Tel: +54-342-4511594 (ext 1011)
Tel/Fax: +54-342-4511169


More information about the cython-devel mailing list