#12313: Fix yet another memory leak caused by caching of coercion data
--------------------------------------------------+-------------------------
       Reporter:  SimonKing                       |         Owner:              
                             
           Type:  defect                          |        Status:  
needs_review                             
       Priority:  major                           |     Milestone:  sage-5.3    
                             
      Component:  memleak                         |    Resolution:              
                             
       Keywords:  coercion weak dictionary        |   Work issues:              
                             
Report Upstream:  N/A                             |     Reviewers:  Simon King, 
Jean-Pierre Flori, John Perry
        Authors:  Simon King, Jean-Pierre Flori   |     Merged in:              
                             
   Dependencies:  #11521, #11599, #12969, #12215  |      Stopgaps:              
                             
--------------------------------------------------+-------------------------

Comment (by SimonKing):

 Replying to [comment:213 nbruin]:
 > {{{
 > ...
 > ***Test Failed*** 18 failures.
 > removal on key ['Rational Field', "('z', 'y')", '2', 'False', 'Degree
 reverse lexicographic term order']
 > *** glibc detected *** python: double free or corruption (!prev):
 0x0000000006baaaa0 ***
 > ...
 > Unhandled SIGABRT: An abort() occurred in Sage.
 > }}}
 > That looks an awful lot like the kind of key that a polynomial ring
 constructor would get.

 Right! Could be a `BooleanPolynomialRing`, though.

 > So I guess it's just one of those `WeakCachedFunction` dictionaries
 again.

 Indeed, sage.rings.polynomial.polynomial_ring_constructor contains
 {{{
 import weakref
 _cache = weakref.WeakValueDictionary()
 }}}
 And guess who has introduced that line in #715 :-/

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