#14625: lrcalc calls exit()
----------------------------------+-----------------------------------------
   Reporter:  thansen             |             Owner:  jdemeyer                
                      
       Type:  defect              |            Status:  new                     
                      
   Priority:  major               |         Milestone:  sage-5.10               
                      
  Component:  packages: standard  |          Keywords:  spkg, library           
                      
Work issues:                      |   Report Upstream:  Reported upstream. 
Developers acknowledge bug.
  Reviewers:                      |           Authors:                          
                      
  Merged in:                      |      Dependencies:                          
                      
   Stopgaps:                      |  
----------------------------------+-----------------------------------------
 While packaging lrcalc for Debian, our qa tool lintian detected that the
 lrcalc library is calling exit(). And indeed, it calls exit and shuts down
 Sage every time it runs out of memory, in mathlib/alloc.c.

 We already discussed this with the upstream author Anders Skovsted Buch
 and with Nicolas ThiƩry. It's a bug in lrcalc, but since Anders has no
 time to fix it, one could fix it in Sage first. Normally one would make
 the library report an error and let the program using the library handle
 it. The problem is that lrcalc does not free its memory and returns to a
 clean state after an error. Anders says this would be difficult to
 achieve. A workaround would be to perform each calculation in a new thread
 that is thrown away in the case of an error.


 Version: 1.1.6

 Steps to reproduce:

 Limit the memory for this shell to 900 MB so the memory will quickly be
 full:[[BR]]
 ulimit -Sv 900000

 Start Sage and run a lrcalc command that needs a lot of memory:[[BR]]
 sage[[BR]]
 sage: import sage.libs.lrcalc.lrcalc as lrcalc[[BR]]
 sage: sage.libs.lrcalc.lrcalc.mult([20, 19, 18, 17, 16, 15, 14, 13, 12,
 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1], [20, 19, 18, 17, 16, 15, 14, 13, 12,
 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1])

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/14625>
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 unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to