Bug 144275 - neato crashes with splines
Summary: neato crashes with splines
Status: RESOLVED FIXED
Alias: None
Product: SUSE Linux 10.1
Classification: openSUSE
Component: Other (show other bugs)
Version: Alpha 4
Hardware: i686 SUSE Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Philipp Thomas
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-01-20 07:39 UTC by Forgotten User OS1JNCFbCX
Modified: 2006-02-09 17:59 UTC (History)
0 users

See Also:
Found By: Beta-Customer
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Forgotten User OS1JNCFbCX 2006-01-20 07:39:42 UTC
neato (graphviz) crashes with SIGSEGV when using description file with splines turned on.

example file:

digraph "test" {
  splines=true
  a -> b
}

Run with "neato file.dot"
Comment 1 Martin Lasarsch 2006-01-20 12:35:12 UTC
same in beta1, works for me in 10.0
Comment 2 Xin Wei Hu 2006-01-23 03:35:13 UTC
The bug shows up because lib/common/memory.c:

void *gmalloc(size_t nbytes)
{
  ...
  return (char *)1; /* NB Return an invalid pointer - since nobody seems to check for NULL */
  ...
}

My personal suggestion is to add some check in lib/neatogen/neatosplines.c: to workaround.

static void
make_barriers(Ppoly_t ** poly, int npoly, int pp, int qp,
              Pedge_t ** barriers, int *n_barriers)
{
  ...
  bar = N_GNEW(n, Pedge_t);
+ if (bar == 1) bar = 0;
  ...
}
Comment 3 Philipp Thomas 2006-01-23 10:26:48 UTC
q
Comment 4 Philipp Thomas 2006-02-09 17:59:29 UTC
OK, fixed as suggested. Thanks for the analysis!