Hi, On Fri, May 24, 2019 at 6:35 PM Tom Lane <t...@sss.pgh.pa.us> wrote:
> These seem to be down to use of AnyArrayType: > > typedef union AnyArrayType > { > ArrayType flt; > ExpandedArrayHeader xpn; > } AnyArrayType; > > ASAN seems to believe that use of this union entitles the compiler to > assume 8-byte alignment even when touching fields of a short-header In my understanding union has to be aligned to ExpandedArrayHeader (8 bytes) or it's a UB. On x64 it could be an issue if AnyArrayType alignment is less than 4, sse is enable and suddenly compiler choose to use sse instructions with 16 bytes requirement then compiler may not emit the right code. It's not rhetorical, big surprise first time you get a SIGBUS signal, or a SIGFPE doing integer math, on x64. Regards Didier