The "obvious" (well... not exactly obvious, but it's what comes to my mind anyway :-) ) way to cause this to break is to use a vectorizing compiler that somehow decides it's OK to load, say, 64 Header
s into a vector register from the 42-rounded-up-to-64+ area at hdr
which comes from malloc
which always allocates enough to vectorize. Storing the vector register back to memory might overwrite one of the Value
s.
I think this vectorizing compiler could point to the standard (well, if a compiler has fingers...) and claim conformance.
In practice, though, I'd expect this code to work. If you come across a vectorizing compiler, add even more space (do the rounding up with a machine-dependent macro that can insert a minimum) and charge on. :-)