pg.ddx.io pgsql-bugs@postgresql.org mailing list archive
help / color / mirror / Atom feed From: Wolfgang Walther <walther@technowledgy.de>
To: Christophe Pettus <xof@thebuild.com>
Cc: Thomas Munro <thomas.munro@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Bugs <pgsql-bugs@lists.postgresql.org>
Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded
Date: Sun, 17 Mar 2024 14:11:19 +0100
Message-ID: <855a1b16-0dc0-42b2-8f90-79eb49cf2893@technowledgy.de> (raw )
In-Reply-To: <68C88EE3-CDCB-4993-9173-3A773F491F3A@thebuild.com >
References: <fddd1cd6-dc16-40a2-9eb5-d7fef2101488@technowledgy.de >
<2852940.1710599083@sss.pgh.pa.us >
<443da167-ee01-47d2-9c83-105694b4cbd5@technowledgy.de >
<CA+hUKGJhp0opkCybdOrbQSMyHX8cRuLh2ygkqtivizCqK6kfOA@mail.gmail.com >
<CA+hUKGL=CE7Gg5p7ijbtEWhnPR-Ua4gemhuz-kQpSy3dD1+SYQ@mail.gmail.com >
<ef1b47df-0808-4bd7-b08c-5153d5d75f4c@technowledgy.de >
<68C88EE3-CDCB-4993-9173-3A773F491F3A@thebuild.com >
Christophe Pettus:
> Given the musl (still?) does not define a preprocessor macro specific to it, is there a way of improving the test in pg_status.c to catch this case? It seems wrong that the current test passes a case that doesn't actually work.
The missing macro is on purpose and unlikely to change:
https://openwall.com/lists/musl/2013/03/29/13
I also found this thread, which discusses exactly our case:
https://www.openwall.com/lists/musl/2022/08/17/1
Some quotes from that thread:
> I understand that what Postgres et al are doing is a nasty hack.
And:
> Applications that *really* want setproctitle type functionality can
> presumably do something like re-exec themselves with a suitably large
> argv[0] to give them safe space to overwrite with their preferred
> message, rather than UB trying to relocate the environment (and auxv?
> how? they can't tell libc they moved it) to some other location.
Could that be a more portable way of doing this?
Best,
Wolfgang
view thread (86+ messages) latest in thread
Message-ID: <855a1b16-0dc0-42b2-8f90-79eb49cf2893@technowledgy.de>
Permalink: ../855a1b16-0dc0-42b2-8f90-79eb49cf2893@technowledgy.de/
Also on: postgresql.org/message-id/855a1b16-0dc0-42b2-8f90-79eb49cf2893@technowledgy.de
copy link · copy postgr.es
reply Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: walther@technowledgy.de, xof@thebuild.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us, pgsql-bugs@lists.postgresql.org
Subject: Re: Regression tests fail with musl libc because libpq.so can't be loaded
In-Reply-To: <855a1b16-0dc0-42b2-8f90-79eb49cf2893@technowledgy.de>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox