Tracing Errors, Constructing Fixes: Repository-Level Memory Error Repair via Typestate-Guided Context Retrieval
Xiao Cheng, Zhihao Guo, Huan Huo, Yulei Sui

TL;DR
This paper presents LTFix, an innovative method leveraging large language models and typestate-guided context retrieval to improve automated repair of complex memory errors in C programs across multiple files.
Contribution
LTFix introduces a typestate-guided approach to enhance LLM-based memory error repair, effectively handling interprocedural errors and context limitations in repository-wide analysis.
Findings
Successfully repairs complex memory errors across multiple files
Addresses LLM context window limitations with typestate-guided retrieval
Enhances interpretability and effectiveness of automated memory error repair
Abstract
Memory-related errors in C programming continue to pose significant challenges in software development, primarily due to the complexities of manual memory management inherent in the language. These errors frequently serve as vectors for severe vulnerabilities, while their repair requires extensive knowledge of program logic and C's memory model. Automated Program Repair (APR) has emerged as a critical research area to address these challenges. Traditional APR approaches rely on expert-designed strategies and predefined templates, which are labor-intensive and constrained by the effectiveness of manual specifications. Deep learning techniques offer a promising alternative by automatically extracting repair patterns, but they require substantial training datasets and often lack interpretability. This paper introduces LTFix, a novel approach that harnesses the potential of Large Language…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
