|Anonymous | Login||2017-11-18 18:37 EST|
|Main | My View | View Issues | Change Log | Roadmap | My Account|
|View Issue Details|
|ID||Project||Category||View Status||Date Submitted||Last Update|
|0001784||graphviz||Other||public||2009-12-29 13:04||2011-04-28 04:03|
|Platform||OS||x86-Linux-Debian Sid||OS Version|
|Summary||0001784: Prune segfaults since at least 2.24|
I've discovered that the 'prune' command in contrib appears to segfault
regardless of what file it is processing. This worked in 2.20 and fails
in 2.24 and 2.26 (I don't have 2.22 around so I didn't try that)
I did a little digging and I think I see what the problem is ...
At line 182 and recursively at line 236 there is a call to 'remove_child'
followed by a call to either 'agdelete' or 'agdeledge' to remove the
However in 'remove_child' at line 241 is a call to 'agdelnode' to remove
the child node which, if I understand the code correctly also removes all
outgoing and *incoming* edges - which means the aforementioned
agdelete/agdeledge calls try to delete an edge which no longer exists.
I have included an example file 'unixbit.gv' (which consists of just three
nodes from the 'unix.gv' example). The command
prune -n "System V.2" unixbit.gv
triggers the segfault.
If I am correct about the cause of the problem, the patch below should
fix it ... it works here for every file I've tried so far.
|Tags||No tags attached.|
--- a/contrib/prune/prune.c.orig 2009-12-18 22:33:47.000000000 +0000
+++ b/contrib/prune/prune.c 2009-12-18 22:37:25.000000000 +0000
@@ -42,7 +42,7 @@
-void remove_child(Agraph_t * graph, Agnode_t * node);
|STATUS-COMMENT||Fixed (29 Dec 2009)|
|2011-04-28 04:03||user1||New Issue|
|2011-04-28 04:03||user1||Assigned To||=> erg|
|MantisBT 1.2.5[^] Copyright © 2000 - 2011 MantisBT Group|