GLmatrix needs aligned malloc
This change 3175b63a forces GLmatrix struct to always be 16-byte aligned, but it's not allocated with aligned_alloc() or memalign(). For example: https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/src/mesa/main/matrix.c?ref_type=heads#L1016
This results in SIGBUS on 32-bit ARM because glibc's malloc is only 8-byte aligned on 32-bit ARM. This is glibc's internal logic for MALLOC_ALIGNMENT, and it's 8 on ARM (https://godbolt.org/z/rzn6o3sed)
/* MALLOC_ALIGNMENT is the minimum alignment for malloc'ed chunks. It
must be a power of two at least 2 * SIZE_SZ, even on machines for
which smaller alignments would suffice. It may be defined as larger
than this though. Note however that code and data structures are
optimized for the case of 8-byte alignment. */
#define MALLOC_ALIGNMENT (2 * SIZE_SZ < __alignof__ (long double) \
? __alignof__ (long double) : 2 * SIZE_SZ)
Edited by iucoen