Re: LLVM miscompiles numeric.c access to short numeric var headers
От
Greg Stark
Тема
Re: LLVM miscompiles numeric.c access to short numeric var headers
Дата
Msg-id
CAM-w4HP-DL2amF+zWAmC23+t5QEwwgvWANWJWC15WzGytmc6jQ@mail.gmail.com
Ответ на
Список
Дерево обсуждения
LLVM miscompiles numeric.c access to short numeric var headers Greg Stark <stark@mit.edu>
Re: LLVM miscompiles numeric.c access to short numeric var headers Tom Lane <tgl@sss.pgh.pa.us>
Re: LLVM miscompiles numeric.c access to short numeric var headers Greg Stark <stark@mit.edu>
Re: LLVM miscompiles numeric.c access to short numeric var headers Tom Lane <tgl@sss.pgh.pa.us>
Re: LLVM miscompiles numeric.c access to short numeric var headers Greg Stark <stark@mit.edu>
Re: LLVM miscompiles numeric.c access to short numeric var headers Tom Lane <tgl@sss.pgh.pa.us>
Re: LLVM miscompiles numeric.c access to short numeric var headers Greg Stark <stark@mit.edu>
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 по дате отправления