[PATCH v6 3/5] aarch64: Add SFrame support for aarch64 architecture

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Jul 2 15:23:42 GMT 2025



On 02/07/25 11:22, Wilco Dijkstra wrote:
> Hi Adhemerval,
> 
>> +
>> +     0xd2801168         movz x8, #0x8b
>> +     0xd4000001         svc  0x0
>> +   */
>> +  if (pc[0] != MOVZ_X8_8B || pc[1] != SVC_0)
> 
>> As for x86_64 this is strictly UB, although like x86_64 aarch64 does
>> support unaligned memory operation by default.
> 
> This is actually fine on AArch64 since instructions are always word aligned.
> We don't support building GLIBC for strict-alignment in any case.
> 

I think it is fine for assembly routines, as we do on multiple implementation
for aarch64, but I think we should avoid adding UB on C code even though
the architecture does allow it.  A packet or memcpy wrapper generates the
same code and plays better with tools like UBSAN (if we eventually add
support for it).


More information about the Libc-alpha mailing list