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-09-30T01:17:55Z
Lists: pgsql-hackers

Attachments

Hi,

On 2022-03-23 13:54:50 -0400, Tom Lane wrote:
> 0002: ugh, but my only real complaint is that __ubsan_default_options
> needs more than zero comment.  Also, it's not "our" getenv is it?
> 
> 0004: no opinion

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...

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.