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.96) (envelope-from ) id 1vJseL-006co3-0I for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Nov 2025 12:11:31 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJseH-0068eQ-1f for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Nov 2025 12:11:29 +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.96) (envelope-from ) id 1vJseH-0068eH-0n for pgsql-bugs@lists.postgresql.org; Fri, 14 Nov 2025 12:11:29 +0000 Received: from smtp.outgoing.loopia.se ([93.188.3.37]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vJseF-007iN0-0V for pgsql-bugs@lists.postgresql.org; Fri, 14 Nov 2025 12:11:28 +0000 Received: from s807.loopia.se (localhost [127.0.0.1]) by s807.loopia.se (Postfix) with ESMTP id A0117490033 for ; Fri, 14 Nov 2025 13:11:26 +0100 (CET) Received: from s980.loopia.se (unknown [172.22.191.6]) by s807.loopia.se (Postfix) with ESMTP id 86FD6490996; Fri, 14 Nov 2025 13:11:26 +0100 (CET) Received: from s474.loopia.se (unknown [172.22.191.5]) by s980.loopia.se (Postfix) with ESMTP id 82F06220163B; Fri, 14 Nov 2025 13:11:26 +0100 (CET) X-Virus-Scanned: amavisd-new at amavis.loopia.se X-Spam-Flag: NO X-Spam-Score: -1.2 X-Spam-Level: X-Spam-Status: No, score=-1.2 tagged_above=-999 required=6.2 tests=[ALL_TRUSTED=-1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1] autolearn=disabled Authentication-Results: s474.loopia.se (amavisd-new); dkim=pass (2048-bit key) header.d=yesql.se Received: from s981.loopia.se ([172.22.191.5]) by s474.loopia.se (s474.loopia.se [172.22.190.14]) (amavisd-new, port 10024) with UTF8LMTP id neT_owhgwE7z; Fri, 14 Nov 2025 13:11:26 +0100 (CET) X-Loopia-Auth: user X-Loopia-User: daniel@yesql.se X-Loopia-Originating-IP: 89.255.232.236 Received: from smtpclient.apple (customer-89-255-232-236.stosn.net [89.255.232.236]) (Authenticated sender: daniel@yesql.se) by s981.loopia.se (Postfix) with ESMTPSA id EEC1522B1799; Fri, 14 Nov 2025 13:11:25 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yesql.se; s=loopiadkim1707475645; t=1763122286; bh=Bty0xUkniruPjxOR0Pt4u3Qc0PaUNCcHJhvhzHVwZtM=; h=From:Subject:Date:In-Reply-To:Cc:To:References; b=lgjLx6/TH85tpAgTZLsXRyKmyq9TSujNB1Myy80uYiPGOsuGyJWm+4ufNA67zC4w3 uH2Yy/PRLHTeyKI1JaCo49gdfz+C8EVjRDrQipiChB22cK9UBuH2OhBMjL+AOtuKin CasrFMBte8z0cq96HU+lBYj2DRQ2c/jjJtKX4qNRHUUNNyVRy0gbmVRFN++pFlM/AQ Kphi7kUymcjeRLwcAU2HXTxBsPOhiZ9V5Lg38DioML14OQuz3PHpsMtaXqfGN5Cvxl EYQSTZXo5Z6p8xKG4Xw7rtMFlAI72p/IzTPOLn7NjJfhkOSIPhwWAsccoJYg6X3E+5 +qi5Xi4Lpx2aw== From: Daniel Gustafsson Message-Id: <057A2AED-0116-446B-8986-57FDA70CA5A3@yesql.se> Content-Type: multipart/mixed; boundary="Apple-Mail=_ED16ABF3-5A50-44A4-A684-F6D579576670" Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3776.700.51.11.2\)) Subject: Re: BUG #19095: Test if function exit() is used fail when linked static Date: Fri, 14 Nov 2025 13:11:15 +0100 In-Reply-To: Cc: Tom Lane , BharatDB , torsten.rupp@gmx.net, pgsql-bugs@lists.postgresql.org, VASUKI M To: Michael Paquier References: <19095-6d8256d0c37d4be2@postgresql.org> <2305435.1762929527@sss.pgh.pa.us> <7C7B32ED-5742-49D5-9380-5E02AA5B03C4@yesql.se> X-Mailer: Apple Mail (2.3776.700.51.11.2) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --Apple-Mail=_ED16ABF3-5A50-44A4-A684-F6D579576670 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 12 Nov 2025, at 09:15, Michael Paquier wrote: >=20 > On Wed, Nov 12, 2025 at 09:13:09AM +0100, Daniel Gustafsson wrote: >> On 12 Nov 2025, at 07:38, Tom Lane wrote: >>> Personally I'm okay with whitelisting pthread_exit() as >>> Torsten suggested. >>=20 >> +1, we already have a few whitelisted entries and pthread_exit seems = perfectly >> reasonable to add to that list. >=20 > WFM. The attached trivial diff adds this to the whitelist clause in the = Makefile. I experimented with adding this to Meson, and while it's trivial enough to = do the run_command with libpq_so.full_path, it's less clear to me exactly where = in the build it should be added. I've pinged my colleague Bilal who is much = better at Meson than me to collaborate on that as a separate fix. -- Daniel Gustafsson --Apple-Mail=_ED16ABF3-5A50-44A4-A684-F6D579576670 Content-Disposition: attachment; filename=pthread_exit_whitelist.diff Content-Type: application/octet-stream; x-unix-mode=0644; name="pthread_exit_whitelist.diff" Content-Transfer-Encoding: 7bit diff --git a/src/interfaces/libpq/Makefile b/src/interfaces/libpq/Makefile index da6650066d4..3bd0e4f3840 100644 --- a/src/interfaces/libpq/Makefile +++ b/src/interfaces/libpq/Makefile @@ -144,7 +144,7 @@ $(stlib): $(OBJS_STATIC) libpq-refs-stamp: $(shlib) ifneq ($(enable_coverage), yes) ifeq (,$(filter solaris,$(PORTNAME))) - @if nm -A -u $< 2>/dev/null | grep -v -e __cxa_atexit -e __tsan_func_exit | grep exit; then \ + @if nm -A -u $< 2>/dev/null | grep -v -e __cxa_atexit -e __tsan_func_exit -e pthread_exit | grep exit; then \ echo 'libpq must not be calling any function which invokes exit'; exit 1; \ fi endif --Apple-Mail=_ED16ABF3-5A50-44A4-A684-F6D579576670--