#13447: Make libsingular multivariate polynomial rings collectable
----------------------------------------------------------------+-----------
       Reporter:  nbruin                                        |         
Owner:              
           Type:  defect                                        |        
Status:  needs_review
       Priority:  major                                         |     
Milestone:  sage-5.4    
      Component:  memleak                                       |    
Resolution:              
       Keywords:                                                |   Work 
issues:              
Report Upstream:  None of the above - read trac for reasoning.  |     
Reviewers:  Simon King  
        Authors:  Nils Bruin, Simon King                        |     Merged 
in:              
   Dependencies:  #11521                                        |      
Stopgaps:              
----------------------------------------------------------------+-----------
Changes (by SimonKing):

  * status:  needs_work => needs_review
  * work_issues:  Replace rDelete by rKill. Only create currRingHdl if
                  currRing is not null =>


Comment:

 I have updated [attachment:trac_13447-sanitise_ring_refcount.patch].

 Changes:

  1. `currRingHdl` is only created if `currRing!=NULL`, and
 `currRingHdl.data.uring` is subsequently set to `currRing`.
  2. `singular_ring_delete` is now using `rKill` in lieu of `rDelete`, so
 that local data are guaranteed to be deallocated.

 In my previous comment, I was a bit sceptical about the second point.
 However, all doctests pass on bsd.math, hence, using `rKill` does not
 result in a segfault. In other words, the local data are not double-freed,
 und thus `rKill` is better than `rDelete`.

 Apply trac_13447-sanitise_ring_refcount.patch

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