Fuzzing the Gleam Compiler
An exploration of using structure-aware fuzzing to identify bugs in the Gleam compiler. The author contrasts this approach with LLM-based fuzzing, noting the benefits of grammar-aware input generation.
Why it matters
Improves compiler reliability and software quality through automated testing techniques that uncover edge cases.
Can you find bugs in a compiler by generating random programs?
I regularly check on Gleam’s changelog and issue tracker. I am very fond of this project and the people contributing to it. But every time I see an issue that relates to code generation or different outputs between the Erlang and JavaScript, it nags me that there was no way to basically “compute all the Gleam programs”, run them and see if there are any issues.
I imagine it like a chessboard, where you have a quasi-infinite number of possible positions on the board. But we want the chessboard to contain Gleam programs and we want an infinitely big database of those programs to see if they uncover untested edge cases.
Get smarter about the news
Sign up free for a feed built around what you actually care about, Dive Deeper research on any story, and the full text of every article.
Create free accountAlready have an account? Sign in