summaryrefslogtreecommitdiff
path: root/src/test/modules/test_shm_mq/setup.c
diff options
context:
space:
mode:
authorRobert Haas <rhaas@postgresql.org>2017-03-31 20:35:51 -0400
committerRobert Haas <rhaas@postgresql.org>2017-03-31 20:43:32 -0400
commit2113ac4cbb12b815804e8873d761cade9ddf49b9 (patch)
tree26eafa3c03cb8108f45192c4df4a6fcdcd5f716e /src/test/modules/test_shm_mq/setup.c
parentc281cd5fe178c946dc23eae4d4642be5ddbe3eb4 (diff)
Don't use bgw_main even to specify in-core bgworker entrypoints.
On EXEC_BACKEND builds, this can fail if ASLR is in use. Backpatch to 9.5. On master, completely remove the bgw_main field completely, since there is no situation in which it is safe for an EXEC_BACKEND build. On 9.6 and 9.5, leave the field intact to avoid breaking things for third-party code that doesn't care about working under EXEC_BACKEND. Prior to 9.5, there are no in-core bgworker entrypoints. Petr Jelinek, reviewed by me. Discussion: http://postgr.es/m/09d8ad33-4287-a09b-a77f-77f8761adb5e@2ndquadrant.com
Diffstat (limited to 'src/test/modules/test_shm_mq/setup.c')
-rw-r--r--src/test/modules/test_shm_mq/setup.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/test/modules/test_shm_mq/setup.c b/src/test/modules/test_shm_mq/setup.c
index e3c024ecb4c..319a67f49aa 100644
--- a/src/test/modules/test_shm_mq/setup.c
+++ b/src/test/modules/test_shm_mq/setup.c
@@ -216,7 +216,6 @@ setup_background_workers(int nworkers, dsm_segment *seg)
worker.bgw_flags = BGWORKER_SHMEM_ACCESS;
worker.bgw_start_time = BgWorkerStart_ConsistentState;
worker.bgw_restart_time = BGW_NEVER_RESTART;
- worker.bgw_main = NULL; /* new worker might not have library loaded */
sprintf(worker.bgw_library_name, "test_shm_mq");
sprintf(worker.bgw_function_name, "test_shm_mq_main");
snprintf(worker.bgw_name, BGW_MAXLEN, "test_shm_mq");