Re: [bug fix] postgres.exe fails to start on Windows Server 2012 due to ASLR

From: "MauMau" <maumau307(at)gmail(dot)com>
To: "Magnus Hagander" <magnus(at)hagander(dot)net>, "Craig Ringer" <craig(at)2ndquadrant(dot)com>
Cc: "PostgreSQL-development" <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [bug fix] postgres.exe fails to start on Windows Server 2012 due to ASLR
Date: 2014-02-22 04:44:19
Message-ID: 9C709659FE3C4B8DA7135C6F307B83F5@maumau
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

From: "Magnus Hagander" <magnus(at)hagander(dot)net>
> Does somebody want to look at backpatching this to 9.1 and earlier, or
> should we just say that it's not fully supported on those Windows versions
> unless you apply the registry workaround?

Please use the attached patch. It applies cleanly to both 9.1 and 9.0.

We don't need to consider 8.4, because ASLR became enabled by default in
Visual Studio 2008 and 8.4 doesn't support building with 2008.

I tested with Visual Studio 2008 Express. You can check if ASLR is disabled
using dumpbin. "dumpbin /headers <EXE_or_DLL_file>" outputs the following
lines. If the "Dynamic base" line is displayed, ASLR is enabled. If this
line disappears, ASLR is disabled.

8140 DLL characteristics
Dynamic base
NX compatible
Terminal Server Aware

Regards
MauMau

Attachment Content-Type Size
disable_ASLR_pg90_91.patch application/octet-stream 658 bytes

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Amit Kapila 2014-02-22 06:23:24 Re: Patch: show relation and tuple infos of a lock to acquire
Previous Message Amit Kapila 2014-02-22 03:38:39 Re: walsender doesn't send keepalives when writes are pending