1. How big is it?
2. Who owns it?
3. Who locks it?
Most undefined behavior in C/C++ involves those three questions.
#1 is historically the most troublesome. And the most inexcusable. Pascal, which predates C, didn't have that problem, because arrays carried size info. Nor did Algol, Modula I, Modula II, and Modula III. Modula I was a very low level language - device registers were a language concept.
Something I wrote on this back in 2012.[1] There was some consensus at the time that this would work and would be backwards compatible with C. But it would be a tough sell, and I didn't want to spend my life selling it.
[1] http://animats.com/papers/languages/safearraysforc43.pdf