← Thursday, October 1, 2026Practice & careersDeep dive

A small fuzzer finds regex bugs that example-based tests missed

matklad.github.io 12 min read Editor score 7/10

The author wrote a fuzzer to reproduce a known regex bug and found another bug in that version, while acknowledging the test was biased by knowing what to seek. It’s a useful, candid example of generative testing in practice.

What
Generative testing of Rust’s regex crate used generated patterns and input text, cross-checking regex against regex_lite.
How
The fuzzer found another bug in an older regex version: `.abb|b` on `zabb` returned `b` instead of `zabb`; the latest version showed no issue.
Why it matters
Cross-checking implementations supplies an oracle for algorithm tests, helping expose cases example-based tests may miss.

Discussion

Discussion is not switched on yet. Use Note above to keep your own thoughts on this story.

Headline, summary, brief and diagram are written by a model from the source's own text; the link, byline and numbers come from the source. Read the original before relying on a claim.

Your note

Private to you. Stored in this browser, and synced to your account when you are signed in.