Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
skip to main content
10.1145/1297027.1297057acmconferencesArticle/Chapter ViewAbstractPublication PagessplashConference Proceedingsconference-collections
Article

Tracking bad apples: reporting the origin of null and undefined value errors

Published: 21 October 2007 Publication History

Abstract

Programs sometimes crash due to unusable values, for example, when Java and C# programs dereference null pointers and when C and C++ programs use undefined values to affect program behavior. A stack trace produced on such a crash identifies the effect of the unusable value, not its cause, and is often not much help to the programmer.
This paper presents efficient origin tracking of unusable values; it shows how to record where these values come into existence, correctly propagate them, and report them if they cause an error. The key idea is value piggybacking: when the original program stores an unusable value, value piggybacking instead stores origin information in the spare bits of the unusable value. Modest compiler support alters the program to propagate these modified values through operations such as assignments and comparisons. We evaluate two implementations: the first tracks null pointer origins in a JVM, and the second tracks undefined value origins in a memory-checking tool built with Valgrind. These implementations show that origin tracking via value piggybacking is fast and often useful, and in the Java case, has low enough overhead for use in a production environment.

References

[1]
H. Agrawal and J. R. Horgan. Dynamic Program Slicing. In ACM Conference on Programming Language Design and Implementation, pages 246--256, 1990.
[2]
E. Allen. Diagnosing Java Code: The Dangling Composite bug pattern. http://www--128.ibm.com/developerworks/-java/library/j-diag2/, 2001.
[3]
B. Alpern, C. R. Attanasio, J. J. Barton, M. G. Burke, P. Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeñno Virtual Machine. IBM Systems Journal, 39(1):211--238, 2000.
[4]
G. Ammons, T. Ball, and J. R. Larus. Exploiting Hardware Performance Counters with Flow and Context Sensitive Profiling. In ACM Conference on Programming Language Design and Implementation, pages 85--96, Las Vegas, NV, 1997.
[5]
M. Arnold, S. J. Fink, D. Grove, M. Hind, and P. F. Sweeney. Adaptive Optimization in the Jalapeño JVM. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 47--65, 2000.
[6]
A. Ayers, R. Schooler, C. Metcalf, A. Agarwal, J. Rhee, and E. Witchel. TraceBack: First Fault Diagnosis by Reconstruction of Distributed Control Flow. In ACM Conference on Programming Language Design and Implementation, pages 201--212, 2005.
[7]
E. D. Berger and B. G. Zorn. DieHard: Probabilistic Memory Safety for Unsafe Languages. In ACM Conference on Programming Language Design and Implementation, pages 158--168, 2006.
[8]
S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java Benchmarking Development and Analysis. In ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 169--190, 2006.
[9]
P. Chalin and P. James. Non-null references by default in java: Alleviating the nullity annotation burden. Technical Report 2006--003, Concordia University, 2006.
[10]
Eclipse.org Home. http://www.eclipse.org/.
[11]
C. Flanagan, K. R. M. Leino, M. Lillibridge, G. Nelson, J. B. Saxe, and R. Stata. Extended Static Checking for Java. In ACM Conference on Programming Language Design and Implementation, pages 234--245, 2002.
[12]
S. Hallem, B. Chelf, Y. Xie, and D. Engler. A System and Language for Building System-Specific, Static Analyses. In ACM Conference on Programming Language Design and Implementation, pages 69--82, 2002.
[13]
S. Hangal and M. S. Lam. Tracking Down Software Bugs Using Automatic Anomaly Detection. In ACM International Conference on Software Engineering, pages 291--301, 2002.
[14]
D. Hovemeyer and W. Pugh. Finding Bugs is Easy. In Companion to ACM Conference on Object-Oriented Programming, Systems, Languages, and Applications, pages 132--136, 2004.
[15]
D. Hovemeyer, J. Spacco, and W. Pugh. Evaluating and Tuning a Static Analysis to Find Null Pointer Bugs. In ACM Workshop on Program Analysis for Software Tools and Engineering, pages 13--19.
[16]
Jikes RVM. http://www.jikesrvm.org.
[17]
Jikes RVM Research Archive. http://www.jikesrvm.org/-Research+Archive.
[18]
Jikes RVM Research Archive. http://www.jikesrvm.org/-Research+Archive.
[19]
Jython-dev Mailing List. http://sourceforge.net/mailarchive/-forum.php?forum id=5587.
[20]
S. Kaufer, R. Lopez, and S. Pratap. Saber-C: An Interpreter-Based Programming Environment for the C Language. In Summer USENIX Conference, pages 161--71, 1988.
[21]
B. Liblit, M. Naik, A. X. Zheng, A. Aiken, and M. I. Jordan. Scalable Statistical Bug Isolation. In ACM Conference on Programming Language Design and Implementation, pages 15--26, 2005.
[22]
T. Lindholm and F. Yellin. The Java Virtual Machine Specification (2nd Edition). Prentice Hall PTR, 1999.
[23]
S. Lu, J. Tucek, F. Qin, and Y. Zhou. AVIO: Detecting Atomicity Violations via Access-Interleaving Invariants. In ACM International Conference on Architectural Support for Programming Languages and Operating Systems, pages 37--48, 2006.
[24]
Mckoi SQL Database. http://www.mckoi.com/database/.
[25]
N. Nethercote and A. Mycroft. Redux: A Dynamic Dataflow Tracer. Electronic Notes in Theoretical Computer Science, 89(2), 2003.
[26]
N. Nethercote and J. Seward. Valgrind: A Framework for Heavyweight Dynamic Binary Instrumentation. In ACM Conference on Programming Language Design and Implementation, pages 89--100, 2007.
[27]
J. Newsome and D. Song. Dynamic Taint Analysis for Automatic Detection, Analysis, and Signature Generation of Exploits on Commodity Software. In Network and Distributed System Security Symposium.
[28]
PMD. http://pmd.sourceforge.net.
[29]
F. Qin, J. Tucek, J. Sundaresan, and Y. Zhou. Rx: Treating Bugs as Allergies-A Safe Method to Survive Software Failures. In ACM Symposium on Operating System Principles, pages 235--248, 2005.
[30]
M. Rinard, C. Cadar, D. Dumitran, D. Roy, T. Leu, and J. Beebee. Enhancing Server Availability and Security through Failure-Oblivious Computing. In USENIX Symposium on Operating Systems Design and Implementation, pages 303--316, 2004.
[31]
J. Seward and N. Nethercote. Using Valgrind to Detect Undefined Value Errors with Bit-Precision. In USENIX Annual Technical Conference, pages 17--30, 2005.
[32]
SourceForge.net. http://www.sourceforge.net/.
[33]
Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, 1999.
[34]
Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01 edition, 2001.
[35]
B. Wiedermann. Personal communication, November 2006.
[36]
X. Zhang, S. Tallam, N. Gupta, and R. Gupta. Towards Locating Execution Omission Errors. In ACM Conference on Programming Language Design and Implementation, pages 415--424, 2007.
[37]
P. Zhou, W. Liu, L. Fei, S. Lu, F. Qin, Y. Zhou, S. Midkiff, and J. Torrellas. AccMon: Automatically Detecting Memoryrelated Bugs via Program Counter based Invariants. In IEEE/ACM International Symposium on Microarchitecture, pages 269--280, 2004.

Cited By

View all
  • (2024)WASMDYPA: Effectively Detecting WebAssembly Bugs via Dynamic Program Analysis2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00037(296-307)Online publication date: 12-Mar-2024
  • (2020)Fast linear programming through transprecision computing on small and sparse dataProceedings of the ACM on Programming Languages10.1145/34282634:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2020)Pomsets with preconditions: a simple model of relaxed memoryProceedings of the ACM on Programming Languages10.1145/34282624:OOPSLA(1-30)Online publication date: 13-Nov-2020
  • Show More Cited By

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
OOPSLA '07: Proceedings of the 22nd annual ACM SIGPLAN conference on Object-oriented programming systems, languages and applications
October 2007
728 pages
ISBN:9781595937865
DOI:10.1145/1297027
  • cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 42, Issue 10
    Proceedings of the 2007 OOPSLA conference
    October 2007
    686 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/1297105
    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: 21 October 2007

Permissions

Request permissions for this article.

Check for updates

Author Tags

  1. debugging
  2. java
  3. low-overhead run-time support
  4. managed languages
  5. null pointer exceptions
  6. undefined values
  7. valgrind

Qualifiers

  • Article

Conference

OOPSLA07
Sponsor:

Acceptance Rates

OOPSLA '07 Paper Acceptance Rate 33 of 156 submissions, 21%;
Overall Acceptance Rate 268 of 1,244 submissions, 22%

Upcoming Conference

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • Downloads (Last 12 months)14
  • Downloads (Last 6 weeks)0
Reflects downloads up to 25 Dec 2024

Other Metrics

Citations

Cited By

View all
  • (2024)WASMDYPA: Effectively Detecting WebAssembly Bugs via Dynamic Program Analysis2024 IEEE International Conference on Software Analysis, Evolution and Reengineering (SANER)10.1109/SANER60148.2024.00037(296-307)Online publication date: 12-Mar-2024
  • (2020)Fast linear programming through transprecision computing on small and sparse dataProceedings of the ACM on Programming Languages10.1145/34282634:OOPSLA(1-28)Online publication date: 13-Nov-2020
  • (2020)Pomsets with preconditions: a simple model of relaxed memoryProceedings of the ACM on Programming Languages10.1145/34282624:OOPSLA(1-30)Online publication date: 13-Nov-2020
  • (2020)Guided linking: dynamic linking without the costsProceedings of the ACM on Programming Languages10.1145/34282134:OOPSLA(1-29)Online publication date: 13-Nov-2020
  • (2020)A model for detecting faults in build specificationsProceedings of the ACM on Programming Languages10.1145/34282124:OOPSLA(1-30)Online publication date: 13-Nov-2020
  • (2020)WATCHER: in-situ failure diagnosisProceedings of the ACM on Programming Languages10.1145/34282114:OOPSLA(1-27)Online publication date: 13-Nov-2020
  • (2020)Endicheck: Dynamic Analysis for Detecting Endianness BugsTools and Algorithms for the Construction and Analysis of Systems10.1007/978-3-030-45237-7_15(254-270)Online publication date: 17-Apr-2020
  • (2019)Valence: variable length calling context encodingProceedings of the 28th International Conference on Compiler Construction10.1145/3302516.3307351(147-158)Online publication date: 16-Feb-2019
  • (2019)WasabiProceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3297858.3304068(1045-1058)Online publication date: 4-Apr-2019
  • (2019)CheriABIProceedings of the Twenty-Fourth International Conference on Architectural Support for Programming Languages and Operating Systems10.1145/3297858.3304042(379-393)Online publication date: 4-Apr-2019
  • 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

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media