Re: ubsan

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Justin Pryzby <pryzby@telsasoft.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org
Date: 2022-11-21T23:45:42Z
Lists: pgsql-hackers
Hi, 

On November 21, 2022 3:42:38 PM PST, Justin Pryzby <pryzby@telsasoft.com> wrote:
>On Mon, Nov 21, 2022 at 03:15:03PM -0800, Andres Freund wrote:
>> Hi,
>> 
>> On 2022-09-29 18:17:55 -0700, Andres Freund wrote:
>> > Attached is a rebased version of this patch. Hopefully with a reasonable
>> > amount of comments?  I kind of wanted to add a comment to reached_main, but it
>> > just seems to end up restating the variable name...
>> 
>> I've now pushed a version of this with a few cleanups, mostly in
>
>Thanks.  I'd meant to ask if there's a reason why you didn't use
>meson -D sanitize ?
>
>I recall seeing a bug which affected linking ..  maybe that's why ...

Doesn't allow enabling multiple sanitizers (the PR for that might recently have been merged, but that doesn't help us yet). We also need to add the no-recover flag anyway. So there doesn't seem to be much point.

Andres

-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.



Commits

  1. Avoid possible crash within libsanitizer.

  2. ci: Use -fsanitize=undefined,alignment,address in linux tasks

  3. Add workaround to make ubsan and ps_status.c compatible

  4. Don't try to translate NULL in GetConfigOptionByNum().

  5. Don't call fwrite() with len == 0 when writing out relcache init file.

  6. configure: check for dlsym instead of dlopen.

  7. Clean up assorted failures under clang's -fsanitize=undefined checks.