This is a good explanation of what happens on the machine.
However, most languages (C, C++, etc) have different definitions of what pointers are, and many operations that seem reasonable on the machine model are in fact undefined behavior.
In C, for example, you cannot reference one object from a pointer to another object (there is one exception to this rule).
> In C, for example, you cannot reference one object from a pointer to another object (there is one exception to this rule).
I'm not sure what you mean by this, but if it's a reference to strict aliasing rule, then it's about types, not object identity; and there's more than one exception to it.
You can't both cast a double* to an int* and then dereference the int* , expecting to read an int-sized chunk of the double. It's called strict aliasing and there are defined scenarios where it is allowed (one is that char* is an alias for all pointers).
However, most languages (C, C++, etc) have different definitions of what pointers are, and many operations that seem reasonable on the machine model are in fact undefined behavior.
In C, for example, you cannot reference one object from a pointer to another object (there is one exception to this rule).