mirror of
https://github.com/ghostty-org/ghostty.git
synced 2026-04-18 13:30:29 +00:00
This adds a `test/fuzz-libghostty` which is a standalone `zig build` target for building an AFL++ instrumented executable for fuzzing the libghostty-vt parser. I also added a `pkg/afl++` (based on zig-afl-kit) so instrumenting objects and using AFL++ is a bit easier. Fuzzing `libghostty-vt`'s parser is as easy as `zig build run`, but see the README for a lot more details. I ran the fuzzer for ~14 hours total and only found one crash #11088. I'm pretty confident at this point our Parser layer isn't obviously crash-able, but need to instrument more places to fuzz. We don't use Zig's built-in fuzzing yet because as of 0.15 (our current stable), it isn't ready and AFL++ is an industry proven tool to do this.