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 1rmw6r-00Ahx9-Hm for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Mar 2024 13:36:01 +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 1rmw6q-0050Wi-3Z for pgsql-bugs@arkaria.postgresql.org; Wed, 20 Mar 2024 13:36:00 +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 1rmw6p-0050W2-Ph for pgsql-bugs@lists.postgresql.org; Wed, 20 Mar 2024 13:36:00 +0000 Received: from momjian.us ([72.94.173.45]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1rmw6n-005YBp-Ap for pgsql-bugs@lists.postgresql.org; Wed, 20 Mar 2024 13:35:59 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2024011501; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID: Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding:Content-ID: Content-Description; bh=Q9pIOs5FDalMYUHCVTiUaKtXSF+9DxXPacixo+u4Si8=; b=ZTphJ UyDRd5IYJY/B/yX2JhGfrM7EvJ2wRqw2GuwIbNQTNzTs7puU4sp8OQa3e+xgfEqiWNlmL5e+hxW30 OEHm9PdOuLWQW0BD1ps8O7yfyeDgFtzMBDqAw4tYlFgdwaXuuo1bpq+16PbSFfdOrL9XPGM7x7AZm IDqK6qInqbdK1gjN80Pm1K27Fc/tHRexIkZXt4SNJEix1BotLVNLnaqlcJqo3qgCcwUuzf8oU6bb8 9++YurNEM5XSILTySkrCqXX+d8nxr/9Y6SD5fDcxP0KnsHrugjL4O2YdhUrM/9ufIbQwyZxXgtmkE 9MB7XTgzFrCY5YPf3Nq6CmBvN7yfA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1rmw6h-00G60g-0X; Wed, 20 Mar 2024 09:35:51 -0400 Date: Wed, 20 Mar 2024 09:35:51 -0400 From: Bruce Momjian To: Wolfgang Walther Cc: Thomas Munro , peter@eisentraut.org, Christophe Pettus , Andrew Dunstan , PostgreSQL Bugs , Tom Lane Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded Message-ID: References: <3561573.1710771812@sss.pgh.pa.us> <4093813.1710899588@sss.pgh.pa.us> <4095435.1710900216@sss.pgh.pa.us> <477fa513-6bf0-456d-8d24-1e22a19df671@technowledgy.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <477fa513-6bf0-456d-8d24-1e22a19df671@technowledgy.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Wed, Mar 20, 2024 at 10:39:20AM +0100, Wolfgang Walther wrote: > Peter Eisentraut: > > We could turn it around and do > > > > #if defined(__linux__) > > #if defined(__GLIBC__) || defined(__UCLIBC__ ) > > #define PS_USE_CLOBBER_ARGV > > #else > > #define PS_USE_NONE > > #endif > > #endif > > This works as well. Yes, I prefer this. I am worried the environ hackery will bite us someday and the cause will be hard to find. > I also put together a PoC of what was mentioned in musl's mailing list: > Instead of clobbering environ at all, exec yourself again with padded argv0. > This works, too. Attached. It is hard to imagine why we would add an extra exec on every Linux server start for this. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.