]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Avoid possible crash within libsanitizer.
authorTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Nov 2025 16:09:30 +0000 (11:09 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Wed, 5 Nov 2025 16:09:45 +0000 (11:09 -0500)
commitd4baa327a1c9c6a6e0b8f8d0ea410d19bf5dde33
treedad17eae8bd06494c2915c3c9a411d79fc210404
parente4d8a2af07f56ec2537eb8f9a16599249db62c94
Avoid possible crash within libsanitizer.

We've successfully used libsanitizer for awhile with the undefined
and alignment sanitizers, but with some other sanitizers (at least
thread and hwaddress) it crashes due to internal recursion before
it's fully initialized itself.  It turns out that that's due to the
"__ubsan_default_options" hack installed by commit f686ae82f, and we
can fix it by ensuring that __ubsan_default_options is built without
any sanitizer instrumentation hooks.

Reported-by: Emmanuel Sibi <emmanuelsibi.mec@gmail.com>
Reported-by: Alexander Lakhin <exclusion@gmail.com>
Diagnosed-by: Emmanuel Sibi <emmanuelsibi.mec@gmail.com>
Fix-suggested-by: Jacob Champion <jacob.champion@enterprisedb.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/F7543B04-E56C-4D68-A040-B14CCBAD38F1@gmail.com
Discussion: https://postgr.es/m/dbf77bf7-6e54-ed8a-c4ae-d196eeb664ce@gmail.com
Backpatch-through: 16
src/backend/main/main.c