Re: Worth using personality(ADDR_NO_RANDOMIZE) for EXEC_BACKEND on linux?

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Robert Haas <robertmhaas@gmail.com>, Alvaro Herrera <alvherre@alvh.no-ip.org>, Andrew Dunstan <andrew@dunslane.net>, PostgreSQL Development <pgsql-hackers@postgresql.org>
Date: 2021-08-10T19:07:49Z
Lists: pgsql-hackers
On Wed, Aug 11, 2021 at 2:12 AM Andres Freund <andres@anarazel.de> wrote:
> On Tue, Aug 10, 2021, at 15:19, Thomas Munro wrote:
> > Yeah, make check always fails for me on macOS 11.  With the attached
> > experimental hack, it fails only occasionally (1 in 8 runs or so).  I
> > don't know why.
>
> I suspect you'd need to use the hack in pg_ctl to make it reliable. The layout of normally stayed position independent postmaster can be incompatible with the non ASLR spawned child.

Yeah, but the patch already changes both pg_ctl.c and postmaster.c.



Commits

  1. Make EXEC_BACKEND more convenient on Linux and FreeBSD.

  2. Make EXEC_BACKEND more convenient on macOS.