Evaluating and tuning a static analysis to find null pointer bugs
- 5 September 2005
- proceedings article
- Published by Association for Computing Machinery (ACM)
- Vol. 31 (1) , 13-19
- https://doi.org/10.1145/1108792.1108798
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 MarmosetPublished by Association for Computing Machinery (ACM) ,2005
- Finding bugs is easyPublished by Association for Computing Machinery (ACM) ,2004
- Evaluating the imprecision of static analysisPublished by Association for Computing Machinery (ACM) ,2004
- Declaring and checking non-null types in an object-oriented languagePublished by Association for Computing Machinery (ACM) ,2003
- Using redundancies to find errorsPublished by Association for Computing Machinery (ACM) ,2002
- ESPPublished by Association for Computing Machinery (ACM) ,2002
- A static analyzer for finding dynamic programming errorsSoftware: Practice and Experience, 2000
- Static detection of dynamic memory errorsPublished by Association for Computing Machinery (ACM) ,1996