#16532: Weak morphism created with register_coercion can result in invalid
coercion
----------------------------+------------------------
Reporter: tscrim | Owner: tscrim
Type: defect | Status: new
Priority: critical | Milestone: sage-6.3
Component: coercion | Resolution:
Keywords: | Merged in:
Authors: | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
Dependencies: | Stopgaps:
----------------------------+------------------------
Comment (by nbruin):
As far as I'm aware, (weak) coercion maps already hold a strong reference
to their codomain. In fact, coercions are stored *on* their codomain, so
this strong reference is just a cycle and hence doesn't prevent garbage
collection.
It sounds like A->B should be registered as an *embedding*, in which case
A would keep B alive (with all the memory-leaking consequences that might
have).
(it's very hard for maps not to hold a strong reference to their codomain,
at least indirectly, since maps need to produce elements that reference
the codomain. Hence the coercion system doesn't even try)
--
Ticket URL: <http://trac.sagemath.org/ticket/16532#comment:1>
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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.