#11771: sage crashes on some degenerate flint xgcd's
--------------------------------+-------------------------------------------
   Reporter:  lftabera          |          Owner:  AlexGhitza                  
       Type:  defect            |         Status:  new                         
   Priority:  critical          |      Milestone:  sage-4.7.2                  
  Component:  basic arithmetic  |       Keywords:  flint, crash, xgcd fmpq_poly
Work_issues:                    |       Upstream:  N/A                         
   Reviewer:                    |         Author:                              
     Merged:                    |   Dependencies:                              
--------------------------------+-------------------------------------------

Comment(by leif):

 Replying to [comment:15 leif]:
 > It seems the memory allocated for `temp` is insufficient [...]

 > Which would mean the bug is in `fmpq_poly`, not FLINT.

 Yep, increasing `limbs` by five the example runs without errors, though I
 get:
 {{{
 ...
 ==6537== HEAP SUMMARY:
 ==6537==     in use at exit: 160,209 bytes in 7 blocks
 ==6537==   total heap usage: 143,815 allocs, 143,808 frees, 261,851,498
 bytes allocated
 ==6537==
 ==6537== LEAK SUMMARY:
 ==6537==    definitely lost: 72,129 bytes in 3 blocks
 ==6537==    indirectly lost: 0 bytes in 0 blocks
 ==6537==      possibly lost: 80,000 bytes in 1 blocks
 ==6537==    still reachable: 8,080 bytes in 3 blocks
 ==6537==         suppressed: 0 bytes in 0 blocks
 ==6537== Rerun with --leak-check=full to see details of leaked memory
 ==6537==
 ==6537== For counts of detected and suppressed errors, rerun with: -v
 ==6537== Use --track-origins=yes to see where uninitialised values come
 from
 ==6537== ERROR SUMMARY: 6 errors from 2 contexts (suppressed: 2 from 2)
 }}}

 I don't know what the correct size for `temp` should be in general though;
 perhaps you (Luis) know better, or Sebastian can fix this.


 At least it's good to know that the memory corruption doesn't happen
 elsewhere in Sage, and also isn't caused by (upstream) FLINT.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11771#comment:16>
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