#17094: Fix memleaks and brokenness of non-FLINT methods after #16803
-------------------------------------+-------------------------------------
Reporter: jdemeyer | Owner:
Type: defect | Status: needs_review
Priority: blocker | Milestone: sage-6.4
Component: linear algebra | Resolution:
Keywords: | Merged in:
Authors: Jeroen Demeyer | Reviewers:
Report Upstream: N/A | Work issues:
Branch: | Commit:
u/jdemeyer/ticket/17094 | a8c707da7f32432a088939133bb2dd5bd7489c0c
Dependencies: #17090 | Stopgaps:
-------------------------------------+-------------------------------------
Changes (by jdemeyer):
* priority: critical => blocker
Old description:
> Using linbox or iml and modifying a matrix leaks memory:
> {{{
> sage: v = vector([0]*1000)
> sage: M = identity_matrix(ZZ,1000)
> sage: while True:
> ....: _ = M._solve_right_nonsingular_square(v)
> ....: M[0,0] = 1
> ....: print get_memory_usage()
> }}}
> and linbox is seriously broken:
> {{{
> sage: A = identity_matrix(ZZ,3)
> sage: A._multiply_linbox(A)
> [0 0 0]
> [0 0 0]
> [0 0 0]
> }}}
>
> (however, it seems that neither linbox nor IML is used for anything by
> default)
>
> Also, use type `int` for `_hnf_mod()` (anything larger than `2^31-1`
> isn't supported anyway).
New description:
non-FLINT methods are seriously broken after #16803:
{{{
sage: a = zero_matrix(QQ,3)
sage: b = identity_matrix(QQ,3)
sage: a.minpoly()
x
sage: b.minpoly()
x - 1
sage: a.minpoly('y')
y - 1
}}}
Also, using linbox or iml and modifying a matrix leaks memory:
{{{
sage: v = vector([0]*1000)
sage: M = identity_matrix(ZZ,1000)
sage: while True:
....: _ = M._solve_right_nonsingular_square(v)
....: M[0,0] = 1
....: print get_memory_usage()
}}}
Also, use type `int` for `_hnf_mod()` (anything larger than `2^31-1` isn't
supported anyway).
--
--
Ticket URL: <http://trac.sagemath.org/ticket/17094#comment:12>
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.