Re: BUG #17095: ./configure fails thread_test.c when run under TSAN - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #17095: ./configure fails thread_test.c when run under TSAN
Date
Msg-id 2045909.1625780525@sss.pgh.pa.us
Whole thread Raw
In response to Re: BUG #17095: ./configure fails thread_test.c when run under TSAN  (Vitali Lovich <vlovich@gmail.com>)
List pgsql-bugs
Vitali Lovich <vlovich@gmail.com> writes:
> I've confirmed the following patch (relative to
> 45b88269a353ad93744772791feb6d01bc7e1e42) resolves the issue. It's
> predicated on the assumption that gcc or clang (or a compiler with the
> relevant builtins) are being used to build this.

You realize of course that that assumption is *completely* untenable.

I'm inclined to say that if -fsanitize=address breaks configure,
then don't include -fsanitize=address in the CFLAGS you give to
configure.  It's hardly the first such restriction --- -Werror is
another one you can't inject that way, and I wouldn't be surprised
if there are more.

FWIW, I don't particularly agree with TSAN about the code being
incorrect.  On what platform is a fetch or a store of an int
not atomic?  (If there is one, Postgres will malfunction on it
anyway.)

            regards, tom lane



pgsql-bugs by date:

Previous
From: Vitali Lovich
Date:
Subject: Re: BUG #17095: ./configure fails thread_test.c when run under TSAN
Next
From: Yuetsuro Kobayashi
Date:
Subject: Re: BUG #17089: "ERROR: invalid memory alloc request size ..." occurs when updating a fixed number of records