#10319: segmentation fault in sparse rational matrix manipulations
------------------------------+---------------------------------------------
Reporter: monniaux | Owner: jason, was
Type: defect | Status: new
Priority: critical | Milestone:
Component: linear algebra | Keywords:
Author: | Upstream: N/A
Reviewer: | Merged:
Work_issues: |
------------------------------+---------------------------------------------
Comment(by johanbosman):
The problem is in /sage/matrix/matrix_rational_sparse.pyx in the function
_echelonize_multimodular:
{{{
def _echelonize_multimodular(self, height_guess=None, proof=True, **kwds):
cdef Matrix_rational_sparse E
E = self._echelon_form_multimodular(height_guess, proof=proof,
**kwds)
# Get rid of self's data
self._dealloc()
# Change self's data to point to E's.
self._matrix = E._matrix
# Make sure that E's destructor doesn't delete self's data.
E._matrix = NULL
E._initialized = False
return E.pivots()
}}}
E._matrix is set to NULL, while E may be a matrix that is in use somewhere
else. In the example given, it will be the identity matrix, which is
cached in its parent. During the first m.echelonize(), E._matrix is set
to NULL where E is the cached identity matrix. This will cause segfaults.
During the second m.echelonize() in the example, m._matrix is set to
E._matrix and thus to NULL.
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/10319#comment:4>
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.