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 1vDaCx-00BjSV-GD for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Oct 2025 03:17:14 +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 1vDaCv-00ATHP-92 for pgsql-bugs@arkaria.postgresql.org; Tue, 28 Oct 2025 03:17:12 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1vDaCu-00ATHA-GV for pgsql-bugs@lists.postgresql.org; Tue, 28 Oct 2025 03:17:12 +0000 Received: from fout-a6-smtp.messagingengine.com ([103.168.172.149]) by makus.postgresql.org with smtp (Exim 4.96) (envelope-from ) id 1vDaCr-0048UP-28 for pgsql-bugs@lists.postgresql.org; Tue, 28 Oct 2025 03:17:10 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfout.phl.internal (Postfix) with ESMTP id 79AD1EC02B9; Mon, 27 Oct 2025 23:17:08 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Mon, 27 Oct 2025 23:17:08 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=paquier.xyz; h= cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:subject :subject:to:to; s=fm3; t=1761621428; x=1761707828; bh=HE2XJZGuX0 ypyL/tfmbJMo1OUoejxEGOQtDi302dchY=; b=JwqWpWYNGQOjqeZO9vFrLPKYpE n3OazHGmQreYNcY3tGAs4N7M2bDoBFbQVbZ5Qz5rCQxGbj0pRXvkrV59wM10j772 dD+RFgwAaPdAPMjxJIpTE67/9K8Ht8Cfe3gP5RnMaf/6qN0Dg2LjNw9cQHCrgd4Z O9W2on6jDZwU5mMdAtNA0ik8Jp4D9lNG4//IjVjGWe46MLf7WLkRKUNjFuEDGhgh 0f+0jNQ8BMvxzvidF6rlX1vGiCHkcMKG2pHmgFfwv67Mxk+6Gh9QnFXn0KB/gpK1 bwdG+2vIna3Y+8gIcRPEgoGJ//NGgUVKBjnXDEnDar21hRzWp8Og9ESHeSyA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:subject:subject:to :to:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t= 1761621428; x=1761707828; bh=HE2XJZGuX0ypyL/tfmbJMo1OUoejxEGOQtD i302dchY=; b=2Zsqb4tQ8Ci7Q9TdqTsALBB7gNtKCrnL4aV+g/FavpjfqlBEpnd zOZmy1R71j7+6bdrqr8H2F7d88clbw3+G8TCQPGPn1K08KP6vs33KrpSxryo1QS/ UQGp1yGbk48R8GiGD3QbAyUVs/0GdoGgn+h/Tq7m3ui06WQ8e185/zL5U5AYXmAY CFPPmQBWSar78z8x2UsIncw7zwrc9lUspyYwOpsCWxic34+8jVb/sqEHyYcHKucc A94FecmUpmPaXjcf0vfHy7yjw+25R0ZzYUEsf2GZ3gBAvcXbQOFf4Iqv3IvnDzod HfZ4LaQPHv/dCe4fqhyqHK3w/7js+cE0VAQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggdduheeljeehucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucgfrhhlucfvnfffucdlfeehmdenucfjughrpeffhffvuf fkfhggtggujgesghdtreertddtvdenucfhrhhomhepofhitghhrggvlhcurfgrqhhuihgv rhcuoehmihgthhgrvghlsehprghquhhivghrrdighiiiqeenucggtffrrghtthgvrhhnpe ffudeffeelgffhkedukeekvedvudfgieetkeekudelfeevhffhffdtudffieeutdenucff ohhmrghinhepphhoshhtghhrvghsqhhlrdhorhhgnecuvehluhhsthgvrhfuihiivgeptd enucfrrghrrghmpehmrghilhhfrhhomhepmhhitghhrggvlhesphgrqhhuihgvrhdrgiih iidpnhgspghrtghpthhtohepvddpmhhouggvpehsmhhtphhouhhtpdhrtghpthhtohepth horhhsthgvnhdrrhhuphhpsehgmhigrdhnvghtpdhrtghpthhtohepphhgshhqlhdqsghu ghhssehlihhsthhsrdhpohhsthhgrhgvshhqlhdrohhrgh X-ME-Proxy: Feedback-ID: i0fe9450f:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Oct 2025 23:17:07 -0400 (EDT) Date: Tue, 28 Oct 2025 12:16:49 +0900 From: Michael Paquier To: torsten.rupp@gmx.net, pgsql-bugs@lists.postgresql.org Subject: Re: BUG #19095: Test if function exit() is used fail when linked static Message-ID: References: <19095-6d8256d0c37d4be2@postgresql.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="uF8QZuLyvmwf+NvV" Content-Disposition: inline In-Reply-To: <19095-6d8256d0c37d4be2@postgresql.org> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk --uF8QZuLyvmwf+NvV Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 27, 2025 at 07:56:38AM +0000, PG Bug reporting form wrote: > This test fail if libpq is linked static to an application when e. g. > libcrypto is also linked static into libpq which add indirectly a call to > "pthread_exit()". >=20 > Possible fix: exclude pthread_exit(), too (like __cxa_atexit), e.g.: Previous discussions around this check: - 936f56988741, with: https://www.postgresql.org/message-id/CAEhC_BmNGKgj2wKArH2EAU11BsaHYgLnrRFJ= GRm5Vs8WJzyiQA@mail.gmail.com - dc227eb82ea8, with: https://www.postgresql.org/message-id/3128896.1624742969@sss.pgh.pa.us We have usually used the buildfarm to decide how much restriction we should put into this one, for good historical reasons because we should never exit() directly from libpq, like this one: https://www.postgresql.org/message-id/20210703001639.GB2374652@rfd.leadboat= =2Ecom Treating pthread_exit() as an exception sounds like it may be a good thing anyway: we don't rely on it in the code core. Now I am not completely sure how much we should care about considering that any of that as something we need to tweak in the core code. The use of static libraries are usually discouraged, because it makes the handling of package dependencies more complicated if some sub-libraries need to be upgraded following a CVE-class issue, and here you are pointing at what looks like a custom static library build of libcrypto on Linux. Opinions from others are welcome, mine counts like -0.5. -- Michael --uF8QZuLyvmwf+NvV Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEG72nH6vTowiyblFKnvQgOdbyQH0FAmkANaEACgkQnvQgOdby QH3sQA/9Ew7eKtzZks3uL+I8CjIFt/fsrnI+evyVrmxX0McYZgu3tzh0VEhuz1XX flCJic/83KDK248kJKYeHj1k/OTRMxB/0swHvvP7eSTRbr6sRgjuIJs+o3juGlbN YrbvUUr0ztWZgs4R19cDXgBtyHjerJjTRZHoyioYPKVNHlPRs0XuGc7baSCKEqSt 1dbVm7Ej9cATuY3Be92mUWv2gegxx4BdwlxPDy/36NPLedRCP2jywyDfH1QEwHJF LdVK5qZawm77kGjA9GoK2QmvKpVjQoTiydmpoWt+a4cOsNdvsnCdyRwB7QHnBGKp hMEBCQS9XRo2aTYqSIlRzlghZKnRfeZCZ1aQPi5BDABU1SfmgNa8V/V4jqD/05SN RN6+fiIEBwICMHXFTVtJlG/EzscfuiPgF1zsjM3Pf/kBoq/WFErQ/sIppjRjZrXO 5ycW44CUY6hT3qqjF3WmawlrEoD4HAGdbJ0R9pN1wuOJFnSK6RgIdx8q3dq08ewH FPg/TZ7sJLjhIOAuRgdE1ZoMHR7ZAG1ZeWhb+XUFM+bHHEygupi71kmpj57o5TGj gcB8t+3weCW+QOdi0OhuRMlSlHeRapt/M/27Ei/vwGLCXLS87MGfUkjCVGDQ5Muw WfiPZ3lw8tXbW9tVLb+6w05f3I3QH5crHl56kECifi7+jWfMEas= =W+hv -----END PGP SIGNATURE----- --uF8QZuLyvmwf+NvV--