Skip to main content

Avoid a Void: The Eradication of Null Dereferencing

  • Chapter
  • First Online:

Abstract

All object-oriented programs, but also those in C or Pascal as soon as they use pointers, are subject to the risk of run-time crash due to “null pointer dereferencing”. Until recently this was the case even in statically typed languages. Tony Hoare has called this problem his “billion-dollar mistake”. In the type system of ISO-standard Eiffel, the risk no longer exists: void safety (the absence of null pointer dereferencing) has become a property guaranteed by the type system and enforced by the compiler. The mechanism is fully implemented and major libraries and applications have been made void-safe. This presentation describes the principles of Eiffel’s void safety, their implementation and the lessons gained.

This is a preview of subscription content, log in via an institution.

Buying options

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   129.00
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD   169.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info
Hardcover Book
USD   169.99
Price excludes VAT (USA)
  • Durable hardcover edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

References

  1. Barnett, M., Leino, R., Schulte, W.: The Spec# Programming System; CASSIS 2004, Lecture Notes in Computer Science 3362, Springer, Heidelberg (2004).

    Google Scholar 

  2. Chambers, C. et al.: Papers on the Self language at research.sun.com/self/papers/papers.html.

    Google Scholar 

  3. Eiffel community: Void safety migration guide, at dev.eiffel.com/Void-Safe_Library_Status.

    Google Scholar 

  4. Fähndrich, M., Leino, R.: Declaring and Checking Non-null Types in an Object-Oriented Language; in OOPSLA 2003, SIGPLAN Notices, vol. 38, no. 11, pp. 302–312. ACM, New York (November 2003).

    Article  Google Scholar 

  5. ECMA Technical Group TG49-TG4 (Eiffel) of ECMA Technical Committee 49 (Programming Languages): Standard ECMA-367 and ISO/IEC 25436:2006, Eiffel Analysis, Design and Programming Language, 2nd edition. ECMA International and International Standards Organization, Geneva (June 2006).

    Google Scholar 

  6. Hoare, C.A.R.: Null References: The Billion Dollar Mistake, abstract of talk at QCon London, 9–12 March 2009, at qconlondon.com/london-2009/presentation/Null + References: + The + Billion + Dollar + Mistake.

    Google Scholar 

  7. Hoare, C.A.R., Misra, J.: In: Meyer, B., Woodcock, J. (eds.) Verified Software: Theories, Tools, Experiments, Vision of a Grand Challenge Project, pp. 1–18. VSTTE 2005. Lecture Notes in Computer Science 4171. Springer, Heidelberg (2008).

    Google Scholar 

  8. Meyer, B.: Object-Oriented Software Construction, 2nd edn. Prentice Hall, Upper Saddle River, NJ (1997).

    MATH  Google Scholar 

  9. Meyer, B.: In: Davies, J., Roscoe, B., Woodcock, J. (eds.) Principles of Language Design and Evolution, in Millenial Perspectives in Computer Science (Proceedings of the 1999 Oxford-Microsoft Symposium in Honour of Sir Tony Hoare), pp. 229–246. Cornerstones of Computing. Palgrave, Basingstoke-New York (2000).

    Google Scholar 

  10. Meyer, B.: In: Black, A. (ed.) Attached Types and Their Application to Three Open Problems of Object-Oriented Programming, pp. 1–32. In ECOOP 2005 (Proceedings of European Conference on Object-Oriented Programming, Edinburgh, 25–29 July 2005). Lecture Notes in Computer Science 3586. Springer, Heidelberg (2005).

    Google Scholar 

  11. SCOOP concurrency mechanism, see references at se.ethz.ch/research/scoop.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Bertrand Meyer .

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 2010 Springer London

About this chapter

Cite this chapter

Meyer, B., Kogtenkov, A., Stapf, E. (2010). Avoid a Void: The Eradication of Null Dereferencing. In: Roscoe, A., Jones, C., Wood, K. (eds) Reflections on the Work of C.A.R. Hoare. Springer, London. https://doi.org/10.1007/978-1-84882-912-1_9

Download citation

  • DOI: https://doi.org/10.1007/978-1-84882-912-1_9

  • Published:

  • Publisher Name: Springer, London

  • Print ISBN: 978-1-84882-911-4

  • Online ISBN: 978-1-84882-912-1

  • eBook Packages: Computer ScienceComputer Science (R0)

Publish with us

Policies and ethics