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 language | English |
---|---|
Pages (from-to) | 1244-1257 |
Number of pages | 14 |
Journal | Ruan Jian Xue Bao/Journal of Software |
Volume | 29 |
Issue number | 5 |
DOIs | |
Publication status | Published - 2018 |
Keywords
- Data flow analysis
- Defect detection
- Points-to analysis
- Quality assurance
- Resource leak