Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001967graphvizGraph Librariespublic2010-10-05 05:142011-04-28 04:03
Reporterstefan Kost2 
Assigned Togviz 
PrioritynormalSeverityminorReproducibilityalways
StatusacknowledgedResolutionopen 
PlatformOSx86-Linux-OS Version
Summary0001967: memory leaks when using libgvc
Description



I have been discussing memory leak on the mailing list. By adding a little complexity (another subgraph) valgrind memcheck reports leaked memory.
I will attach the minimal test program.



<CD>
==11158== 7,240 (3,080 direct, 4,160 indirect) bytes in 10 blocks are definitely
lost in loss record 877 of 887
==11158== at 0x402860A: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==11158== by 0x4092517: gmalloc (memory.c:52)
==11158== by 0x409257B: zmalloc (memory.c:30)
==11158== by 0x46E1EA9: virtual_node (fastgr.c:247)
==11158== by 0x46DD26C: class1 (class1.c:65)
==11158== by 0x46E9E9A: dot_rank (rank.c:560)
==11158== by 0x46EA6D3: collapse_cluster (rank.c:266)
==11158== by 0x46E9E2D: collapse_sets (rank.c:294)
==11158== by 0x46E9E92: dot_rank (rank.c:558)
==11158== by 0x46E33A9: dot_layout (dotinit.c:261)
==11158== by 0x4082A55: gvLayoutJobs (gvlayout.c:91)
==11158== by 0x4088F2B: gvLayout (gvc.c:79)
==11158== by 0x8048B8F: main (in /home/ensonic/projects/tests/gvc)
==11158==
==11158== 7,510 (840 direct, 6,670 indirect) bytes in 10 blocks are definitely
lost in loss record 878 of 887
==11158== at 0x402860A: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-x86-linux.so)
==11158== by 0x4092517: gmalloc (memory.c:52)
==11158== by 0x409257B: zmalloc (memory.c:30)
==11158== by 0x40A25E9: make_label (labels.c:113)
==11158== by 0x409A667: do_graph_label (input.c:896)
==11158== by 0x46EA6A8: collapse_cluster (rank.c:165)
==11158== by 0x46E9E2D: collapse_sets (rank.c:294)
==11158== by 0x46E9E92: dot_rank (rank.c:558)
==11158== by 0x46E33A9: dot_layout (dotinit.c:261)
==11158== by 0x4082A55: gvLayoutJobs (gvlayout.c:91)
==11158== by 0x4088F2B: gvLayout (gvc.c:79)
==11158== by 0x8048B8F: main (in /home/ensonic/projects/tests/gvc)
</CD>



The first leak is gone when commenting out the sub-cluster code in the example
(line 48ff).
Additional Information

[erg] It is unnecessary to run the C program. Dot leaks on this
\<A HREF="b2048.gv"\>graph\</A\>, which is the graph built by the
program.
TagsNo tags attached.
AUXILLARY-FILEShttp://www.graphviz.org/bugs/b2048.gv [^]
DATE-FIXED
FIX-COMMENT
FORMER-ID2048
INPUT-FILEhttp://www.graphviz.org/bugs/b2048.c [^]
OUTPUT-FILE
STATUS-COMMENT*
VERSION     2.6
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => user1


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker