DocumentCode :
73405
Title :
Detecting Memory Leaks Statically with Full-Sparse Value-Flow Analysis
Author :
Yulei Sui ; Ding Ye ; Jingling Xue
Author_Institution :
Program. Language & Compilers Group, Univ. of New South Wales, Sydney, NSW, Australia
Volume :
40
Issue :
2
fYear :
2014
fDate :
Feb. 2014
Firstpage :
107
Lastpage :
122
Abstract :
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 detecting memory leaks statically. 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 memory leaks in a program by solving a graph reachability problem on its SVFG. Saber, which is fully implemented in Open64, is effective at detecting 254 leaks in the 15 SPEC2000 C programs and seven applications, while keeping the false positive rate at 18.3 percent. Saber compares favorably with several static leak detectors in terms of accuracy (leaks and false alarms reported) and scalability (LOC analyzed per second). In particular, compared with Fastcheck (which analyzes allocated objects flowing only into top-level pointers) using the 15 SPEC2000 C programs, Saber detects 44.1 percent more leaks at a slightly higher false positive rate but is only a few times slower.
Keywords :
C language; program diagnostics; reachability analysis; storage management; Fastcheck; Open64; SPEC2000 C programs; SVFG; Saber static detector; address-taken pointers; context-sensitivity; def-use chains; false positive rate; field-sensitivity; flow-sensitivity; full-sparse value-flow analysis; graph reachability problem; memory leaks detection; memory locations; sparse pointer analysis; sparse value-flow graph; static leak detectors; top-level pointers; value flows; Abstracts; Accuracy; Detectors; Resource management; Scalability; Sensitivity; Standards; Memory Leaks; pointer analysis; sparse value-flow analysis; static analysis;
fLanguage :
English
Journal_Title :
Software Engineering, IEEE Transactions on
Publisher :
ieee
ISSN :
0098-5589
Type :
jour
DOI :
10.1109/TSE.2014.2302311
Filename :
6720116
Link To Document :
بازگشت