Re: [PATCH] Add native windows on arm64 support

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Julien Rouhaud <rjuju123@gmail.com>, Niyas Sait <niyas.sait@linaro.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-03-24T22:38:44Z
Lists: pgsql-hackers
On Thu, Mar 24, 2022 at 2:15 PM Andres Freund <andres@anarazel.de> wrote:
> I think we've generally seen the ASLR issue become less prominent on
> windows. Whether that's because of the silent retries we added, or because
> just about everyone moved to 64bit windows / PG, I don't know. I'd guess both,
> with 64bit being the larger influence.
>
> Wonder if it's worth adding some debug logging to the retry code and stop
> disabling ASLR on 64bit windows... It's imo pretty crazy that we loop up to
> 100 times in internal_forkexec() around CreateProcess() &&
> pgwin32_ReserveSharedMemoryRegion() without, as far as I can see, a single
> debug message.

Yeah.  I think we should commit this patch, but decree that
Windows/aarch64 support is experimental only for now.  That allows a
build farm animal to be set up.  Then we add a bit of extra logging
and see how it does running our test suite over time and learn more.



Commits

  1. MSVC: Support building for AArch64.

  2. Remove "#ifdef WIN32" guards from src/port/win32*.c

  3. Adjust XML test case to avoid unstable behavior.

  4. Enable RandomizedBaseAddress (ASLR) on Windows with MSVC builds