On 2011-05-23 18:14, Jeroen Demeyer wrote:
> It is well known that Cython may "ignore" exceptions when they are
> raised in cdef functions without "except" value.  However, when working
> on #7794, we got messages like the following:
> 
> Exception KeyboardInterrupt in 0 ignored

I have tracked this down to the following Cython-generated code in
sage/rings/polynomial/polynomial_zmod_flint.c:

static void
__pyx_tp_dealloc_4sage_5rings_10polynomial_21polynomial_zmod_flint_Polynomial_template(PyObject
*o) {
  {
    PyObject *etype, *eval, *etb;
    PyErr_Fetch(&etype, &eval, &etb);
    ++Py_REFCNT(o);

__pyx_pf_4sage_5rings_10polynomial_21polynomial_zmod_flint_19Polynomial_template_3__dealloc__(o);
    if (PyErr_Occurred()) PyErr_WriteUnraisable(o);
    --Py_REFCNT(o);
    PyErr_Restore(etype, eval, etb);
  }

__pyx_ptype_4sage_5rings_10polynomial_18polynomial_element_Polynomial->tp_dealloc(o);
}

The problem is the line
if (PyErr_Occurred()) PyErr_WriteUnraisable(o);

Since this code is generated by Cython, perhaps it is not possible to
solve this problem without patching Cython.


Jeroen.

-- 
To post to this group, send an email to [email protected]
To unsubscribe from this group, send an email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/sage-devel
URL: http://www.sagemath.org

Reply via email to