#4631: possible memory leak in matrix code?
------------------------+---------------------------------------------------
Reporter: craigcitro | Owner: mabshoff
Type: defect | Status: new
Priority: major | Milestone: sage-3.4
Component: memleak | Resolution:
Keywords: |
------------------------+---------------------------------------------------
Comment (by mabshoff):
The new Sage 3.2.3+eMPIRe build picked up the following leak in tut.py:
{{{
==5027== 8 bytes in 1 blocks are definitely lost in loss record 32 of
19,079
==5027== at 0x4C22FEB: malloc (vg_replace_malloc.c:207)
==5027== by 0x84B3A4B: __gmpz_init_set_si (in
/home/mabshoff/build/eMPIRe/sage-3.2.3.final/local/lib/libgmp.so.3.4.1)
==5027== by 0x271A110A:
__pyx_pf_4sage_6matrix_4misc_matrix_integer_sparse_rational_reconstruction
(misc.c:129
17)
==5027== by 0x417E92: PyObject_Call (abstract.c:1861)
==5027== by 0x25632FFA:
__pyx_pf_4sage_6matrix_21matrix_integer_sparse_21Matrix_integer_sparse_rational_recons
truction (matrix_integer_sparse.c:8698)==5027== by 0x417E92:
PyObject_Call (abstract.c:1861)
==5027== by 0x271B2171:
__pyx_pf_4sage_6matrix_4misc_matrix_rational_echelon_form_multimodular
(misc.c:15034)
==5027== by 0x417E92: PyObject_Call (abstract.c:1861)
==5027== by 0x4816E1: PyEval_CallObjectWithKeywords (ceval.c:3442)
==5027== by 0x25CAAAE3:
__pyx_pf_4sage_6matrix_22matrix_rational_sparse_22Matrix_rational_sparse__echelon_form
_multimodular (matrix_rational_sparse.c:12416)
==5027== by 0x417E92: PyObject_Call (abstract.c:1861)
==5027== by 0x4816E1: PyEval_CallObjectWithKeywords (ceval.c:3442)
==5027== by 0x25CABA89:
__pyx_pf_4sage_6matrix_22matrix_rational_sparse_22Matrix_rational_sparse_echelon_form
(matrix_rational_sparse.c:12116)
}}}
William says:
{{{
[6:49pm] mabs: Yeah, I need to start poking around.
[6:52pm] wstein: That could only leak if there is an exception raised
somewhere in the body of the function.
[6:52pm] wstein: In misc.pyx
[6:53pm] wstein: So an exception must be raised.
[6:54pm] wstein: maybe line 235 of matrix/misc.pyx could raise an
exception,
[6:54pm] wstein: hence return from that function without clearing gmp vars
[6:58pm] mabs: mmhh
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4631#comment:6>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---