Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0000740graphvizOtherpublic2007-06-25 09:482011-04-28 04:03
ReporterBruce Henderson 
Assigned Toellson 
PlatformOSx86-Linux-FC6OS Version
Summary0000740: Crash when calling graph_cleanup()

While attempting to release memory using graph_cleanup(), the app crashes
 - sometimes.

I tracked the fault down to labels.c, free_textpara().
Specifically when it tries to free xshow or layout.

Since the crashing appeared "randomly", I believe the cause is non-zero data in the memory
reserved for the struct.

See fix in the extra credit section... ;-)
(sorry.. dunno how to do patches...)
Additional Information

[ellson] Instead of using memset() I used our ZALLOC macro which is basically a calloc()
TagsNo tags attached.
In labels.c, storeline().
After :
para = &(lp->u.txt.para[lp->u.txt.nparas]);
add :
memset(para, 0, sizeof(textpara_t));

Ensures that the memory is zero'd, and prevents cleanup from believing
there is real data there...
STATUS-COMMENTFixed (25 June 2007)
VERSION     2.12 and cvs
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 => user695

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