Re: LLVM miscompiles numeric.c access to short numeric var headers - Mailing list pgsql-hackers

From Greg Stark
Subject Re: LLVM miscompiles numeric.c access to short numeric var headers
Date
Msg-id CAM-w4HP-DL2amF+zWAmC23+t5QEwwgvWANWJWC15WzGytmc6jQ@mail.gmail.com
Whole thread Raw
In response to Re: LLVM miscompiles numeric.c access to short numeric var headers  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Fwiw it looks like the LLVM folk think this is an asan bug.

https://llvm.org/bugs/show_bug.cgi?id=25550

It looks like the fix is that the compiler should avoid this
optimization if the code is being compiled with instrumentation. This
worries me a bit but I think our code is safe as the Datum will always
be either palloced which will be fully aligned and therefore can't
overrun a page or on a stack in which case the whole struct will be
allocated regardless of how many digits we need.



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [DESIGN] ParallelAppend
Next
From: Jeff Janes
Date:
Subject: Re: Freeze avoidance of very large table.