Re: Regression tests fail with musl libc because libpq.so can't be loaded - Mailing list pgsql-bugs

From Bruce Momjian
Subject Re: Regression tests fail with musl libc because libpq.so can't be loaded
Date
Msg-id ZfrmN4WHuJgD95fw@momjian.us
Whole thread Raw
In response to Re: Regression tests fail with musl libc because libpq.so can't be loaded  (Wolfgang Walther <walther@technowledgy.de>)
Responses Re: Regression tests fail with musl libc because libpq.so can't be loaded  (Bruce Momjian <bruce@momjian.us>)
Re: Regression tests fail with musl libc because libpq.so can't be loaded  (Wolfgang Walther <walther@technowledgy.de>)
Re: Regression tests fail with musl libc because libpq.so can't be loaded  (Thomas Munro <thomas.munro@gmail.com>)
List pgsql-bugs
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  <bruce@momjian.us>        https://momjian.us
  EDB                                      https://enterprisedb.com

  Only you can decide what is important to you.



pgsql-bugs by date:

Previous
From: Kritika Agarwal
Date:
Subject: Re: BUG #18401: Cannot install
Next
From: Bruce Momjian
Date:
Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded