Disable RandomizedBaseAddress on MSVC builds
authorMagnus Hagander
Tue, 18 Feb 2014 13:45:58 +0000 (14:45 +0100)
committerMagnus Hagander
Tue, 18 Feb 2014 13:50:19 +0000 (14:50 +0100)
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

src/tools/msvc/MSBuildProject.pm
src/tools/msvc/VCBuildProject.pm

index 0cafd717a2baae8f4235e4a22dccb1697ddb2030..dc2e3659f3445425aa15846f68f6b1625503165c 100644 (file)
@@ -323,6 +323,7 @@ sub WriteItemDefinitionGroup
       .\\$cfgname\\$self->{name}\\$self->{name}.pdb
       false
       .\\$cfgname\\$self->{name}\\$self->{name}.map
+      false
       Console
       $targetmachine
 EOF
index 624682601b3180b41b850d8a0ef3cd188399722d..6d04a6b239bd4c9c282f2ffad165cf696615f0df 100644 (file)
@@ -190,6 +190,7 @@ EOF
        StackReserveSize="4194304" DisableSpecificWarnings="$self->{disablewarnings}"
        GenerateDebugInformation="TRUE" ProgramDatabaseFile=".\\$cfgname\\$self->{name}\\$self->{name}.pdb"
        GenerateMapFile="FALSE" MapFileName=".\\$cfgname\\$self->{name}\\$self->{name}.map"
+       RandomizedBaseAddress="FALSE"
        SubSystem="1" TargetMachine="$targetmachine"
 EOF
    if ($self->{disablelinkerwarnings})