It’s not clear to me exactly how to repro this. My naive attempt:
$ cat >/tmp/845492.dot <<EOT -
digraph {
a -> b;
}
digraph {
a -> b;
}
EOT
$ dot /tmp/845492.dot
does not trigger the bug in an upstream build of the latest head
(aef8a6fd874726f17e3797561d23491bd9e156fa) with Address Sanitizer
enabled. From Git history, one would guess
690833989718642337055595cba1d4aedc0730d4
(https://gitlab.com/graphviz/graphviz/-/commit/690833989718642337055595cba1d4aedc0730d4)
was the fixing commit. But the above steps do not trigger the bug prior
to this commit either.
Rewinding to 2.38.0 (f54ac2c9313ae80ccf76ef4ac6aa9be820a23126), I _can_
trigger an ASan crash with the above steps. But bisecting this just
lands on 908a139753380160563a9d3dbf17fe3d3e4d6fdc
(https://gitlab.com/graphviz/graphviz/-/commit/908a139753380160563a9d3dbf17fe3d3e4d6fdc),
the familiar fix to unrelated issues like
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=698066,
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=700813.
So if the above steps are indeed enough to repro this, we have evidence
this was fixed upstream but no further information on when or how.