Rustlantis: Randomized Differential Testing of the Rust Compiler
Qian Wang, Ralf Jung
Abstract
Compilers are at the core of all computer architecture. Their middle-end and back-end are full of subtle code that is easy to get wrong. At the same time, the consequences of compiler bugs can be severe. Therefore, it is important that we develop techniques to increase our confidence in compiler correctness, and to help find the bugs that inevitably happen. One promising such technique that has successfully found many compiler bugs in the past is randomized differential testing, a fuzzing approach whereby the same program is executed with different compilers or different compiler settings to detect any unexpected differences in behavior.
We present Rustlantis, the first fuzzer for the Rust programming language that is able to find new correctness bugs in the official Rust compiler. To avoid having to deal with Rust's strict type and borrow checker, Rustlantis directly generates MIR, the central IR of the Rust compiler for optimizations. The program generation strategy of Rustlantis is a combination of statically tracking the state of the program, obscuring the program state for the compiler, and decoy blocks to lead optimizations astray. This has allowed us to identify 22 previously unknown bugs in the Rust compiler, most of which have been fixed.
CCS Concepts: • Software and its engineering → Compilers; Software testing and debugging; Maintaining software.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext a97ccfcf-738d-433f-a35a-587ef8d4e6a2Cited by top-tier papers7
- Miri: Practical Undefined Behavior Detection for RustRalf Jung, Benjamin Kimock, Christian Poveda, Eduardo Sánchez Muñoz et al.POPL 2026 · 8 citations
- An Empirical Study of Bugs in the rustc CompilerZixi Liu, Yang Feng, Yunbo Ni, Shaohua Li et al.OOPSLA 2025 · 5 citations
- When Specifications Meet Reality: Uncovering API Inconsistencies in Ethereum InfrastructureJie Ma, Ningyu He, Jinwen Xi, Mingzhe Xing et al.OOPSLA 2026
- Semantic Reification: A New Paradigm for Random Program GenerationKavya Chopra, Cong Li, Thodoris Sotiropoulos, Zhendong SuPLDI 2026
- RVISmith: Fuzzing Compilers for RVV IntrinsicsYibo He, Cunjian Huang, Xianmiao Qu, Hongdeng Chen et al.CCS 2025
Builds on3
- Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 citations
- On the Reliability of Coverage-Based Fuzzer BenchmarkingMarcel Böhme, László Szekeres, Jonathan MetzmanICSE 2022 · 91 citations
- Stacked borrows: an aliasing model for RustRalf Jung, Hoang-Hai Dang, Jeehoon Kang, Derek DreyerPOPL 2020 · 67 citations
Related papers
- Validating Rust Compilers with Trait-Type Constraint GraphXin Lai, Ming Wen, Xiaofei Liao, Hai JinSOSP 2026
- RULF: Rust Library Fuzzing via API Dependency Graph TraversalJianfeng Jiang, Hui Xu, Yangfan ZhouASE 2021 · 44 citations
- RICE: Harnessing LLMs and Historical Issues to Discover Internal Rust Compiler ErrorsLangyi Lu, Wei You, Bin Liang, Jianjun HuangISSTA 2026
- Directed Testing in MLIR: Unleashing Its Potential by Overcoming the Limitations of Random FuzzingWeiyuan Tong, Zixu Wang, Zhanyong Tang, Jianbin Fang et al.FSE 2025 · 1 citation
- Rust-twins: Automatic Rust Compiler Testing through Program Mutation and Dual Macros GenerationWenzhang Yang, Cuifeng Gao, Xiaoyuan Liu, Yuekang Li et al.ASE 2024 · 5 citations
