Formal verification of x86 code: failed proofs led straight to real glibc bugs

moyix · x · 2026-11-20

Second post in the v12sec x86 formal verification project: formal verification doesn't find bugs—it proves none exist. But what happens when you try to prove code that has a bug?

While verifying four memchr variants in glibc, failing proofs pointed directly at a real bug: the code returns 0xFFFFFFFFFFFFFFFF instead of NULL at address 0. The accompanying chart traces Claude's 100-minute workflow across 8 proof runs—reading failed results, replaying goals, dumping open goals with a small tool, getting a counterexample region from omega, grepping the assembly—until adding a 32 ≤ s contract constraint made run 8 pass fully.

Original post →

More from coding & agent

coding & agent channel →