A Static Memory Leak Detection Method Based on Executable Source Code

Yunzhan Gong · Journal of Inner Mongolia University · 2011

In many large-scale C or C++ projects,memory leak is a very common error.Memory leak is difficult to identify,because its feature is only a slow increase in memory consumption.The causes of memory leak is analyzed and a static detection method based on executable source code is proposed.The source code is preprocessed and the Abstract syntax tree and control flow graph are generated,and then the reachable paths are calculated in order to detect and analyze memory leaks for every generated path.This method is applied in Defect Testing System(a software defect detecting tool),a lot of open source projects of GCC are tested.The results showed that this method is effective and correct.

Read the paper · More papers on PaperTik