Using Gemini and Z3 to find Go panics that fuzzing missed
Brief
The workflow targets bounds checks that survive Go’s compiler optimizations: Gemini 4 Argon translates their paths into Z3 constraints, and go test replays any crashing inputs against the real code.
What the approach found
- It found all three planted parser bugs and three latent bugs in skill-lint.
- The author tested pure functions and slice helpers, leaving file I/O, CLI flags and network calls to standard fuzzing and race detection.
A fuzzing blind spot
- Go slice expressions check capacity, not just length; spare capacity can let an out-of-range index avoid a panic.
- Setting cap equal to len in the fuzz target made the fuzzer find two overruns in a median of 0.28 and 0.17 seconds across the reported runs.
Limits and workflow
- Argon’s translation took about a minute per function; Z3 finished in milliseconds. A sat result produced inputs that go test confirmed as real crashes.
- An unsat result is not a proof of correctness. The method does not cover data races or deadlocks, which still require concurrency testing tools.
Generated by AI from the original article. Check the source for full details.