dot2gxl gets segfault even with simple graph

Bug #376400 reported by Stephan Sperber
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
graphviz (Ubuntu)
Fix Released
Undecided
Unassigned
Nominated for Jaunty by Stephan Sperber
Nominated for Karmic by Stephan Sperber

Bug Description

Binary package hint: graphviz

inputfile test.dot:
digraph g {
        test
        test -> test1
}

do the following:
~$ dot2gxl -g test.dot

leads to the following output:
<?xml version="1.0" encoding="iso-8859-1"?>
<gxl>
 <graph id="g" edgeids="true" edgemode="directed">
  <node id="test">
  </node>
  <edge from="test" to="test1" isdirected="true" id="test--test1">
Segmentation fault

Some Version information:
Ubuntu 9.04
graphviz 2.20.2-3ubuntu2 (jaunty)

Tags: apport-crash
Revision history for this message
Stephan Sperber (quinte17) wrote :

I included a patch which fixes it for me.

If 'val' is NULL then no index access is possible. val[0] throws the segfault.

tags: added: apport-crash
Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

I can confirm the segfault.

Changed in graphviz (Ubuntu):
status: New → Confirmed
Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

This seems to be fixed in at least 2.24.0, available here:
http://www.graphviz.org/Download_linux_ubuntu.php

Revision history for this message
Stephan Sperber (quinte17) wrote :

A manual version-bump is not a solution for regular jaunty users. I hope that koala will get the new version, which makes this obsolete.

I really would like to see this fixed.

Changed in graphviz (Ubuntu):
assignee: nobody → Simon Olofsson (simono)
status: Confirmed → In Progress
Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

Stephan, I'll provide an updated deb in my PPA soon, it would be nice if you could test it.

Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

Stephan, a version of graphviz which fixes this issue is available in my PPA:
https://edge.launchpad.net/~simono/+archive/ppa
Please try it and report back, if it worked. Thanks!
I just tried it with your example file and it went all well.

Changed in graphviz (Ubuntu):
status: In Progress → Incomplete
Revision history for this message
Stephan Sperber (quinte17) wrote :

Hi Simon,
your PPA package did fine for me. Thank you very much for getting this fixed.

Yours
Stephan

Changed in graphviz (Ubuntu):
status: Incomplete → Confirmed
assignee: Simon Olofsson (simono) → nobody
Revision history for this message
Daniel Holbach (dholbach) wrote :

This is the diff between our version and the current upstream version.

Maybe use this instead?
- if (val[0]) {
+ if (val && val[0]) {

Also: can you make use of https://wiki.ubuntu.com/UbuntuDevelopment/PatchTaggingGuidelines or at least document that the bug is fixed upstream and the patch dropped when we move to the new upstream version?

Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

Daniel, thanks for your suggestions. I updated the branch according to them.
I'll upload a new version to my PPA soon.

Revision history for this message
No (11111nonononono-deactivatedaccount-deactivatedaccount-deactivatedaccount) wrote :

The new version is in my PPA now. I tested it and it worked.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package graphviz - 2.20.2-3ubuntu5

---------------
graphviz (2.20.2-3ubuntu5) karmic; urgency=low

  * debian/patches/30_fix_dot2gxl_segfault:
    - Fix a segfault in dot2gxl (LP: #376400)

 -- Simon Olofsson <email address hidden> Mon, 14 Sep 2009 10:32:25 +0200

Changed in graphviz (Ubuntu):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.