RICE: Harnessing LLMs and Historical Issues to Discover Internal Rust Compiler Errors
Langyi Lu, Wei You, Bin Liang, Jianjun Huang
Key points
From the paper's conclusion- Our results demonstrate that systematically leveraging historical defect-prone patterns enables more effective testing, accelerates bug fixing, and enhances regression testing in Rust compilers
Abstract
Rust is a modern system-level programming language that emphasizes safety, concurrency, and performance. Ensuring the reliability of the Rust compiler is critical, as undetected compiler defects, particularly internal compiler errors (ICEs), can lead to runtime crashes or undefined behavior in system software. Existing compiler testing methods, including generation-based, mutation-based, and recent LLM-driven approaches, are limited in their ability to systematically uncover ICEs triggered by advanced language features or complex code interactions. In this paper, we propose RICE, an LLM-assisted Rust compiler testing framework that generates test cases by adapting defect-prone patterns extracted from historical ICE issues to diverse code contexts in the official test suite. RICE features simplification-guided identification of defect-prone patterns and context- aware adaptation of patterns to maintain compilability and meaningful semantic interactions. Applied to multiple recent Rust compiler releases, RICE discovered 37 ICEs, including 15 previously unknown zero-day bugs, outperforming existing testing tools in code coverage and ICE discovery. Our results demonstrate that systematically leveraging historical defect-prone patterns enables more effective testing, accelerates bug fixing, and enhances regression testing in Rust compilers
Read the paper
Discussion
Science Skim's AI key points, plus readers' public thoughts
Readers' thoughts
No reader thoughts yet.
Related papers
- HIDE: Hierarchical Isolation via Documentation and Evidence for Rustc BugsarXiv · 2026
- Evaluating and Improving Static Application Security Testing Tools for RustarXiv · 2026
- Rust’s Type Checker Implementation Is Unsound: An Empirical Study on Soundness Bugs in rustcProceedings of the ACM on Software Engineering · 2026
- Agentic Discovery of Soundness Bugs in Safe Rust BindingsarXiv · 2026
- Re-Testing LLM-Based C-to-Rust Translations Against Their Original CarXiv · 2026
- Building Sound Evaluation Practices for Rust-Based Security FrameworksarXiv · 2026