#9129: sqrt memory leaks
--------------------------------+-------------------------------------------
   Reporter:  zimmerma          |       Owner:  AlexGhitza
       Type:  defect            |      Status:  new       
   Priority:  critical          |   Milestone:  sage-4.5  
  Component:  basic arithmetic  |    Keywords:            
     Author:                    |    Upstream:  N/A       
   Reviewer:                    |      Merged:            
Work_issues:                    |  
--------------------------------+-------------------------------------------

Comment(by zimmerma):

 with the following code in Sage 4.4.4:
 {{{
 for i in range(10^4):
    a=Mod(2^32+1,3).sqrt()
 }}}
 valgrind says:
 {{{
 ==6861== 5,312,296 bytes in 9,911 blocks are possibly lost in loss record
 6,212\
  of 6,212
 ==6861==    at 0x4A0515D: malloc (vg_replace_malloc.c:195)
 ==6861==    by 0x4D1E1B8: _PyObject_GC_Malloc (gcmodule.c:1351)
 ==6861==    by 0x4D1E2AD: _PyObject_GC_NewVar (gcmodule.c:1383)
 ==6861==    by 0x4C78F80: PyFrame_New (frameobject.c:642)
 ==6861==    by 0x4CF0324: PyEval_EvalCodeEx (ceval.c:2755)
 ==6861==    by 0x4C7997A: function_call (funcobject.c:524)
 ==6861==    by 0x4C4EA72: PyObject_Call (abstract.c:2492)
 ==6861==    by 0x4C5F0DE: instancemethod_call (classobject.c:2579)
 ==6861==    by 0x4C4EA72: PyObject_Call (abstract.c:2492)
 ==6861==    by 0x4CE9022: PyEval_CallObjectWithKeywords (ceval.c:3575)
 ==6861==    by 0x1E356FA6:
 __pyx_pf_4sage_9structure_7factory_13UniqueFactory__\
 _call__ (factory.c:877)
 ==6861==    by 0x4C4EA72: PyObject_Call (abstract.c:2492)
 ==6861==    by 0x4CAD893: slot_tp_call (typeobject.c:5378)
 ==6861==    by 0x4C4EA72: PyObject_Call (abstract.c:2492)
 ==6861==    by 0x1BCC2AC6:
 __pyx_pf_4sage_5rings_12finite_rings_11integer_mod_1\
 9IntegerMod_abstract_sqrt (integer_mod.c:6959)
 ==6861==    by 0x4C4EA72: PyObject_Call (abstract.c:2492)
 ==6861==    by 0x4CE9022: PyEval_CallObjectWithKeywords (ceval.c:3575)
 ==6861==    by 0x4C6926B: methoddescr_call (descrobject.c:246)
 ==6861==    by 0x4C4EA72: PyObject_Call (abstract.c:2492)
 ==6861==    by 0x4CE9022: PyEval_CallObjectWithKeywords (ceval.c:3575)
 ==6861==    by 0x1BCA21A8:
 __pyx_pf_4sage_5rings_12finite_rings_11integer_mod_1\
 4IntegerMod_int_sqrt (integer_mod.c:18128)
 ==6861==    by 0x4CEEEDE: PyEval_EvalFrameEx (ceval.c:3706)
 ==6861==    by 0x4CF0B44: PyEval_EvalCodeEx (ceval.c:2968)
 ==6861==    by 0x4CF0C11: PyEval_EvalCode (ceval.c:522)
 ==6861==    by 0x4CF0287: PyEval_EvalFrameEx (ceval.c:4401)
 }}}
 Does it say something to somebody fluent in Pyrex?

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