https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122611
--- Comment #5 from IonuČ› Nicula <nicula at nicula dot xyz> ---
Sorry, I'm not getting how the alignment check fixes the root issue.
I can just change the align_val_t value to 64 instead of 16, so the alignment
check will pass when compiling the binary with GCC 15.2.0. Then, while running
that under gdb, I'm still hitting the out of bounds access. I.e. those same
lines:
vmovdqa xmm1, XMMWORD PTR [rax]
vmovdqa xmm10, XMMWORD PTR [rax+16]
vmovdqa xmm8, XMMWORD PTR [rax+32]
vmovdqa xmm0, XMMWORD PTR [rax+48]
(once again, the buffer is only 4 bytes long, so reading from rax+48 will be
invalid)
The big issue here, as I understand it, is that the if semantics are broken
because GCC is doing a 64-byte read in those 4 lines above. But shouldn't the
`if` statement basically provide 'short-circuiting' semantics and only allow
reading 4 bytes at a time?