RoboTux wrote: Yes it's UB according to the TOSA SPEC but my worry is that it could be exploited is the buffer is not properly sanitized. Perhaps this could be a hardening flag of the lowering that's disabled by default? https://github.com/llvm/llvm-project/pull/213242