Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Paquier2022-08-28 07:04:58 +0000
committerMichael Paquier2022-08-28 07:04:58 +0000
commit36389a060ca6b44d6ccc67653da77562a1ac5bb4 (patch)
tree20dae7735a588dad140ad88368cd27a200a9b0e5 /src/tools/msvc/MSBuildProject.pm
parent94077df1c2def788f888a27ed0035236f806466d (diff)
Enable RandomizedBaseAddress (ASLR) on Windows with MSVC builds
This has as effect to add /DYNAMICBASE to the .dll and .exe files generated by the builds, undoing 7f3e17b. Note that ASLR was already enabled in MinGW as we have never added --disable-dynamicbase there. This change will ease a bit the integration of arm64 with MSVC, as ASLR support is mandatory in this case. So, thanks to this commit, we have no need to make ASLR conditional depending on the architecture used for the build. Andres Freund has done a lot of testing with this option while working on meson, without seeing /DYNAMICBASE as being a problem in the Windows builds of the CI. Personally, not supporting anything older than Windows 10 on HEAD makes me feel safer about this change, as we have seen ASLR with being a problem in process invocation particularly with Windows 8 and server 2012 back in 2014, even if Windows 10 was not really a thing back then. 45e004f is also something that can help in making the process invocation more stable. We are very early in the development of Postgres 16, giving a lot of room to detect stability issues if any. Discussion: https://postgr.es/m/20220826012907.gjw3jdqdgsts5y65@awork3.anarazel.de
Diffstat (limited to 'src/tools/msvc/MSBuildProject.pm')
-rw-r--r--src/tools/msvc/MSBuildProject.pm1
1 files changed, 0 insertions, 1 deletions
diff --git a/src/tools/msvc/MSBuildProject.pm b/src/tools/msvc/MSBuildProject.pm
index 62acdda3a19..594729ceb7d 100644
--- a/src/tools/msvc/MSBuildProject.pm
+++ b/src/tools/msvc/MSBuildProject.pm
@@ -347,7 +347,6 @@ sub WriteItemDefinitionGroup
<ProgramDatabaseFile>.\\$cfgname\\$self->{name}\\$self->{name}.pdb</ProgramDatabaseFile>
<GenerateMapFile>false</GenerateMapFile>
<MapFileName>.\\$cfgname\\$self->{name}\\$self->{name}.map</MapFileName>
- <RandomizedBaseAddress>false</RandomizedBaseAddress>
<!-- Permit links to MinGW-built, 32-bit DLLs (default before VS2012). -->
<ImageHasSafeExceptionHandlers/>
<SubSystem>Console</SubSystem>