Re-examining the 'Billion Dollar Mistake': Why Null Pointers Are Not the Primary Memory Safety Problem
By
signa11
Master baker tier. Every paragraph earns its place on the tray.
Summary
The article challenges the conventional wisdom about null pointers being a 'Billion Dollar Mistake' by Tony Hoare. It argues that null pointer dereferences are actually the easiest class of invalid memory addresses to catch at runtime and are the least common type of memory errors in unsafe languages. The author contends that proposed solutions to eliminate null pointers have significant trade-offs that aren't obvious, and the perception of null pointers as a problem stems from an 'individual-element mindset' rather than considering the broader context of memory safety issues.
Key quotes
· 5 pullednull pointer dereferences are empirically the easiest class of invalid memory addresses to catch at runtime
the least common kind of invalid memory addresses that happen in memory unsafe languages
the trivial solutions to remove the 'problem' null pointers have numerous trade-offs which are not obvious
the cause of why people think it is a 'problem' comes from a specific kind of individual-element mindset
Most people have probably heard of the Billion Dollar Mistake before, which was coined/invented by Tony Hoare: the inventor of null references
You might also wanna read
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
A Formal Proof That Jira Is Turing-Complete via Minsky Machine Implementation
This article provides a formal proof that Jira (Atlassian's project-tracking tool) is Turing-complete by demonstrating how to build a Minsky
A Practitioner's Perspective on Program Analysis and Software Correctness
The article presents a practitioner's perspective on program analysis, reflecting on a decade-long journey to understand how to write correc
Compiler Determinism: Computer Science Theory vs. Engineering Reality
The article explores whether compilers are deterministic, presenting both computer science and engineering perspectives. The computer scienc
Compiler Engineering Fundamentals: Defining What a Compiler Is
This article is the first part of a blog series called "Compiler Engineering in Practice" that aims to document practical compiler developme
Technical Analysis of Robin Hood Hash Table Implementation with Linear Probing
The article presents a technical discussion of a specific hash table implementation called "Robin Hood open-addressing with linear probing a
