Skip to content

Commit 062deb3

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 5da0606 commit 062deb3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/tools/msvc/MSBuildProject.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,7 @@ sub WriteItemDefinitionGroup
323323
<ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
324324
<GenerateMapFile>false</GenerateMapFile>
325325
<MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
326+
<RandomizedBaseAddress>false</RandomizedBaseAddress>
326327
<SubSystem>Console</SubSystem>
327328
<TargetMachine>$targetmachine</TargetMachine>
328329
EOF

src/tools/msvc/VCBuildProject.pm

Lines changed: 1 addition & 0 deletions
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)