3 ms·
> What would such a language say about the behavior of integer overflow Two's complement (i.e. the result which is equivalent to the mathematical answer modulo
by dooglius 3y ago
> What would such a language say about the behavior of integer overflow
Two's complement (i.e. the result which is equivalent to the mathematical answer modulo 2^{width})
> dereferencing a null pointer
A load/store instruction to address zero.
> writing outside the bounds of an array object
A store instruction to the corresponding address. It's possible this could overwrite something important on the stack like a return address, in which case the compiler doesn't have to work around this (though if the compiler detects this statically, it should complain rather than treating it as unreachable)