- Notifications
You must be signed in to change notification settings - Fork5
Commita74740f
committed
Provide a way to control SysV shmem attach address in EXEC_BACKEND builds.
In standard non-Windows builds, there's no particular reason to care whataddress the kernel chooses to map the shared memory segment at. However,when building with EXEC_BACKEND, there's a risk that the chosen addresswon't be available in all child processes. Linux with ASLR enabled (whichit is by default) seems particularly at risk because it puts shmem segmentsinto the same area where it maps shared libraries. We can work aroundthat by specifying a mapping address that's outside the range whereshared libraries could get mapped. On x86_64 Linux, 0x7e0000000000seems to work well.This is only meant for testing/debugging purposes, so it doesn't seemnecessary to go as far as providing a GUC (or any user-visibledocumentation, though we might change that later). Instead, it's justcontrolled by setting an environment variable PG_SHMEM_ADDR to thedesired attach address.Back-patch to all supported branches, since the point here is toremove intermittent buildfarm failures on EXEC_BACKEND animals.Owners of affected animals will need to add a suitable setting ofPG_SHMEM_ADDR to their build_env configuration.Discussion:https://postgr.es/m/7036.1492231361@sss.pgh.pa.us1 parentbfba563 commita74740f
1 file changed
+23
-2
lines changedLines changed: 23 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
102 | 102 |
| |
103 | 103 |
| |
104 | 104 |
| |
| 105 | + | |
105 | 106 |
| |
106 | 107 |
| |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
107 | 127 |
| |
108 | 128 |
| |
109 | 129 |
| |
| |||
203 | 223 |
| |
204 | 224 |
| |
205 | 225 |
| |
206 |
| - | |
| 226 | + | |
207 | 227 |
| |
208 | 228 |
| |
209 |
| - | |
| 229 | + | |
| 230 | + | |
210 | 231 |
| |
211 | 232 |
| |
212 | 233 |
| |
|
0 commit comments
Comments
(0)