Skip to content

Commit 7f3e17b

Browse files
committed
Disable RandomizedBaseAddress on MSVC builds
The ASLR in Windows 8/Windows 2012 can break PostgreSQL's shared memory. It doesn't fail every time (which is explained by the Random part in ASLR), but can fail with errors abut failing to reserve shared memory region. MauMau, reviewed by Craig Ringer
1 parent 057152b commit 7f3e17b

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/tools/msvc/MSBuildProject.pm

+1
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,7 @@ sub WriteItemDefinitionGroup
324324
<ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
325325
<GenerateMapFile>false</GenerateMapFile>
326326
<MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
327+
<RandomizedBaseAddress>false</RandomizedBaseAddress>
327328
<SubSystem>Console</SubSystem>
328329
<TargetMachine>$targetmachine</TargetMachine>
329330
EOF

src/tools/msvc/VCBuildProject.pm

+1
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,7 @@ EOF
190190
StackReserveSize="4194304" DisableSpecificWarnings="$self->{disablewarnings}"
191191
GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\\$cfgname\\$self->{name}\\$self->{name}.pdb"
192192
GenerateMapFile="FALSE" MapFileName=".\\$cfgname\\$self->{name}\\$self->{name}.map"
193+
RandomizedBaseAddress="FALSE"
193194
SubSystem="1" TargetMachine="$targetmachine"
194195
EOF
195196
if ($self->{disablelinkerwarnings})

0 commit comments

Comments
 (0)