Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Suppose we want to make division by zero and null pointer dereference defined.

A good example is WebAssembly*—address 0x00000000 is a perfectly fine and well-defined address in linear memory. In practice though, most code you’ll come across targeting WebAssembly treats it as if dereferencing it is undefined behavior.

* Of course WebAssembly is a compiler target rather than a language, but it serves as a good example of the point you’re making.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: