2013 International Symposium on Software Testing and Analysis (ISSTA), July 15–20, 2013, Lugano, Switzerland

Desktop Layout

Heap Analysis and Testing
Technical Research
Auditorium, Chair: Antonio Carzaniga
Dynamically Validating Static Memory Leak Warnings
Mengchen Li, Yuanjun Chen, Linzhang Wang, and Guoqing Xu
(Nanjing University, China; UC Irvine, USA)
Publisher's Version
Abstract: File Edit Options Buffers Tools TeX Help Memory leaks have significant impact on software availability, performance, and security. Static analysis has been widely used to find memory leaks in C/C++ programs. Although a static analysis is able to find all potential leaks in a program, it often reports a great number of false warnings. Manually validating these warnings is a daunting task, which significantly limits the practicality of the analysis. In this paper, we develop a novel dynamic technique that automatically validates and categorizes such warnings to unleash the power of static memory leak detectors. Our technique analyzes each warning that contains information regarding the leaking allocation site and the leaking path, generates test cases to cover the leaking path, and tracks objects created by the leaking allocation site. Eventually, warnings are classified into four categories: MUST-LEAK, LIKELY-NOT-LEAK, BLOAT, and MAY-LEAK. Warnings in MUST-LEAK are guaranteed by our analysis to be true leaks. Warnings in LIKELY-NOT-LEAK are highly likely to be false warnings. Although we cannot provide any formal guarantee that they are not leaks, we have high confidence that this is the case. Warnings in BLOAT are also not likely to be leaks but they should be fixed to improve performance. Using our approach, the developer's manual validation effort needs to be focused only on warnings in the category MAY-LEAK, which is often much smaller than the original set.

Authors:


Time stamp: 2019-04-24T04:41:13+02:00