From: Magnus Hagander Date: Tue, 18 Feb 2014 13:45:58 +0000 (+0100) Subject: Disable RandomizedBaseAddress on MSVC builds X-Git-Tag: REL9_3_4~35 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b88ecb002ef486ff76dd130fb0c6ac01551414dc;p=postgresql 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 --- diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 82337c8174..3bdd8a1a6d 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -324,6 +324,7 @@ sub WriteItemDefinitionGroup .\\$cfgname\\$self->{name}\\$self->{name}.pdb false .\\$cfgname\\$self->{name}\\$self->{name}.map + false Console $targetmachine EOF diff --git a/src/tools/msvc/VCBuildProject.pm b/src/tools/msvc/VCBuildProject.pm index 1713cb5e3f..335a1f016d 100644 --- a/src/tools/msvc/VCBuildProject.pm +++ b/src/tools/msvc/VCBuildProject.pm @@ -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})