The AI Gazette

GoogleEvals

Gemini plus a constraint solver found Go crashes that go test -fuzz missed, and a one-line change fixes the fuzzer

A Google engineer had Gemini 4 Argon turn Go assembly into Z3 constraints and caught every planted bug, plus three latent bugs in a real CLI. The same write-up shows why Go's fuzzer missed a crash that one in five inputs should trigger.

Karl Weinmeister maintains skill-lint, a Go CLI that checks SKILL.md files and applies LLM-generated line edits. Go compiles every slice or index operation it cannot prove safe into a branch to runtime.panicBounds, after the compiler's prove pass removes the checks it can rule out. So the traps that survive compilation are a short list of possible crash sites. He built each target with GOOS=linux GOARCH=riscv64 go build -gcflags="-S -d=ssa/check_bce/debug=1", which prints the assembly and logs every surviving bounds check, and gave both the source and the disassembly to Gemini 4 Argon.

Argon returned a Z3 script modelling the path to each trap, plus a patched function when it found a bug. When Z3 answered sat, go test replayed the concrete bytes against the real function, so every reported crash was real even though the model-written constraints are not a proof. An unsat answer only means "maybe correct". Argon's translation took about a minute per function and Z3 finished in milliseconds. In one planted bug, two uint8 lengths are added and wrap at 256 before the length guard, while the slice end uses full-width ints; Z3 produced a 59-byte input with lengths 48 and 236 that passes the guard and panics.

Go's fuzzer missed that bug in a 3-second run and three 60-second runs, although 19.4% of length pairs trigger it at that size. The reason: Go checks slice expressions against capacity, not length, and in a probe of 386,741 fuzz calls only 0.07% of inputs had cap == len. Spare capacity absorbed the overrun, so the parser returned bytes past the end instead of panicking. Adding data = data[:len(data):len(data)] at the top of the fuzz function clips capacity to length, and the fuzzer then crashed both overrun bugs in every run, with medians of 0.28 and 0.17 seconds.

On skill-lint itself, a whole binary was too large for the solver (32,321 symbols), so he extracted pure functions and slice helpers and left file I/O, flags and network calls to fuzzing and the race detector. Two scanners came back unsat; three functions had bugs, including an edit applier where sorting chunks by start line did not stop two chunks from overlapping, which either panics or silently overwrites an earlier edit. The first sat answer triggered a real panic in all six buggy functions, as long as each extracted helper kept its own entry guards. Solver models of single-threaded code do not see races or deadlocks.

From other editions

Say hi.