A Novel Memory Leak Classification for Evaluating the Applicability of Static Analysis Tools

Sen Zhang,Jingwen Zhu,Ao Liu,Weijing Wang,Chenkai Guo,Jing Xu
DOI: https://doi.org/10.1109/pic.2018.8706142
2018-01-01
Abstract:Memory leaks in software have proved to be widespread in C programs. Much research has been done to analyze and detect memory leaks statically. However, due to the complexity and variety of memory leak vulnerabilities, it is difficult to propose a static method that can detect all kinds of memory leaks. In this paper, we propose a method to investigate the applicability of static analysis tools to detect various kinds of memory leaks. We first divide memory leak vulnerabilities into 11 categories, from the perspectives of heap memory behaviors and program structures. According to this classification, we design and implement a pattern-based system to generate a program dataset named HPMD (Heap Program Memory Dataset) that contains a variety of memory leaks. Experiments on open source repositories show that compared with existing datasets, HPMD can evaluate current tools in terms of their ability to detect various kinds of memory leaks, and can recommend reasonable tools given a specific program.
What problem does this paper attempt to address?