Null pointers look simple on the surface, and that’s why they’re so dangerous. As compiler optimizations, intuitive but incorrect simplifications, and platform-specific quirks have piled on, the odds of making a wrong assumption have increased, leading to the proliferation of bugs and vulnerabilities.
This article explores common misconceptions about null pointers held by many programmers, starting with simple fallacies and working our way up to the weirdest cases. Some of them will be news only to beginners, while others may lead experts down the path of meticulous fact-checking. Without further ado, let’s dive in.
Virtual memory has nothing to do with whether 0 is a valid address. You can have a CPU where it is valid, or one where it isn’t and you’ll get an access fault if you try to access it. You can also have virtual memory where page 0 is mappable, or not.
I think the author knew that, based on the later points so it’s probably just bad wording. Interesting point about wasm too!