stack overflow in graph with a long chain
Steps to reproduce
Create a graph using something like the following script:
print("digraph {")
for i in range(800000):
print(f" N{i} -> N{i + 1}")
print("}")
Run this through dot -Tsvg -o /dev/null foo.dot
.
Expected Behaviour
Run to completion successfully.
Actual Behaviour
The function dfs
recurses until it overflows the stack.
OS Version
$ uname -rms
Linux 5.15.0-56-generic x86_64
Graphviz Version
Commit 1cf43701.