Re: [BUG] PostgreSQL crashes with ThreadSanitizer during early initialization

Jacob Champion <jacob.champion@enterprisedb.com>

From: Jacob Champion <jacob.champion@enterprisedb.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Emmanuel Sibi <emmanuelsibi.mec@gmail.com>, pgsql-hackers@lists.postgresql.org, Andres Freund <andres@anarazel.de>
Date: 2025-11-05T00:14:52Z
Lists: pgsql-hackers
On Tue, Nov 4, 2025 at 2:39 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Another problem is that it only defends against a limited set of
> sanitizers, though presumably every single one is broken in the same
> way (compare [1]).

How about __attribute__((disable_sanitizer_instrumentation)) ? LLVM's
own tests make some use of this [1].

--Jacob

[1] https://github.com/llvm/llvm-project/blob/2b4ac6629/compiler-rt/test/sanitizer_common/TestCases/dlsym_alloc.c



Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Avoid possible crash within libsanitizer.