On Jun 28, 2010, at 10:20 AM, luisfe wrote:
Hi,
I have found an unhandled SIGFPE in number_field_element_quadratic as
explained in ticket http://trac.sagemath.org/sage_trac/ticket/9357
Basically, sage does not check if a quadratic algebraic number is zero
when trying to invert it.
I added a trivial patch that checks if the zero element is being
inverted to rise a ZeroDivisionError. However, the error message
before the crash suggests that the compiled code is not properly
wrapped with _sig_on _sig_off.
In this example even if one adds this wrapper the zero check is
advisable, since _sing_on would rise a RuntimeError instead a
ZeroDivisionError, so it seems that the zero check is enough in this
case. On the other hand would the _sig_on stuff made the code more
robust? What is the way to proceed in this cases?
You did the right thing. The _sig_on and _sig_off are more about being
able to trap signals such as interrupts (so that control-C works).
- Robert
--
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