Re: ubsan

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers@postgresql.org
Date: 2022-11-21T23:15:03Z
Lists: pgsql-hackers
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
.cirrus.yml.  It'll be interesting to see how many additional problems
it finds via cfbot.

Greetings,

Andres Freund



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.