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