Nothing Special   »   [go: up one dir, main page]

skip to main content
10.1145/1108792.1108798acmconferencesArticle/Chapter ViewAbstractPublication PagespasteConference Proceedingsconference-collections
Article

Evaluating and tuning a static analysis to find null pointer bugs

Published: 05 September 2005 Publication History

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.

References

[1]
William R. Bush, Jonathan D. Pincus, and David J. Sielaff. A static analyzer for finding dynamic programming errors. Software---Practice and Experience, 30:775--802, 2000.
[2]
Manuvir Das, Sorin Lerner, and Mark Seigle. ESP: Path-sensitive program verification in polynomial time. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, pages 57--68. ACM Press, 2002.
[3]
Eclipse. http://www.eclipse.org, 2005.
[4]
D. Engler, B. Chelf, A. Chou, and S. Hallem. Checking system rules using system-specific, programmer-written compiler extensions. In Proceedings of the Fourth Symposium on Operating Systems Design and Implementation, San Diego, CA, October 2000.
[5]
D. Evans. Static detection of dynamic memory errors. In Proceedings of the SIGPLAN Conference on Programming Languages, Design, and Implementation, 1996.
[6]
Manuel Fähndrich and K. Rustan M. Leino. Declaring and checking non-null types in an object-oriented language. In OOPSLA '03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications, pages 302--312, New York, NY, USA, 2003. ACM Press.
[7]
C. Flanagan, K. Leino, M. Lillibridge, C. Nelson, J. Saxe, and R. Stata. Extended static checking for Java, 2002.
[8]
David Hovemeyer and William Pugh. Finding bugs is easy. In Companion of the 19th ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, Vancouver, BC, October 2004.
[9]
Atanas Rountev, Scott Kagan, and Michael Gibas. Evaluating the imprecision of static analysis. In PASTE '04: Proceedings of the ACM-SIGPLAN-SIGSOFT Workshop on Program Analysis for Software Tools and Engineering, pages 14--16, Washington DC, USA, 2004.
[10]
Jaime Spacco, Jaymie Strecker, David Hovemeyer, and William Pugh. Software repository mining with Marmoset: An automated programming project snapshot and testing system. In Proceedings of the Mining Software Repositories Workshop (MSR 2005), St. Louis, Missouri, USA, May 2005.
[11]
Yichen Xie and Dawson Engler. Using redundancies to find errors. In SIGSOFT '02/FSE-10: Proceedings of the 10th ACM SIGSOFT Symposium on Foundations of Software Engineering, pages 51--60, Charleston, South Carolina, USA, 2002.

Cited By

View all
  • (2024)Enhancing Field Tracking and Interprocedural Analysis to Find More Null Pointer Exceptions2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00093(849-859)Online publication date: 12-Mar-2024
  • (2023)Practical Inference of Nullability TypesProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616326(1395-1406)Online publication date: 30-Nov-2023
  • (2023)Mitigating False Positive Static Analysis Warnings: Progress, Challenges, and OpportunitiesIEEE Transactions on Software Engineering10.1109/TSE.2023.332966749:12(5154-5188)Online publication date: Dec-2023
  • Show More Cited By

Index Terms

  1. Evaluating and tuning a static analysis to find null pointer bugs

      Recommendations

      Comments

      Please enable JavaScript to view thecomments powered by Disqus.

      Information & Contributors

      Information

      Published In

      cover image ACM Conferences
      PASTE '05: Proceedings of the 6th ACM SIGPLAN-SIGSOFT workshop on Program analysis for software tools and engineering
      September 2005
      118 pages
      ISBN:1595932399
      DOI:10.1145/1108792
      • cover image ACM SIGSOFT Software Engineering Notes
        ACM SIGSOFT Software Engineering Notes  Volume 31, Issue 1
        January 2006
        203 pages
        ISSN:0163-5948
        DOI:10.1145/1108768
        Issue’s Table of Contents
      Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

      Sponsors

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      Published: 05 September 2005

      Permissions

      Request permissions for this article.

      Check for updates

      Author Tags

      1. static analysis
      2. testing

      Qualifiers

      • Article

      Conference

      PASTE05

      Acceptance Rates

      Overall Acceptance Rate 57 of 159 submissions, 36%

      Contributors

      Other Metrics

      Bibliometrics & Citations

      Bibliometrics

      Article Metrics

      • Downloads (Last 12 months)25
      • Downloads (Last 6 weeks)3
      Reflects downloads up to 14 Feb 2025

      Other Metrics

      Citations

      Cited By

      View all
      • (2024)Enhancing Field Tracking and Interprocedural Analysis to Find More Null Pointer Exceptions2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00093(849-859)Online publication date: 12-Mar-2024
      • (2023)Practical Inference of Nullability TypesProceedings of the 31st ACM Joint European Software Engineering Conference and Symposium on the Foundations of Software Engineering10.1145/3611643.3616326(1395-1406)Online publication date: 30-Nov-2023
      • (2023)Mitigating False Positive Static Analysis Warnings: Progress, Challenges, and OpportunitiesIEEE Transactions on Software Engineering10.1109/TSE.2023.332966749:12(5154-5188)Online publication date: Dec-2023
      • (2023)Pluggable Type Inference for Free2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)10.1109/ASE56229.2023.00186(1542-1554)Online publication date: 11-Sep-2023
      • (2023)GitHub Copilot AI pair programmer: Asset or Liability?Journal of Systems and Software10.1016/j.jss.2023.111734203(111734)Online publication date: Sep-2023
      • (2021)A Precise Framework for Source-Level Control-Flow Analysis2021 IEEE 21st International Working Conference on Source Code Analysis and Manipulation (SCAM)10.1109/SCAM52516.2021.00009(1-11)Online publication date: Sep-2021
      • (2019)Code transformation issues in move-instance-method refactoringsProceedings of the 3rd International Workshop on Refactoring10.1109/IWoR.2019.00011(17-22)Online publication date: 28-May-2019
      • (2019)Inferring Faults in Business Specifications Extracted from Source Code2019 26th Asia-Pacific Software Engineering Conference (APSEC)10.1109/APSEC48747.2019.00040(236-243)Online publication date: Dec-2019
      • (2018)Detection of Generalizable Clone Security Coding Bugs Using Graphs and Learning Algorithmsundefined10.12794/metadc1404548Online publication date: Dec-2018
      • (2018)Pinpoint: fast and precise sparse value flow analysis for million lines of codeACM SIGPLAN Notices10.1145/3296979.319241853:4(693-706)Online publication date: 11-Jun-2018
      • Show More Cited By

      View Options

      Login options

      View options

      PDF

      View or Download as a PDF file.

      PDF

      eReader

      View online with eReader.

      eReader

      Figures

      Tables

      Media

      Share

      Share

      Share this Publication link

      Share on social media