#14711: Memleak when creating QuadraticField
-------------------------------------+-------------------------------------
Reporter: jpflori | Owner: davidloeffler
Type: defect | Status: needs_work
Priority: critical | Milestone: sage-5.13
Component: number fields | Resolution:
Keywords: memleak, number | Merged in:
field, QuadraticField | Reviewers:
Authors: Simon King | Work issues: Fix elliptic curves
Report Upstream: N/A | code
Branch: | Commit:
u/SimonKing/ticket/14711 | Stopgaps:
Dependencies: |
-------------------------------------+-------------------------------------
Comment (by SimonKing):
Aha.
{{{
sage: P.__class__.mro()
[sage.schemes.elliptic_curves.ell_point.EllipticCurvePoint_number_field,
sage.schemes.elliptic_curves.ell_point.EllipticCurvePoint_field,
sage.schemes.projective.projective_point.SchemeMorphism_point_abelian_variety_field,
sage.structure.element.AdditiveGroupElement,
sage.structure.element.ModuleElement,
sage.schemes.projective.projective_point.SchemeMorphism_point_projective_field,
sage.schemes.projective.projective_point.SchemeMorphism_point_projective_ring,
sage.schemes.generic.morphism.SchemeMorphism_point,
sage.schemes.generic.morphism.SchemeMorphism,
sage.categories.morphism.Morphism,
sage.categories.map.Map,
sage.structure.element.Element,
sage.structure.sage_object.SageObject,
object]
}}}
and
{{{
sage: P.domain
<bound method EllipticCurvePoint_number_field.domain of (0 : 0 : 1)>
sage: P.domain.__module__
'sage.schemes.elliptic_curves.ell_point'
sage: P.domain??
Type: instancemethod
String Form:<bound method EllipticCurvePoint_number_field.domain of (0 : 0
: 1)>
File: /home/king/Sage/git/sage/local/lib/python2.7/site-
packages/sage/schemes/elliptic_curves/ell_point.py
Definition: P.domain(self)
Source:
def domain(self):
"""
Return the domain of this point, which is `Spec(F)` where `F` is
the field of definition.
EXAMPLES::
sage: E=EllipticCurve(QQ,[1,1])
sage: P=E(0,1)
sage: P.domain()
Spectrum of Rational Field
sage: K.<a>=NumberField(x^2-3,'a')
sage: P=E.base_extend(K)(1,a)
sage: P.domain()
Spectrum of Number Field in a with defining polynomial x^2 - 3
"""
return self.parent().domain()
}}}
So, not only was `SchemeMorphism` ignoring `Morphism`, but additionally
its sub-class `EllipticCurvePoint_fieldEllipticCurvePoint_field` overrode
what it inherited from `SchemeMorphism` by a ''verbosely identical'' copy.
The elliptic curve code is a mess.
--
Ticket URL: <http://trac.sagemath.org/ticket/14711#comment:90>
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/groups/opt_out.