pgsql: Avoid possible crash within libsanitizer.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Avoid possible crash within libsanitizer.
Date: 2025-11-05 16:09:58
Message-ID: E1vGg58-005B2M-2d@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

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(dot)mec(at)gmail(dot)com>
Reported-by: Alexander Lakhin <exclusion(at)gmail(dot)com>
Diagnosed-by: Emmanuel Sibi <emmanuelsibi(dot)mec(at)gmail(dot)com>
Fix-suggested-by: Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>
Author: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/d4baa327a1c9c6a6e0b8f8d0ea410d19bf5dde33

Modified Files
--------------
src/backend/main/main.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Thomas Munro 2025-11-06 01:27:50 pgsql: ci: Add missing "set -e" to scripts run by su.
Previous Message Peter Eisentraut 2025-11-05 15:38:52 pgsql: doc: Add section for temporal tables