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 1rp15Y-004c1y-Kk for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Mar 2024 07:19:17 +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 1rp15X-00Bypo-5g for pgsql-bugs@arkaria.postgresql.org; Tue, 26 Mar 2024 07:19:15 +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 1rp15W-00Bypg-Tb for pgsql-bugs@lists.postgresql.org; Tue, 26 Mar 2024 07:19:15 +0000 Received: from fout7-smtp.messagingengine.com ([103.168.172.150]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rp15U-006Xhe-W9 for pgsql-bugs@lists.postgresql.org; Tue, 26 Mar 2024 07:19:14 +0000 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailfout.nyi.internal (Postfix) with ESMTP id 0A8F913800F8; Tue, 26 Mar 2024 03:19:12 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 26 Mar 2024 03:19:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:cc:content-transfer-encoding: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=fm1; t=1711437552; x=1711523952; bh=hiIzFkAel5J9CpbTTqhCCnCFDrx1mvs7 j9OJnjGVV1U=; b=vAC8gHPq8yRfbERBxK+mqciKlcL11Bq/C6S4HDtlLqShUncN KRcVG1/Qnge3/Tdzo5zDZ4URTTpH/9oUFEFQCa+K+dMl/PbeKV+DeoFM9it4gahT JvkOMVFnzZcdFobbxH8ljrE0QxpvV7fQLORaLevtXlwFfMTkVH0+AItEt1k5coc7 KJIuMVOqcdNMhBnetn3Vxng8P0XV+HfV/90OhEIZ80RgDCn7/AqV2see5zOodZeM E7AK+cawLEkQe5XpFkaMyhS0Lt47RWvCFQfBFAD+FEczJhLa1711cb+p4i+PLjnv E4z5EvG90z6akPh0OWTRFiOEgL6D1CkKrkb/LA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :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-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1711437552; x= 1711523952; bh=hiIzFkAel5J9CpbTTqhCCnCFDrx1mvs7j9OJnjGVV1U=; b=A rNjpC/S6G4HKA1zl1QIUPuxzOTnYawb6sPJX6iE454cpUPE6F8ECFoWY9mH1viCc T5iphuT6dZCaJSbbxd2iUN3h0Aaz2vQ0/Ue0K12jRGI/EYi41NOig9HiH5O15mjH 2GowbCEEcY2CdjmxqgzaYw+8GWtDUrGVyMX/Qq18v6YeCX57hlaUsy+gadewdYsy GRLGUg72hvoRCR2QLPdztuTHvb6ykKUXKB/BejhcFV3ZH3JIz88ZGb8hN8yEhzaM G6zTkZlStDYAsQ7lhHMKSQRJ9tAVxy6sqtiVgPvSRL+pxjY2/FbJ06bPSfVNS/+A zDymsRsL+U1zy+qSkQnAA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrudduvddguddtjecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfevfhfhjggtgfesthejredttddvjeenucfhrhhomheprfgv thgvrhcugfhishgvnhhtrhgruhhtuceophgvthgvrhesvghishgvnhhtrhgruhhtrdhorh hgqeenucggtffrrghtthgvrhhnpefgjedthfekfedtuefgieelheetleejgefhueeltdfh ueetvdffudekfeejhfegheenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehpvghtvghrsegvihhsvghnthhrrghuthdrohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 26 Mar 2024 03:19:10 -0400 (EDT) Message-ID: <515199be-2f4d-4e47-9b6e-d3f3ed11e510@eisentraut.org> Date: Tue, 26 Mar 2024 08:19:09 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded To: Tom Lane , Thomas Munro Cc: Bruce Momjian , walther@technowledgy.de, Christophe Pettus , Andrew Dunstan , PostgreSQL Bugs , Robert Haas References: <477fa513-6bf0-456d-8d24-1e22a19df671@technowledgy.de> <36690fcf-f0c8-4d60-af49-6a7efa0e2b14@technowledgy.de> <443430b4-0c10-49f3-8c8a-e5e76602f309@eisentraut.org> <2712381.1711408552@sss.pgh.pa.us> <2715727.1711410188@sss.pgh.pa.us> Content-Language: en-US From: Peter Eisentraut In-Reply-To: <2715727.1711410188@sss.pgh.pa.us> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 26.03.24 00:43, Tom Lane wrote: > I wrote: >> Thomas Munro writes: >>> I had originally proposed to avoid anything beginning "LD_" but Tom >>> suggested being more specific. I doubt LD_PRELOAD can really hurt you >>> though (the linker probably only needs the value at the start by >>> definition, not at later dlopen() time (?)). > >> Oh, good point. So we could simplify the patch by only looking for >> LD_LIBRARY_PATH. > > I looked at the musl source code you identified and confirmed that > only the LD_LIBRARY_PATH string is remembered in a static variable; > LD_PRELOAD is only accessed locally in that initialization function. > So we only need to do the attached. (I failed to resist the > temptation to rewrite the comments.) Yeah, I was more looking for a comment for posterity for *why* we need to preserve this variable in particular. The updated comment looks reasonable.