Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1bmi-0001uA-Le for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jul 2021 21:42:16 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1m1bmh-0007l6-8c for pgsql-bugs@arkaria.postgresql.org; Thu, 08 Jul 2021 21:42:15 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1bmh-0007kx-1w for pgsql-bugs@lists.postgresql.org; Thu, 08 Jul 2021 21:42:15 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1bma-0002FB-BO for pgsql-bugs@lists.postgresql.org; Thu, 08 Jul 2021 21:42:14 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 168Lg5O22045910; Thu, 8 Jul 2021 17:42:05 -0400 From: Tom Lane To: Vitali Lovich cc: pgsql-bugs@lists.postgresql.org Subject: Re: BUG #17095: ./configure fails thread_test.c when run under TSAN In-reply-to: References: <17095-374e65bfa8737607@postgresql.org> Comments: In-reply-to Vitali Lovich message dated "Thu, 08 Jul 2021 13:33:11 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2045908.1625780525.1@sss.pgh.pa.us> Date: Thu, 08 Jul 2021 17:42:05 -0400 Message-ID: <2045909.1625780525@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Vitali Lovich 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