Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

memleak in GSL's ComplexDoubleVector #1579

Closed
sagetrac-mabshoff mannequin opened this issue Dec 21, 2007 · 2 comments
Closed

memleak in GSL's ComplexDoubleVector #1579

sagetrac-mabshoff mannequin opened this issue Dec 21, 2007 · 2 comments
Assignees
Milestone

Comments

@sagetrac-mabshoff
Copy link
Mannequin

sagetrac-mabshoff mannequin commented Dec 21, 2007

Doctesting numerical.py shows the following leak:

==18034== 6,528 (1,840 direct, 4,688 indirect) bytes in 46 blocks are definitely lost in loss record 7,184 of 7,898
==18034==    at 0x4A1BB35: malloc (vg_replace_malloc.c:207)
==18034==    by 0xA244297: gsl_vector_complex_alloc (init_source.c:32)
==18034==    by 0xA244358: gsl_vector_complex_calloc (init_source.c:64)
==18034==    by 0x16921F0E: __pyx_pf_4sage_7modules_21complex_double_vector_31ComplexDoubleVectorSpaceElement___init__ (comp
lex_double_vector.c:2529)
==18034==    by 0x458E40: type_call (typeobject.c:436)
==18034==    by 0x415542: PyObject_Call (abstract.c:1860)
==18034==    by 0x481AC1: PyEval_EvalFrameEx (ceval.c:3775)
==18034==    by 0x484B6A: PyEval_EvalCodeEx (ceval.c:2831)
==18034==    by 0x4CE057: function_call (funcobject.c:517)
==18034==    by 0x415542: PyObject_Call (abstract.c:1860)
==18034==    by 0x41BC62: instancemethod_call (classobject.c:2497)
==18034==    by 0x415542: PyObject_Call (abstract.c:1860)

==18034== LEAK SUMMARY:
==18034==    definitely lost: 1,936 bytes in 50 blocks.
==18034==    indirectly lost: 4,928 bytes in 106 blocks.
==18034==      possibly lost: 324,343 bytes in 921 blocks.
==18034==    still reachable: 30,248,680 bytes in 211,765 blocks.
==18034==         suppressed: 0 bytes in 0 blocks.

With the patch I will attach shortly I get:

==18694== LEAK SUMMARY:
==18694==    definitely lost: 96 bytes in 4 blocks.
==18694==    indirectly lost: 240 bytes in 14 blocks.
==18694==      possibly lost: 324,343 bytes in 921 blocks.
==18694==    still reachable: 30,248,248 bytes in 211,748 blocks.
==18694==         suppressed: 0 bytes in 0 blocks.

Sage with the patch passes testall and valgrinding the doctest doesn't show any problems.

Cheers,

Michael

Component: memleak

Issue created by migration from https://trac.sagemath.org/ticket/1579

@sagetrac-mabshoff sagetrac-mabshoff mannequin added this to the sage-2.9.1 milestone Dec 21, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin added t: bug labels Dec 21, 2007
@sagetrac-mabshoff sagetrac-mabshoff mannequin self-assigned this Dec 21, 2007
@sagetrac-mabshoff
Copy link
Mannequin Author

sagetrac-mabshoff mannequin commented Dec 21, 2007

comment:1

Attachment: Sage-2.9-fix-ComplexDoubleVector-memleak.patch.gz

@rlmill
Copy link
Mannequin

rlmill mannequin commented Dec 21, 2007

comment:2

merged in 2.9.1 alpha3

@rlmill rlmill mannequin closed this as completed Dec 21, 2007
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

0 participants