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

From Wolfgang Walther
Subject Re: Regression tests fail with musl libc because libpq.so can't be loaded
Date
Msg-id 477fa513-6bf0-456d-8d24-1e22a19df671@technowledgy.de
Whole thread Raw
In response to Re: Regression tests fail with musl libc because libpq.so can't be loaded  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: Regression tests fail with musl libc because libpq.so can't be loaded  (Bruce Momjian <bruce@momjian.us>)
List pgsql-bugs
Thomas Munro:
> On Wed, Mar 20, 2024 at 3:03 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> +1 for stopping only at one of those two names.
> 
> Here's one like that for Wolfgang to test on musl.

Works fine.

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.

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.

Best,

Wolfgang
Attachment

pgsql-bugs by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded
Next
From: Mingjun Yang
Date:
Subject: performance: `tuplehash_iterate` and `group by` question, very slow