#13447: Make libsingular multivariate polynomial rings collectable
----------------------------------------------------------------+-----------
       Reporter:  nbruin                                        |         
Owner:                                                                          
 
           Type:  defect                                        |        
Status:  needs_work                                                             
  
       Priority:  major                                         |     
Milestone:  sage-5.4                                                            
     
      Component:  memleak                                       |    
Resolution:                                                                     
      
       Keywords:                                                |   Work 
issues:  Understand why sometimes `new_RingWrap` needs an incref and sometimes 
not
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_review => needs_work
  * work_issues:  => Understand why sometimes `new_RingWrap` needs an
                  incref and sometimes not


Comment:

 The wrong refcount appears to be in sage/libs/singular/function.pyx, where
 in the current patch we have
 {{{
             # We need to incref the to-be-converted data,
             # since apparently removing to_convert.data would
             # decref it.
             return new_RingWrap( singular_ring_reference(<ring*>
 to_convert.data) )
 }}}
 There was some example where the refcount was wrong ''without'' calling
 `singular_ring_reference`, but for SCA it is wrong ''with'' that call.

 So, that is something that we need to understand, and needs work.

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