ClozeMaster: Fuzzing Rust Compiler by Harnessing LLMs for Infilling Masked Real Programs
Hongyan Gao, Yibiao Yang, Maolin Sun, Jiangchang Wu, Yuming Zhou, Baowen Xu

TL;DR
ClozeMaster leverages large language models with a novel masking strategy to generate valid Rust compiler test programs, effectively uncovering bugs and surpassing existing fuzzers in coverage.
Contribution
Introduces clozeMask, a masking and filling approach using LLMs to synthesize Rust test programs from historical bug reports, improving bug detection and code coverage.
Findings
Identified 27 confirmed Rust compiler bugs, with 10 fixed.
CLOZEMASTER outperforms existing fuzzers in coverage and bug detection.
Effective in generating valid test programs that trigger compiler bugs.
Abstract
Ensuring the reliability of the Rust compiler is of paramount importance, given increasing adoption of Rust for critical systems development, due to its emphasis on memory and thread safety. However, generating valid test programs for the Rust compiler poses significant challenges, given Rust's complex syntax and strict requirements. With the growing popularity of large language models (LLMs), much research in software testing has explored using LLMs to generate test cases. Still, directly using LLMs to generate Rust programs often results in a large number of invalid test cases. Existing studies have indicated that test cases triggering historical compiler bugs can assist in software testing. Our investigation into Rust compiler bug issues supports this observation. Inspired by existing work and our empirical research, we introduce a bracket-based masking and filling strategy called…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
