#13447: Make libsingular multivariate polynomial rings collectable
-------------------------------------------------------+--------------------
       Reporter:  nbruin                               |         Owner:  rlm    
                       
           Type:  defect                               |        Status:  
needs_info                    
       Priority:  major                                |     Milestone:  
sage-5.4                      
      Component:  memleak                              |    Resolution:         
                       
       Keywords:                                       |   Work issues:  Input 
from libsingular experts
Report Upstream:  Reported upstream. No feedback yet.  |     Reviewers:         
                       
        Authors:                                       |     Merged in:         
                       
   Dependencies:                                       |      Stopgaps:         
                       
-------------------------------------------------------+--------------------

Comment (by nbruin):

 With the new refcounting, I think it could be  that
 `currRingHdl.data.uring` holds the last reference to a ring. In fact, it
 seems that was the source of the segfaults. If that reference is removed
 in `call_function`, shouldn't we delete the ring? The naive solution
 {{{
 ...
         currRingHdl.data.uring.ref -= 1
         if currRingHdl.data.uring.ref == 0:
             rDelete(currRingHdl.data.uring)
         currRingHdl.data.uring = currRing # ref counting?
         currRingHdl.data.uring.ref += 1
 ...
 }}}
 seems to have no ill effect (I put a print statement there that did
 produce some output, so it does happen), but perhaps I'm overlooking
 something. Are there other places where references are liable to be lost?

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