Incremental Resource Leak Detection for Large Scale Source Code

Zhi Wei Gao, Wei Xing Ji*, Jian Jun Shi, Yi Zhuo Wang, Yu Jin Gao, Xin Yi Liao, Hui Luo, Feng Shi

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

Resource leak is an important software defect that affects the quality and reliability of software and may cause program abnormality or even system crash. Static analysis is an effective defect detection method which can identify potential resource leaks in source code or executable binary. However, as the scale of programs increases, the complexity of accurate resource leak detection rises exponentially, thereby making it difficult to meet the demand of just-in-time defect detection for large practical applications. In this paper, an incremental static resource leak detection algorithm is proposed for large-scale source code projects. The algorithm supports inter-procedural flow sensitive resource leak detection that allows developers to observe the impact of their changes immediately. Starting from the modified functions, this approach narrows down the scope of resource leak detection by generating method closures and performing points-to analysis to analyze hundreds of thousands of lines of source code in seconds. Experimental results show that the algorithm completes defect detection within 10s with a high accuracy on more than 90% of the tests, which makes it possible for just-in-time resource leak detection for practical applications.

Original languageEnglish
Pages (from-to)1244-1257
Number of pages14
JournalRuan Jian Xue Bao/Journal of Software
Volume29
Issue number5
DOIs
Publication statusPublished - 2018

Keywords

  • Data flow analysis
  • Defect detection
  • Points-to analysis
  • Quality assurance
  • Resource leak

Fingerprint

Dive into the research topics of 'Incremental Resource Leak Detection for Large Scale Source Code'. Together they form a unique fingerprint.

Cite this