FunFuzz: An LLM-Powered Evolutionary Fuzzing Framework
FunFuzz is a multi-island evolutionary fuzzing framework that leverages Large Language Models with adaptive, feedback-guided prompts and periodic candidate migration to overcome prompt sensitivity and sampling variance, thereby achieving superior compiler coverage and discovering more unique failure-triggering inputs than previous LLM-driven approaches.
Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer
Imagine you are trying to find hidden traps in a massive, complex maze. This maze is a compiler—the software that translates human-written code into instructions a computer can actually run. If the compiler has a bug, it might crash or give wrong answers, which can break everything built on top of it.
For decades, experts have used "fuzzers" to find these bugs. Think of a fuzzer as a robot that throws millions of random test cases at the maze to see if anything breaks. But modern compilers are so complex that random throwing often misses the deep, tricky corners.
Recently, people started using AI (Large Language Models) to write these test cases. The AI is smart and can write code that looks very realistic. However, the paper argues that using AI this way has a problem: it gets stuck in a rut. If you ask an AI to write code, it might keep generating the same five types of sentences over and over, just with different words. It stops exploring new parts of the maze.
Enter FunFuzz.
The authors created a new system called FunFuzz to fix this. Here is how it works, using a simple analogy:
1. The "Multi-Island" Strategy
Imagine you have a team of treasure hunters looking for a lost city.
- The Old Way (Single AI): You send one hunter out. They start walking, find a path, and keep following it. Eventually, they get bored or stuck in a loop, and they stop finding new things.
- The FunFuzz Way: You send out five separate teams (called "islands"). Each team starts in a completely different part of the jungle with a different map and a different goal.
- Team A is told to look for "ancient ruins."
- Team B is told to look for "hidden caves."
- Team C is told to look for "river crossings."
Because they start with different instructions, they don't all walk the same path. They explore different parts of the maze simultaneously.
2. The "Migration" System
Every few hours, the teams meet at a campfire.
- If Team A finds a really cool, rare artifact (a program that makes the compiler crash or do something weird), they don't keep it to themselves. They share a copy with Team B and Team C.
- Crucially: They don't kick Team B out of their camp. They just add the new artifact to Team B's collection. This way, Team B can use that new idea to dig deeper, without losing the progress they already made.
This prevents the whole group from getting stuck in the same loop while still letting the best discoveries spread.
3. The "Fitness Score" (How they know what's good)
How does the AI know which test case is better?
- The system compiles the code the AI wrote.
- It counts how many new lines of the compiler's own internal code were touched by that test.
- If a test case makes the compiler look at a part of itself it hasn't seen before, that test gets a high score.
- The system picks the highest-scoring tests to "breed" the next generation of tests, constantly refining the search.
What Did They Find?
The researchers tested FunFuzz against other top-tier tools (like Fuzz4All, which uses AI but only one team, and Kitten, which throws millions of random mutations) on two major compilers: GCC and Clang.
- Better Coverage: FunFuzz found more "new ground" inside the compilers than the other tools. It explored deeper and wider.
- More Bugs: Over 24-hour tests, FunFuzz found 119 unique bugs that caused the compilers to crash or fail internally.
- Real-World Impact: Developers confirmed 80 of these bugs.
- Efficiency: Even though FunFuzz didn't generate more total programs than the fastest tools, the programs it did generate were much higher quality. It found more bugs per hour.
The Bottom Line
FunFuzz is like a smart treasure hunt that uses a team of explorers instead of a single runner. By keeping the teams separate but letting them share their best finds, it avoids getting stuck in boring loops and digs much deeper into the complex machinery of modern compilers, finding bugs that other methods miss.
Drowning in papers in your field?
Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.