Bugzilla – Bug 144275
neato crashes with splines
Last modified: 2006-02-09 17:59:29 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"
same in beta1, works for me in 10.0
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; ... }
q
OK, fixed as suggested. Thanks for the analysis!