Re: LLVM miscompiles numeric.c access to short numeric var headers

From: Greg Stark <stark(at)mit(dot)edu>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: LLVM miscompiles numeric.c access to short numeric var headers
Date: 2015-11-18 19:03:25
Message-ID: CAM-w4HP-DL2amF+zWAmC23+t5QEwwgvWANWJWC15WzGytmc6jQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Janes 2015-11-18 19:18:22 Re: Freeze avoidance of very large table.
Previous Message Robert Haas 2015-11-18 18:57:34 Re: [DESIGN] ParallelAppend