diff options
author | Thomas Munro | 2022-01-10 10:54:11 +0000 |
---|---|---|
committer | Thomas Munro | 2022-01-10 11:04:33 +0000 |
commit | f3e78069db7f7a753ebfe1010b810e47e0d2aa9a (patch) | |
tree | 87b4da09ae69dfbcbd47d65c206cfd0a2fe88335 /src/include/port.h | |
parent | ee419607381dd9a8031f2bc226c742a3289b7f33 (diff) |
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.
Suggested-by: Andres Freund <[email protected]>
Tested-by: Bossart, Nathan <[email protected]>
Discussion: https://postgr.es/m/20210806032944.m4tz7j2w47mant26%40alap3.anarazel.de
Diffstat (limited to 'src/include/port.h')
-rw-r--r-- | src/include/port.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/include/port.h b/src/include/port.h index 22ea292a6df..56e3721f6a4 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -140,6 +140,11 @@ extern char *pipe_read_line(char *cmd, char *line, int maxsize); /* Doesn't belong here, but this is used with find_other_exec(), so... */ #define PG_BACKEND_VERSIONSTR "postgres (PostgreSQL) " PG_VERSION "\n" +#ifdef EXEC_BACKEND +/* Disable ASLR before exec, for developer builds only (in exec.c) */ +extern int pg_disable_aslr(void); +#endif + #if defined(WIN32) || defined(__CYGWIN__) #define EXE ".exe" |