Abstract. We present a novel leak detection algorithm. To prove the absence of a memory leak, the algorithm assumes its presence and runs a backward heap analysis to disprove this assumption. We have implemented this approach in a memory leak analysis tool and used it to analyze several routines that manipulate linked lists and trees. Because of the reverse nature of the algorithm, the analysis can locally reason about the absence of memory leaks. We have also used the tool as a scalable, but unsound leak detector for C programs. The tool has found several bugs in larger programs from the SPEC2000 suite.
Orlovich and Rugina REF proposed a leak detection algorithm that assumes the presence of leaks and runs a reverse heap analysis to disprove the assumption.
Memory leak analysis by contradiction
In Proceedings of the 13th International Static Analysis Symposium
Computer Science