#11339: Illegal use of __deallocate__ in cython (pyx) code
-----------------------------------------------+----------------------------
   Reporter:  gagern                           |          Owner:  drkirkby      
                 
       Type:  defect                           |         Status:  needs_work    
                 
   Priority:  major                            |      Milestone:  sage-4.7.1    
                 
  Component:  porting                          |       Keywords:  sd31          
                 
Work_issues:                                   |       Upstream:  N/A           
                 
   Reviewer:  François Bissey, Steven Trogdon  |         Author:  Volker Braun, 
Martin von Gagern
     Merged:                                   |   Dependencies:                
                 
-----------------------------------------------+----------------------------

Comment(by gagern):

 Replying to [comment:21 vbraun]:
 > But I wasn't aware that the parent is part of the cycle that the
 > garbage collector is trying to break, then it won't work of course.
 >
 > Actually, if the cycle is Parent <-> GroebnerStrategy then I don't
 understand
 > Martin's orginal patch.

 I'm not sure there really is a cycle. I had interpreted the situation in
 such a way that tp_clear will be called for unreachable objects just in
 case there might be some kind of cycle between them. So there might be no
 actual cycle involved at all, or it might be with some other member
 object. One requirement is that the function does cut all cycles, which
 should work as the parent shouldn't be referring back to the Gröbner
 strategy. So by keeping the reference in one direction, we satisfy
 tp_clear and still manage to finalize things. As a bonus, we ensure their
 finalization in the correct order.

 But I might be completely off target with my above understanding. Someone
 with intricate knowledge of python, its evolution, as well as cython,
 might know better.

 Until then, someone could add breakpoints to see if the finalizer is
 executed with my patch in place. Don't have the time just now, but might
 do it myself in a week or so if you remind me.

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