You'll need this for Chapter 10
The five bug classes you learn here are exactly what ownership prevents. Ch 10 shows the mechanism; this chapter explains the motivation.
Ch 10: Ownership →
Bug Poster
The Five Catastrophic Bug Classes
These five bug classes are not rare corner cases. They are recurring expressions of the same deeper problem: the program allows invalid memory or concurrency states to exist as ordinary states.
Landscape Diagram
The False Dichotomy: Fast and Unsafe vs Safe and Slow
Rust matters because it challenges the old tradeoff itself. The point is not that other languages are wrong; the point is that a systems language can pursue safety without giving up performance-class control.
Incident Diagram
Heartbleed as a Memory Disclosure Map
Heartbleed is the right kind of case study because it makes the risk physical. The process did not “throw an exception.” It copied bytes from the wrong region of memory and sent them back across the network.
This is the bug class that motivated Rust’s existence. Step through a use-after-free in C — and notice that no compiler error ever appears.
Interactive simulation (requires JavaScript): a C program mallocs a buffer, frees it, then reads through the stale pointer — the compiler never objects, and the read is undefined behavior at runtime. Rust's ownership rules reject the equivalent program at compile time.