#13761: Segfault with Matrix_integer_2x2
------------------------------+---------------------------------------------
Reporter: robharron | Owner: jason, was
Type: defect | Status: new
Priority: major | Milestone: sage-5.6
Component: linear algebra | Keywords: segfault, matrix_integer_2x2
Work issues: | Report Upstream: N/A
Reviewers: | Authors:
Merged in: | Dependencies:
Stopgaps: |
------------------------------+---------------------------------------------
The following code generates a segmentation fault:
{{{
sage: MS = sage.matrix.all.MatrixSpace(ZZ,2)
sage: M1 = sage.matrix.matrix_integer_2x2.Matrix_integer_2x2(MS, [1, 0, 0,
1], copy = True, coerce = True)
sage: M2 = Matrix(ZZ, 2, 2, [1, 0, 0, 1])
sage: M1 == M2
False
sage: M2 == M1
Unhandled SIGSEGV: ...
}}}
It generates a segfault for all other values of copy and coerce in the
second line as well. Note however that the following code works perfectly
fine:
{{{
sage: MS1 = sage.matrix.matrix_integer_2x2.MatrixSpace_ZZ_2x2()
sage: M1 = MS1([1, 0, 0, 1])
sage: MS2 = sage.matrix.all.MatrixSpace(ZZ, 2)
sage: M2 = MS2([1, 0, 0, 1])
sage: M1 == M2
True
sage: M2 == M1
True
}}}
One thing to point out is that the construction used in the segfault is
that used by the code in arithgroup_element.py and congroup_pyx.pyx, so it
may at least be worth to change those files to the non-disastrous
construction.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/13761>
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.