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 1vJuMa-007m3u-39 for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Nov 2025 14:01:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vJuMX-006XM3-2f for pgsql-bugs@arkaria.postgresql.org; Fri, 14 Nov 2025 14:01:17 +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 1vJuMW-006XLv-33 for pgsql-bugs@lists.postgresql.org; Fri, 14 Nov 2025 14:01:17 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vJuMR-007j8b-2X for pgsql-bugs@lists.postgresql.org; Fri, 14 Nov 2025 14:01:16 +0000 Received: from phl-compute-05.internal (phl-compute-05.internal [10.202.2.45]) by mailfhigh.stl.internal (Postfix) with ESMTP id 535177A0126; Fri, 14 Nov 2025 09:01:08 -0500 (EST) Received: from phl-mailfrontend-02 ([10.202.2.163]) by phl-compute-05.internal (MEProxy); Fri, 14 Nov 2025 09:01:08 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc: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=1763128868; x=1763215268; bh=N6UBP8wvva M6TnQ5KjgxVYYUPSkV7it/F9UhxNv/T70=; b=SwNMbNT0600NHtpDKmOuMegzLV aDlTXtIgSXCez5GhD175X/zh44VFiDYTuEm0eNFM1NzsrJnSADU3f/RADsHDiTcg g0lcANOq4BW32BIPtj8m/MDci7JBfqY+hGD7BZ20bIbNsKG4H8jHEsfFfkwbn9Id H6rKJ3Lqn8xns81MGM+uXUiTfUfzeV9MNO06mQi6A/eD0dTt5hCjqmNXo1ObnNg4 dlDYkN1YJerzQ0kUgMASWaCyE2/dHMnu23sM2f4xCpzG3sjk3/1R0Y2dOfwhhkbA NJyI1oh5E7n8LHJC7JU6IGPyroogFeOwNs/F3uIZP4xpJMsHJ3RBjHm8rngA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc: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= 1763128868; x=1763215268; bh=N6UBP8wvvaM6TnQ5KjgxVYYUPSkV7it/F9U hxNv/T70=; b=CJn99QPkpWmB8qcHTsJ8ECIuje5z2sEXA2WWwVg4ALnKXOxKMwp 5a5OENVp6lv1wRn1Jp4GtkphrGk/WVIri4wmjo3AEcbVNvSMqJvK/IC3RveBsBjs NvBBFkKeMjye5DD6e8Sq+DUtzpu8qPEwBjSep2YzKnf0ENYpacG9uPntSpHuhRWC 3UI4m/ccpbyMHBT/6Z6K+TKtFO+5qlrI3xCFRj7zRueDVotlnm71S1MetRCbEqfx K+6fSIbKUvomipfQJNQs8KmZrn2eTBaTZcDiknQI8otmeQiXMX2ldSDgx4CHDep+ yT/nDg9C62YNhEQ8nbcnM1DqP9BfWA/xlfg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeffedrtdeggddvuddttdduucetufdoteggodetrf dotffvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfurfetoffkrfgpnffqhgenuceu rghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmnecujf gurhepfffhvfevuffkfhggtggujgesthdtsfdttddtvdenucfhrhhomheptehnughrvghs ucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrfgrth htvghrnhepfeffgfelvdffgedtveelgfdtgefghfdvkefggeetieevjeekteduleevjefh ueegnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprg hnughrvghssegrnhgrrhgriigvlhdruggvpdhnsggprhgtphhtthhopeejpdhmohguvgep shhmthhpohhuthdprhgtphhtthhopegshhgrrhgrthgusghpghesghhmrghilhdrtghomh dprhgtphhtthhopehvrghsuhhkihhmudelledvtddtvdesghhmrghilhdrtghomhdprhgt phhtthhopehtohhrshhtvghnrdhruhhpphesghhmgidrnhgvthdprhgtphhtthhopehpgh hsqhhlqdgsuhhgsheslhhishhtshdrphhoshhtghhrvghsqhhlrdhorhhgpdhrtghpthht ohepmhhitghhrggvlhesphgrqhhuihgvrhdrgiihiidprhgtphhtthhopehtghhlsehssh hsrdhpghhhrdhprgdruhhspdhrtghpthhtohepuggrnhhivghlseihvghsqhhlrdhsvg X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 14 Nov 2025 09:01:07 -0500 (EST) Date: Fri, 14 Nov 2025 09:01:06 -0500 From: Andres Freund To: Daniel Gustafsson Cc: Michael Paquier , Tom Lane , BharatDB , torsten.rupp@gmx.net, pgsql-bugs@lists.postgresql.org, VASUKI M Subject: Re: BUG #19095: Test if function exit() is used fail when linked static Message-ID: <2wdijz5mucqx33vqzyep44uyucauw33egvwa7cbociesqlks5x@yj63saikpzwu> References: <19095-6d8256d0c37d4be2@postgresql.org> <2305435.1762929527@sss.pgh.pa.us> <7C7B32ED-5742-49D5-9380-5E02AA5B03C4@yesql.se> <057A2AED-0116-446B-8986-57FDA70CA5A3@yesql.se> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <057A2AED-0116-446B-8986-57FDA70CA5A3@yesql.se> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hi, On 2025-11-14 13:11:15 +0100, Daniel Gustafsson wrote: > > On 12 Nov 2025, at 09:15, Michael Paquier wrote: > > > > 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. > >> > >> +1, we already have a few whitelisted entries and pthread_exit seems perfectly > >> reasonable to add to that list. > > > > 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. For meson we'll have to filter where we test this more strictly - it'll e.g. not work on windows, because there's no nm, perhaps no grep, etc. But more generally: If we allow pthread_exit(), what's the point of this test? That's one of the functions we better avoid calling, no? ISTM that if we do want to continue having this test, the issue is that we're testing the shared library - which will have already linked against static libraries like the sanitizer ones or in this case libcrypto. What we ought to do is to test the .o files constituting libpq.so, rather than the already linked .so. That way we will find our own calls to exit etc, but not ones in static libraries. Greetings, Andres Freund