ComputingComputer EngineeringComputer ScienceFault ToleranceFault-tolerant SystemsProgramming LanguagesControl-flow AnalysisData-flow AnalysisError CorrectionError DetectionGarbage CollectionStatic Code AnalysisAutomated Program RepairAutomatic Graph LabelingHeap AnalysisHeap ModelingMemory RepairProgram RepairStatic Bug DetectionUse-after-free Analysis
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.
65
Automatically finding patches using genetic programming
Westley Weimer, ThanhVu Nguyen, Claire Le Goues et al. · 2009 · 772 citations
Sergey Mechtaev, Jooyong Yi, Abhik Roychoudhury · 2016 · 509 citations
Automatic patch generation by learning correct code
Fan Long, Martin Rinard · 2016 · 488 citations · Full text
Automatic patch generation learned from human-written patches
2013 · 457 citations