Skip to content
Open access

RICE: Harnessing LLMs and Historical Issues to Discover Internal Rust Compiler Errors

Oct 2026 · Proceedings of the ACM on Software Engineering · Vol 3, pp. 4264 - 4287 · 0 citations · 53 references

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 PDF

We use cookies to run the site and, with your consent, for analytics and to show ads. See our Cookie Policy.