Bug 144275

Summary: neato crashes with splines
Product: [openSUSE] SUSE Linux 10.1 Reporter: Forgotten User OS1JNCFbCX <forgotten_OS1JNCFbCX>
Component: OtherAssignee: Philipp Thomas <pth>
Status: RESOLVED FIXED QA Contact: E-mail List <qa-bugs>
Severity: Normal    
Priority: P5 - None    
Version: Alpha 4   
Target Milestone: ---   
Hardware: i686   
OS: SUSE Other   
Whiteboard:
Found By: Beta-Customer Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

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!