2012 · 151 citations · 23 references
ComputingComputer EngineeringComputer ScienceCompilersOperating SystemsProgramming LanguagesControl-flow AnalysisData-flow AnalysisStatic Vulnerability AnalysisChainsFlow AnalysisHeap AnalysisMemory Leak DetectionMemory LeaksPointer AnalysisReachabilitySparse Data-flow Analysis
Recent advances in sparse pointer analysis enable Saber to be the first tool to use a full‑sparse value‑flow analysis for leak detection. The authors introduce Saber, a static detector for identifying memory leaks in C programs. Saber builds a sparse value‑flow graph that records def‑use chains and value flows for all memory locations, then applies field‑, flow‑, and context‑sensitivity across phases to solve a reachability problem on the graph and detect leaks. In experiments on 15 SPEC2000 C programs and five applications, Saber found 211 leaks with an 18.5% false‑positive rate, matching Sparrow’s accuracy while being 14.2× faster and reporting 40.7% more bugs than Fastcheck, though it is 3.7× slower than Fastcheck.
We introduce a static detector, Saber, for detecting memory leaks in C programs. Leveraging recent advances on sparse pointer analysis, Saber is the first to use a full-sparse value-flow analysis for leak detection. Saber tracks the flow of values from allocation to free sites using a sparse value-flow graph (SVFG) that captures def-use chains and value flows via assignments for all memory locations represented by both top-level and address-taken pointers. By exploiting field-, flow- and context-sensitivity during different phases of the analysis, Saber detects leaks in a program by solving a graph reachability problem on its SVFG. Saber, which is fully implemented in Open64, is effective at detecting 211 leaks in the 15 SPEC2000 C programs and five applications, while keeping the false positive rate at 18.5%. We have also compared Saber with Fastcheck (which analyzes allocated objects flowing only into top-level pointers) and Sparrow (which handles all allocated objects using abstract interpretation) using the 15 SPEC2000 C programs. Saber is as accurate as Sparrow but is 14.2X faster and reports 40.7% more bugs than Fastcheck at a slightly higher false positive rate but is only 3.7X slower.
23
Nicholas Nethercote, Julian Seward · 2007 · 2.3K citations
Precise interprocedural dataflow analysis via graph reachability
Thomas Reps, Susan Horwitz, Mooly Sagiv · 1995 · 1.2K citations