Lune

OOPSLA2024顶会

Rustlantis: Randomized Differential Testing of the Rust Compiler

Qian Wang, Ralf Jung

摘要

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.

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 7 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • Miri: Practical Undefined Behavior Detection for Rust 引用了 Stacked borrows: an aliasing model for Rust
  • Semantic Reification: A New Paradigm for Random Program Generation 引用了 Random testing for C and C++ compilers with YARPGen
  • RVISmith: Fuzzing Compilers for RVV Intrinsics 引用了 Random testing for C and C++ compilers with YARPGen
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper7

  1. Miri: Practical Undefined Behavior Detection for RustRalf Jung, Benjamin Kimock, Christian Poveda, Eduardo Sánchez Muñoz 等POPL 2026 · 8 次引用
  2. An Empirical Study of Bugs in the rustc CompilerZixi Liu, Yang Feng, Yunbo Ni, Shaohua Li 等OOPSLA 2025 · 5 次引用
  3. When Specifications Meet Reality: Uncovering API Inconsistencies in Ethereum InfrastructureJie Ma, Ningyu He, Jinwen Xi, Mingzhe Xing 等OOPSLA 2026
  4. Semantic Reification: A New Paradigm for Random Program GenerationKavya Chopra, Cong Li, Thodoris Sotiropoulos, Zhendong SuPLDI 2026
  5. RVISmith: Fuzzing Compilers for RVV IntrinsicsYibo He, Cunjian Huang, Xianmiao Qu, Hongdeng Chen 等CCS 2025

它引用的 Paper3

  1. Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 次引用
  2. On the Reliability of Coverage-Based Fuzzer BenchmarkingMarcel Böhme, László Szekeres, Jonathan MetzmanICSE 2022 · 91 次引用
  3. Stacked borrows: an aliasing model for RustRalf Jung, Hoang-Hai Dang, Jeehoon Kang, Derek DreyerPOPL 2020 · 67 次引用

相关 Paper

  1. Rust-twins: Automatic Rust Compiler Testing through Program Mutation and Dual Macros GenerationWenzhang Yang, Cuifeng Gao, Xiaoyuan Liu, Yuekang Li 等ASE 2024 · 5 次引用
  2. RULF: Rust Library Fuzzing via API Dependency Graph TraversalJianfeng Jiang, Hui Xu, Yangfan ZhouASE 2021 · 44 次引用
  3. Don't Panic! Finding Bugs Hidden Behind Rust Runtime Safety ChecksZeyang Zhuang, Zilun Wang, Wei Meng, Michael R. LyuCCS 2025
  4. RPG: Rust Library Fuzzing with Pool-based Fuzz Target Generation and Generic SupportZhiwu Xu, Bohao Wu, Cheng Wen, Bin Zhang 等ICSE 2024 · 9 次引用
  5. Clozemaster: Fuzzing Rust Compiler by Harnessing Llms for Infilling Masked Real ProgramsHongyan Gao, Yibiao Yang, Maolin Sun, Jiangchang Wu 等ICSE 2025 · 6 次引用
黄昏的海面,两侧是细线勾勒的悬崖