Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZX3Y-004r1e-A6 for pgsql-committers@arkaria.postgresql.org; Wed, 09 Jul 2025 15:50:00 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1uZX3W-000rwX-Bk for pgsql-committers@arkaria.postgresql.org; Wed, 09 Jul 2025 15:49:59 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1uZX3W-000rwP-4Q for pgsql-committers@lists.postgresql.org; Wed, 09 Jul 2025 15:49:58 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1uZX3U-006gSu-2E for pgsql-committers@lists.postgresql.org; Wed, 09 Jul 2025 15:49:58 +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 569FntNo1141879; Wed, 9 Jul 2025 11:49:55 -0400 From: Tom Lane To: Michael Paquier cc: pgsql-committers@lists.postgresql.org Subject: Re: pgsql: Fix up misuse of "volatile" in contrib/xml2. In-reply-to: References: Comments: In-reply-to Michael Paquier message dated "Wed, 09 Jul 2025 08:32:20 +0900" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <1141877.1752076195.1@sss.pgh.pa.us> Content-Transfer-Encoding: quoted-printable Date: Wed, 09 Jul 2025 11:49:55 -0400 Message-ID: <1141878.1752076195@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Michael Paquier writes: > On Tue, Jul 08, 2025 at 09:00:39PM +0000, Tom Lane wrote: >> Also fix a number of places where variables that are assigned to >> within a PG_TRY and then used after it were not initialized or >> not marked as volatile. (A few buildfarm members were issuing >> "may be used uninitialized" warnings about some of these variables, >> which is what drew my attention to this area.) > Oops, thanks. I was not aware of these reports, and the buildfarm was > not showing any red, the CI looked fine and my machine did not > complain with a rather new gcc. What were the buildfarm members > impacted? Did these use a switch and/or a specific compiler that > helped in detecting these problems? Not sure. Yesterday I saw such warnings from arowana, boa, dhole, rhinoceros, and shelduck, eg arowana | 2025-07-08 04:54:18 | xpath.c:274:6: warning: 'workspace'= may be used uninitialized in this function [-Wmaybe-uninitialized] arowana | 2025-07-08 04:54:18 | xpath.c:319:6: warning: 'workspace'= may be used uninitialized in this function [-Wmaybe-uninitialized] arowana | 2025-07-08 04:54:18 | xpath.c:374:6: warning: 'workspace'= may be used uninitialized in this function [-Wmaybe-uninitialized] arowana | 2025-07-08 04:54:18 | ../../src/include/postgres.h:329:2:= warning: 'result' may be used uninitialized in this function [-Wmaybe-uni= nitialized] Didn't look to try to figure out what the common factor among these machines is, but I think all of them are somewhat dated, which is depressing. You'd hope that newer compilers are more likely to find such issues, not less likely. regards, tom lane