dot crash: "pointer being freed was not allocated"
$ dot -V
dot - graphviz version 2.40.1 (20161225.0304)
(Installed via homebrew.)
Reproduce:
Grab https://gist.github.com/josharian/cba98a51403692ce00dcda156bd13af2, save as x.dot
. Run dot x.dot -Tpdf -o o.pdf
.
Result:
$ dot x.dot -Tpdf -o o.pdf
Warning: Unable to reclaim box space in spline routing for edge "reflect" -> "unsafe". Something is probably seriously wrong.
Warning: Unable to reclaim box space in spline routing for edge "strings" -> "errors". Something is probably seriously wrong.
Warning: Unable to reclaim box space in spline routing for edge "fmt" -> "errors". Something is probably seriously wrong.
dot(48155,0x1164695c0) malloc: *** error for object 0x7ff0951139b0: pointer being freed was not allocated
dot(48155,0x1164695c0) malloc: *** set a breakpoint in malloc_error_break to debug
Abort trap: 6
Running under lldb with a breakpoint at malloc_error_break yields this backtrace:
(lldb) bt
* thread #1, queue = 'com.apple.main-thread', stop reason = breakpoint 1.1
* frame #0: 0x00007fff64d31e0a libsystem_malloc.dylib`malloc_error_break
frame #1: 0x00007fff64d25a83 libsystem_malloc.dylib`malloc_vreport + 437
frame #2: 0x00007fff64d258b0 libsystem_malloc.dylib`malloc_report + 151
frame #3: 0x00000001000f59bd libgvc.6.dylib`_routesplines + 4302
frame #4: 0x00000001001b12ed libgvplugin_dot_layout.6.dylib`_dot_splines + 12954
frame #5: 0x00000001001a3c5b libgvplugin_dot_layout.6.dylib`dotLayout + 622
frame #6: 0x00000001001a3695 libgvplugin_dot_layout.6.dylib`dot_layout + 111
frame #7: 0x00000001000d5f6f libgvc.6.dylib`gvLayoutJobs + 277
frame #8: 0x0000000100003d26 dot`main + 622
frame #9: 0x00007fff64b723d5 libdyld.dylib`start + 1
frame #10: 0x00007fff64b723d5 libdyld.dylib`start + 1