From 062deb31387b0e3190f8084c2de2194f40ee6a96 Mon Sep 17 00:00:00 2001 From: Magnus Hagander Date: Tue, 18 Feb 2014 14:45:58 +0100 Subject: [PATCH] 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 --- src/tools/msvc/MSBuildProject.pm | 1 + src/tools/msvc/VCBuildProject.pm | 1 + 2 files changed, 2 insertions(+) diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm index 0cafd717a2..dc2e3659f3 100644 --- a/src/tools/msvc/MSBuildProject.pm +++ b/src/tools/msvc/MSBuildProject.pm @@ -323,6 +323,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 624682601b..6d04a6b239 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}) -- 2.40.0