Evaluating and tuning a static analysis to find null pointer bugs
Authors:
Open Access
- 5 September 2005
- conference paper
- Published by Association for Computing Machinery (ACM)
- Vol. 31 (1) , 13-19
Abstract
Using static analysis to detect memory access errors, such as null pointer dereferences, is not a new problem. However, much of the previous work has used rather sophisticated analysis techniques in order to detect such errors.In this paper we show that simple analysis techniques can be used to identify many such software defects, both in production code and in student code. In order to make our analysis both simple and effective, we use a non-standard analysis which is neither complete nor sound. However, we find that it is effective at finding an interesting class of software defects.We describe the basic analysis we perform, as well as the additional errors we can detect using techniques such as annotations and inter-procedural analysis.In studies of both production software and student projects, we find false positive rates of around 20% or less. In the student code base, we find that our static analysis techniques are able to pinpoint 50% to 80% of the defects leading to a null pointer exception at runtime.Keywords
This publication has 8 references indexed in Scilit:
- Software repository mining with Marmoset2005
- Finding bugs is easy2004
- Evaluating the imprecision of static analysis2004
- Declaring and checking non-null types in an object-oriented language2003
- Using redundancies to find errors2002
- ESP2002
- A static analyzer for finding dynamic programming errorsSoftware: Practice and Experience, 2000
- Static detection of dynamic memory errors1996