1
0
mirror of https://github.com/postgres/postgres.git synced 2025-09-03 15:22:11 +03:00

Make EXEC_BACKEND more convenient on Linux and FreeBSD.

Try to disable ASLR when building in EXEC_BACKEND mode, to avoid random
memory mapping failures while testing.  For developer use only, no
effect on regular builds.

This has been originally applied as of f3e7806 for v15~, but
recently-added buildfarm member gokiburi tests this configuration on
older branches as well, causing it to fail randomly as ASLR would be
enabled.

Suggested-by: Andres Freund <andres@anarazel.de>
Tested-by: Bossart, Nathan <bossartn@amazon.com>
Discussion: https://postgr.es/m/20210806032944.m4tz7j2w47mant26%40alap3.anarazel.de
Backpatch-through: 12
This commit is contained in:
Michael Paquier
2023-02-08 13:09:27 +09:00
parent e4c4e6258c
commit 0801345758
8 changed files with 52 additions and 1 deletions

View File

@@ -1207,6 +1207,10 @@ spawn_process(const char *cmdline)
if (logfile)
fflush(logfile);
#ifdef EXEC_BACKEND
pg_disable_aslr();
#endif
pid = fork();
if (pid == -1)
{