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

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Craig Ringer <craig(at)2ndquadrant(dot)com>, MauMau <maumau307(at)gmail(dot)com>, 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-18 15:05:10
Message-ID: CABUevExiYiOvJa8hxWxZp4cPgF=+UagJa0SXd8keB1OgVF8Btw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Feb 18, 2014 at 3:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:

> Magnus Hagander <magnus(at)hagander(dot)net> writes:
> > I've applied this and backpatched to 9.3 and 9.2, which is as far back as
> > it goes cleanly.
>
> > In 9.1 the build system looked significantly different, which makes it
> > strange since the original report in this thread was about 9.1 but the
> > patch supplied clearly wasn't for that.
>
> > 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?
>
> The question I think needs to be asked is not that, but "what about the
> mingw and cygwin builds?".
>

Cygwin has their own implementation of fork(). So the fix there has to be
done in cygwin and not us - presumably they have either already fixed it,
or will fix it in order to get general compatibility with the new ASLR
versions.

Mingw is a different story. But some googling indicates that mingw disables
ASLR by default. You need to specify --dynamicbase if you want to to be
dynamic, which we don't. (Being mingw I've not managed to find any actual
docs, but for example
http://lists.cypherpunks.ca/pipermail/otr-dev/2012-August/001373.html seems
to indicate it has to be enabled).

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message MauMau 2014-02-18 16:16:41 Re: [review] PostgreSQL Service on Windows does not start if data directory given is relative path
Previous Message Tom Lane 2014-02-18 14:49:23 Re: inherit support for foreign tables