DocumentCode
3696679
Title
Automated memory leak diagnosis by regression testing
Author
Mohammadreza Ghanavati;Artur Andrzejak
Author_Institution
Institute of Computer Science, Heidelberg University, Germany
fYear
2015
Firstpage
191
Lastpage
200
Abstract
Memory leaks are tedious to detect and require significant debugging effort to be reproduced and localized. In particular, many of such bugs escape classical testing processes used in software development. One of the reasons is that unit and integration tests run too short for leaks to manifest via memory bloat or degraded performance. Moreover, many of such defects are environment-sensitive and not triggered by a test suite. Consequently, leaks are frequently discovered in the production scenario, causing elevated costs. In this paper we propose an approach for automated diagnosis of memory leaks during the development phase. Our technique is based on regression testing and exploits existing test suites. The key idea is to compare object (de-)allocation statistics (collected during unit/integration test executions) between a previous and the current software version. By grouping these statistics according to object creation sites we can detect anomalies and pinpoint the potential root causes of memory leaks. Such diagnosis can be completed before a visible memory bloat occurs, and in time proportional to the execution of test suite. We evaluate our approach using real leaks found in 7 Java applications. Results show that our approach has sufficient detection accuracy and is effective in isolating the leaky allocation site: true defect locations rank relatively high in the lists of suspicious code locations if the tests trigger the leak pattern. Our prototypical system imposes an acceptable instrumentation and execution overhead for practical memory leak detection even in large software projects.
Keywords
"Resource management","Software","Testing","Java","Instruments","Leak detection","Debugging"
Publisher
ieee
Conference_Titel
Source Code Analysis and Manipulation (SCAM), 2015 IEEE 15th International Working Conference on
Type
conf
DOI
10.1109/SCAM.2015.7335415
Filename
7335415
Link To Document