- sfdp craches #236
- fdp segmentation fault with GK=0 #1290
- fdp crash #1865
+- Graphviz always crash with this simple dot file #167
+- Seg fault in dot #1771
## [2.44.1] - 2020-06-29
{
edge_t *e0, *f0;
- for (e0 = e; ED_edge_type(e0) != NORMAL; e0 = ED_to_orig(e0));
- for (f0 = f; ED_edge_type(f0) != NORMAL; f0 = ED_to_orig(f0));
+ for (e0 = e; e0 != NULL && ED_edge_type(e0) != NORMAL; e0 = ED_to_orig(e0));
+ if (e0 == NULL)
+ return FALSE;
+ for (f0 = f; f0 != NULL && ED_edge_type(f0) != NORMAL; f0 = ED_to_orig(f0));
+ if (f0 == NULL)
+ return FALSE;
if (ED_conc_opp_flag(e0))
return FALSE;
if (ED_conc_opp_flag(f0))
assert any(r'hello \\\" world' in l for l in ldraw), \
'unexpected ldraw contents'
+def test_167():
+ '''
+ using concentrate=true should not result in a segfault
+ https://gitlab.com/graphviz/graphviz/-/issues/167
+ '''
+
+ # locate our associated test case in this directory
+ input = os.path.join(os.path.dirname(__file__), '167.dot')
+ assert os.path.exists(input), 'unexpectedly missing test case'
+
+ # process this with dot
+ ret = subprocess.call(['dot', '-Tpdf', '-o', os.devnull, input])
+
+ # Graphviz should not have caused a segfault
+ assert ret != -signal.SIGSEGV, 'Graphviz segfaulted'
+
def test_793():
'''
Graphviz should not crash when using VRML output with a non-writable current