#9345: Unhandled SIGFPE in rational_reconstruction if the modulus is zero
-----------------------------------------+----------------------------------
   Reporter:  lftabera                   |       Owner:  AlexGhitza  
       Type:  defect                     |      Status:  needs_review
   Priority:  major                      |   Milestone:  sage-4.6    
  Component:  algebra                    |    Keywords:              
     Author:  Luis Felipe Tabera Alonso  |    Upstream:  N/A         
   Reviewer:  Minh Van Nguyen            |      Merged:              
Work_issues:                             |  
-----------------------------------------+----------------------------------
Changes (by jdemeyer):

  * milestone:  sage-4.5.3 => sage-4.6


Comment:

 Replying to [comment:7 lftabera]:
 > Note that if the exception is controlled by _sig, it will raise a
 RuntimeError instead of ZeroDivisionError. Moreover, with the patch I
 provided, all ocurrences of being zero are catched and never reaches the C
 functions.
 I agree that your patch fixes the problem of division by zero, that wasn't
 my point.  My point was that, '''in addition''' you should add _sig_on and
 _sig_off to make the code more robust (for example, against crtl+C).

 > Anyway, I have written a second patch that add the _sig_on, _sig_off to
 the problematic functions, so if they have to be added, apply the
 following patches (in order):
 >
 > trac_9345.3.patch
 > trac-9345-sigs.patch
 Well, the _sig_on and _sig_off are in the wrong places (_sig_on should be
 before any mpz or mpq function is called and _sig_off after). I can have a
 look at this if you want.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9345#comment:8>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sage-trac?hl=en.

Reply via email to