arXiv:2610.37343cs.SEOct 2026

Manuscript Offprint

arXiv:2610.37343

HIDE: Hierarchical Isolation via Documentation and Evidence for Rustc Bugs

Tianrong Zhang, Yakun Zhang, Dan Hao

TIANRONG ZHANG, Peking University Shenzhen Graduate School, China

YAKUN ZHANG, Harbin Institute of Technology, Shenzhen, China

DAN HAO, Peking University Shenzhen Graduate School, China

Rustc bugs can prevent valid programs from compiling or cause incorrect compilation results, making the identification of responsible source files essential for repair. Using large language models (LLMs) for rustc bug isolation raises three challenges. First, distributed compiler functionality requires understanding both what individual files do and how they work together. Second, a large source file search space makes exhaustive analysis of all files costly. Third, including documentation and source code for many candidate files in LLM prompts leads to context overload, which can reduce bug isolation accuracy. To address these challenges, we propose HIDE, a hierarchical LLM-based approach that combines compiler documentation with bug evidence to rank suspicious rustc source files. Given a rustc revision and a bug context, HIDE consists of two stages that generate compiler documentation and narrow the search space. To understand distributed compiler functionality, the Layered Documentation Aggregation stage summarizes what individual files do and how files with similar functions work together. To reduce the large source file search space, the Hierarchical Bug Isolation stage uses hierarchical candidate selection to reduce the number of files requiring detailed analysis. To mitigate context overload, this stage uses Scoped Candidate Competition and Evidence-Guided Code Slicing to limit the number of candidates and the amount of source code included in each prompt, respectively. We evaluate HIDE on 160 reproducible rustc bugs and compare it with Agentless, SoapFL, and GraphLocator. With GPT-5.4, HIDE achieves 42.08% Accuracy@1 and 80.42% Accuracy@10, exceeding the strongest baseline results by 5.83% and 6.04%, respectively. These results demonstrate that generating compiler documentation, narrowing candidates hierarchically, and limiting analysis context enable effective rustc bug isolation.

CCS Concepts: • Software and its engineering → Compilers; Software defect analysis.

Additional Key Words and Phrases: Compiler bug isolation, Rust compiler, Large language models, Hierarchical search, Query traces

1 Introduction

Rustc is the primary compiler for Rust, a programming language that combines high execution efficiency with strong memory-safety and concurrency-safety guarantees [13]. Rustc translates source programs while performing checks and analyses to enforce these guarantees. Rustc is therefore expected to compile programs correctly and enforce these guarantees so that Rust software can be built and trusted. However, rustc bugs may terminate compilation, reject valid programs, or accept invalid programs [12]. These failures can block Rust software builds or undermine trust in the compiled software by producing incorrect compilation results. To repair these bugs, developers first need to identify the responsible compiler source files. This task, known as compiler bug isolation (CBI), is challenging in a large, evolving repository with strong dependencies among source files. Effective compiler bug isolation can reduce the costs of understanding the compiler architecture, tracing compilation behavior, and isolating bugs.

Existing bug-isolation methods fall into two broad categories: general methods and compiler-specific methods. General methods use semantic relevance, execution behavior, or code dependencies to locate faults and increasingly employ large language models (LLMs) to interpret such evidence [1,4,5,8,9,17,27,28,31][1, 4, 5, 8, 9, 17, 27, 28, 31]. Although broadly applicable,

Authors' Contact Information: Tianrong Zhang, tianrongzhang25@stu.pku.edu.cn, Peking University Shenzhen Graduate School, China; Yakun Zhang, zhangyk@hit.edu.cn, Harbin Institute of Technology, Shenzhen, China; Dan Hao, haodan@pku.edu.cn, Peking University Shenzhen Graduate School, China.

  1. Manuscript submitted to ACM

Zhang et al.

they do not explicitly exploit rustc's source organization and compiler execution behavior. Compiler-specific methods obtain contrasting executions by mutating failing programs, varying compiler configurations, or skipping compilation steps [10, 24, 30]. Although LLM4CBI [24] uses LLMs for tasks such as guiding program mutation, its localization evidence still comes primarily from execution differences, without reasoning about how dependent source files jointly implement compiler functionality. LLM reasoning is therefore not unique to compiler bug isolation. The open problem is how to combine it with rustc-specific structure and execution evidence. This motivates using LLMs to understand compiler source code while exploiting rustc-specific information to guide bug isolation.

Using LLMs for rustc bug isolation raises three implementation challenges. First, distributed compiler functionality requires understanding both what individual files do and how they work together. Second, a large source file search space makes exhaustive analysis of all files costly. Third, including documentation and source code for many candidate files in LLM prompts leads to context overload, which can reduce bug isolation accuracy.

To address these challenges, we propose HIDE, a hierarchical LLM-based approach that combines compiler documentation with bug evidence to rank suspicious rustc source files. HIDE consists of two stages: Layered Documentation Aggregation and Hierarchical Bug Isolation. Given a rustc revision and a bug context, HIDE generates compiler documentation to guide progressive candidate selection from crates to modules to files. To understand distributed compiler functionality, the Layered Documentation Aggregation stage summarizes what individual files do and how files with similar functions work together. To reduce the large source file search space, the Hierarchical Bug Isolation stage uses hierarchical candidate selection to reduce the number of files requiring detailed analysis. To mitigate context overload, the Hierarchical Bug Isolation stage uses two mechanisms, Scoped Candidate Competition and Evidence-Guided Code Slicing, to limit the number of candidates and the amount of source code included in each prompt, respectively.

We evaluate HIDE on 160 reproducible rustc bugs and compare it with Agentless [27], SoapFL [17], and GraphLocator [9], representing semantics-based, execution-based, and dependency-based approaches, respectively. The evaluation yields four main findings. (1) For effectiveness, HIDE achieves 42.08% Accuracy@1 and 80.42% Accuracy@10, exceeding the strongest baseline results by 5.83% and 6.04%, respectively. (2) For efficiency, HIDE averages 154 seconds and 145,413 tokens per bug, achieving the lowest average execution time and consuming substantially fewer tokens than Agentless and SoapFL. (3) For generalizability, HIDE obtains mean Accuracy@10 values between 76.04% and 80.42% with GPT-5.4, Gemini-3.1-Pro-Preview, and DeepSeek-V4-Pro, supporting its robustness across different LLMs. (4) In the ablation study, all ablated variants achieve lower Accuracy@k than HIDE, supporting the contributions of the proposed stages, components, and mechanisms.

Our main contributions are as follows:

• We propose HIDE, a hierarchical LLM-based approach that combines compiler documentation with bug evidence to rank suspicious rustc source files.

• We propose the Layered Documentation Aggregation stage, which provides hierarchical documentation summarizing what individual files do and how files with similar functions work together.

• We propose the Hierarchical Bug Isolation stage, which uses hierarchical candidate selection to reduce the number of files requiring detailed analysis. Its two mechanisms, Scoped Candidate Competition and Evidence-Guided Code Slicing, mitigate context overload by limiting the number of candidates and the amount of source code included in each prompt, respectively.

• We conduct a comprehensive evaluation on 160 reproducible rustc bugs with three LLMs and three representative baselines. HIDE achieves the best results at every reported accuracy metric and the lowest average execution time. Results across different LLMs support its robustness, while the ablation study supports the contributions of its stages, components, and mechanisms. The code is available at https://github.com/zhangtr02/HIDE.

References (7)