Paper record
W1991546210Practical memory leak detection using guarded value-flow analysis
Sigmund Cherem, Lonnie Princehouse, Radu Rugina
- Year
- 2007
- Venue
- ACM SIGPLAN Conference on Programming Language Design and Implementation (PLDI)
- References
- 23
- Cited by
- 200
Details and counts from OpenAlex.
Abstract
This paper presents a practical inter-procedural analysis algorithm for detecting memory leaks in C programs. Our algorithm tracks the flow of values from allocation points to deallocation points using a sparse representation of the program consisting of a value flow graph that captures def-use relations and value flows via program assignments. Edges in the graph are annotated with guards that describe branch conditions in the program. The memory leak analysis is reduced to a reachability problem over the guarded value flowgraph. Our implemented tool has been effective at detecting more than 60 memory leaks in the SPEC2000 benchmarks and in two open-source applications, bash and sshd, while keeping the false positive rate below 20%. The sparse program representation makes the tool efficient in practice, and allows it to report concise error messages.