All news
VIBPS / NEWS • SOFTWARE RESEARCH

How do Gemini and Z3 find Go bugs that fuzzing misses?

A Google developer combined Gemini with the Z3 constraint solver to turn surviving Go bounds checks into concrete crash inputs. The experiment found bugs in the author's own tool, but it is a bug-finding workflow, not a correctness proof or a replacement for fuzzing.

A Go fuzzer can run for a long time without hitting a crash hidden behind a narrow input condition. In a November 12, 2026 Google Developers Blog post, Karl Weinmeister described a complementary way to search for those cases: have Gemini model the inputs that reach remaining bounds checks in compiled Go functions, ask the Z3 constraint solver whether those conditions can be met, then replay any candidate input with Go's test runner. He used the workflow on small parsers and on skill-lint, a Go command-line tool he wrote.

What does Gemini do in the Gemini-and-Z3 workflow?

The method starts after Go's compiler has already removed bounds checks it can prove unnecessary. Weinmeister cross-compiled selected functions, inspected the generated assembly and identified the bounds-check traps that remained. Gemini 4 Argon then translated the path to a trap into constraints that Z3 could solve. If Z3 returned a satisfiable input, the author ran it against the real function with `go test` to see whether it actually panicked.

That last replay matters. The model is not proving that its translation of the program is correct. A solver can only answer the question it was given. A concrete crashing input reproduced by the real test target is evidence of a bug; a no-solution answer is not proof that the function can never fail. Weinmeister describes the workflow as a practical bug-finding aid, not a formal verification system.

What kinds of bugs did the experiment find?

The author first tested three hand-written parser examples: two that produced panics missed by his fuzzing runs, and a third control case that fuzzing found. The solver also found three latent bugs while he examined five functions from skill-lint. These were local edge cases involving length accounting, line replacements and input truncation. They are findings in the author's own test code and tool, not a scan of Go projects generally or a claim that Gemini found remotely exploitable vulnerabilities.

One issue depended on the difference between a slice's length and capacity. In Go, a slice expression can legally extend to the capacity, even when the program intended to limit parsing to the current length. The author's fuzzer often supplied slices backed by larger buffers, which meant a bad index could remain within capacity and fail to panic during that test. A full slice expression that caps capacity to length helped the fuzzer expose the same errors quickly. That is a specific test setup observation, not evidence that Go fuzzing generally misses such bugs.

Does this replace Go fuzzing?

No. The two techniques answer different questions. Coverage-guided fuzzing explores many inputs and remains part of Go's standard security-testing workflow. This solver approach narrows its attention to a selected function and a particular failure condition, then tries to synthesize an input for it. In Weinmeister's experiment, ordinary fuzzing found the third control bug and found some of the skill-lint issues when the functions were isolated appropriately.

The narrow scope is also a limitation. The author says the approach worked best on small, pure helpers with clearly stated entry checks; modeling a whole program would be much harder. The experiment did not address data races or deadlocks, which need concurrency-specific testing. Its results are one engineer's demonstration on selected functions, not a controlled comparison across Go codebases or a guarantee that an unsatisfiable solver result means code is safe.

When might a Go developer try the method?

The useful lesson is to make hidden runtime assumptions visible. Parsers and editors that compute offsets or line ranges are plausible candidates for careful tests because several values can interact in a way that is easy to miss in source review. A developer can fuzz a helper with capacity constrained to its length, keep regression cases for every crash, and use a solver-backed analysis only when a specific failure path remains hard to reach. The reproducer and ordinary tests still decide whether the program actually fails.

This is a small but concrete example of a coding model helping a developer work with an established tool instead of replacing it. For makers building software, the practical question is not whether an AI tool can declare a project secure; it is whether its output can be independently checked and turned into a regression test. VIBPS is a social network for software where makers share apps and activity with an audience, and trustworthy testing workflows are part of shipping work others can rely on.

Did OpenAI's AI pipeline fix 948 Linux kernel flaws?

How to protect an app when using an AI coding agent

More software stories, with sources and context.

More news