Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001490graphvizGraph Librariespublic2008-11-24 09:092011-04-28 04:03
ReporterAric Hagberg 
Assigned Tonorth 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOS*-*-OS Version
Summary0001490: attribute access crash
Description



This code (from the example in the cgraph man page) crashes with
graphviz-2.21.2081121.0545 when run on a graph with no attributes.
<CD>
bash-3.2$ cat cgtest.c
#include <cgraph.h>
#include <stdio.h>



main(int argc, char **argv)
{
 Agraph_t *g;
 Agsym_t *attr;
 int cnt;



 if (g = agread(stdin,NIL(Agdisc_t*))) {
   cnt = 0; attr = 0;
   while (attr = agnxtattr(g, AGNODE, attr)) cnt++;
   printf("The graph %s has %d attributes\n",agnameof(g),cnt);
 }



}



bash-3.2$ !gcc
gcc -g -fnested-functions cgtest.c -lcgraph



bash-3.2$ cat test.dot
digraph {
       1 -> 1;
       1 -> 2;
       2 -> 3;
}



bash-3.2$ ./a.out <test.dot
Bus error



This works with graphviz-2.20.3
</CD>
TagsNo tags attached.
AUXILLARY-FILES
DATE-FIXED
FIX-COMMENT
FORMER-ID1527
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed
VERSION     2.21.2081121.0545
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 => Stephen North


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