<p><pre><code>    I don&#x27;t have anything to say about races, but OOB array
    accesses should simply do what you&#x27;d expect the hardware
    to do: attempt to access memory at the location the array
    indexing equation gives. It may segfault, or it may
    access some other contents in memory. That&#x27;s what any C
    programmer would probably expect.
</code></pre>
The problem is that defining OOB array access this way means throwing out pretty much every semantic guarantee from the rest of the language. There is really no friendly way to define writing an arbitrary value to an arbitrary location. By way of example, pretty much every (non-embedded) C implementation since 1972 supports recursion by writing an address of code to execute to memory. If you have semantics allowing a programmer to write to that location, then you can start executing literally any piece of code you want to. On some platforms like x86 you can execute starting in the middle of an instruction.<p>For example, &quot;return&quot; would stop meaning &quot;execution resumes at the callsite of this function&quot; and instead mean &quot;execution resumes at the callsite of this function or maybe somewhere else if someone wrote to arr[-5]&quot;. The article makes a big point about the controversy of giving memcpy() the semantics of memmove(); how would you like the semantics &quot;memmove() unless a concurrent thread is running, in which case anything might be written to dest and src might be overwritten.&quot;