[Cython] segfault in 'async def' coroutines
Yury Selivanov
yselivanov.ml at gmail.com
Sat May 14 19:32:53 EDT 2016
I've just discovered that same thing has to be fixed for
__name__.
On 2016-05-14 5:31 PM, Yury Selivanov wrote:
> Hi,
>
> Under some circumstances, in asyncio code that runs in uvloop [1],
> cython code segfaults in cython/Cython/Utility/Coroutine.c:
>
>
> static PyObject *
> __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
> {
> Py_INCREF(self->gi_qualname);
> return self->gi_qualname;
> }
>
>
> "self->gi_qualname" can be NULL. The correct code is probably:
>
>
> __Pyx_Coroutine_get_qualname(__pyx_CoroutineObject *self)
> {
> if (self->gi_qualname == NULL) { return __pyx_empty_unicode; }
> Py_INCREF(self->gi_qualname);
> return self->gi_qualname;
> }
>
>
> Thanks,
> Yury
More information about the cython-devel
mailing list