SAVER: scalable, precise, and safe memory-error repair
Seongjoon Hong, Junhee Lee, Jeongsoo Lee, Hakjoo Oh
Abstract
We present SAVER, a new memory-error repair technique for C programs. Memory errors such as memory leak, double-free, and use-after-free are highly prevalent and fixing them requires significant effort. Automated program repair techniques hold the promise of reducing this burden but the state-of-the-art is still unsatisfactory. In particular, no existing techniques are able to fix those errors in a scalable, precise, and safe way, all of which are required for a truly practical tool. SAVER aims to address these shortcomings. To this end, we propose a method based on a novel representation of the program called object flow graph, which summarizes the program's heap-related behavior using static analysis. We show that fixing memory errors can be formulated as a graph labeling problem over object flow graph and present an efficient algorithm. We evaluated SAVER in combination with Infer, an industrial-strength static bug-finder, and show that 74% of the reported errors can be fixed automatically for a range of open-source C programs.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 0da9bc5a-075d-4792-8f3b-a1eec269cce9Cited by top-tier papers22
- Domain Knowledge Matters: Improving Prompts with Fix Templates for Repairing Python Type ErrorsYun Peng, Shuzheng Gao, Cuiyun Gao, Yintong Huo et al.ICSE 2024 · 39 citations
- Out of Sight, Out of Mind: Better Automatic Vulnerability Repair by Broadening Input Ranges and SourcesXin Zhou, Kisub Kim, Bowen Xu, DongGyun Han et al.ICSE 2024 · 32 citations
- Learning graph-based heuristics for pointer analysis without handcrafting application-specific featuresMinseok Jeon, Myungho Lee, Hakjoo OhOOPSLA 2020 · 29 citations
- Context-aware and data-driven feedback generation for programming assignmentsDowon Song, Woosuk Lee, Hakjoo OhFSE 2021 · 22 citations
- Program Repair Guided by Datalog-Defined Static AnalysisYu Liu, Sergey Mechtaev, Pavle Subotic, Abhik RoychoudhuryFSE 2023 · 14 citations
Related papers
- TLR: Codebase-Level C Memory Management Error Repair with Large Language ModelsXiao Cheng, Zhihao Guo, Huan Huo, Yulei SuiFSE 2026 · 1 citation
- Runtime detection of memory errors with smart statusZhe Chen, Chong Wang, Junqi Yan, Yulei Sui et al.ISSTA 2021 · 16 citations
- Evaluating the Effectiveness of Memory Safety SanitizersEmanuel Q. Vintila, Philipp Zieris, Julian HorschS&P 2025
- Amur: Fixing Multi-Resource Leaks Guided by Resource Flow AnalysisJinyoung Kim, Eunseok LeeASE 2025
- UAFSan: an object-identifier-based dynamic approach for detecting use-after-free vulnerabilitiesBinfa Gui, Wei Song, Jeff HuangISSTA 2021 · 9 citations
