So while working on Day 12 from advent of code 2022, I ran off this cliff:
$ zig version
0.10.0-dev.3880+e2bb92b2e2
$ zig run day12/main.zig <day12/input.txt
thread 157707 panic: reached unreachable code
Unable to dump stack trace: OutOfMemory
Aborted (core dumped)
Now, tbf there was one time when it actually printed a stack trace (same code, same input , the only thing I was changing was re-running in a new bash shell to have a more readily copy-paste-able output to report here), and that stack trace filled my terminal with many gpa leak detection traces. But every other time I've ran it, I get the OutOfMemory error and no stack trace... at a guess, gpa's leak detection has some timing or other non-determinism effects in it that made it catch slightly less leaks that one time?
Barring that fluke, any advice on debugging this situation?
Full code here https://github.com/jcorbin/aoc/blob/2022/day12/main.zig as of commit 152351e ( fwiw it's my first time trying to implement a PriorityQueue-driven search algorithm in zig, so no surprise I sprung a few leaks ๐ )