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

_______________________________________________
cython-devel mailing list
cython-devel@python.org
https://mail.python.org/mailman/listinfo/cython-devel

Reply via email to