Re: [PATCH] Add native windows on arm64 support

From: Niyas Sait <niyas(dot)sait(at)linaro(dot)org>
To: Thomas Munro <thomas(dot)munro(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Add native windows on arm64 support
Date: 2022-03-22 09:37:46
Message-ID: CAFPTBD_NZb=q_6uE-QV+S+pm=Rc9sBKrg8CQ_Y3dc27Awrm7cQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Thanks, Thomas for reviewing the patch!

Yes, we cannot turn off ASLR for Arm64 targets with MSVC. I haven't seen
any issues so far on win/arm64 with this option turned off. I guess it
should be okay. If we really need ASLR turned off, then I guess might have
to use clang.

Yes, we could look into providing a build machine. Do you have any
reference to what the CI system looks like now for PostgresSQL and how to
add new workers etc.?

Niyas

On Fri, 18 Mar 2022 at 20:50, Thomas Munro <thomas(dot)munro(at)gmail(dot)com> wrote:

> On Wed, Feb 23, 2022 at 11:09 PM Niyas Sait <niyas(dot)sait(at)linaro(dot)org> wrote:
> > I have created a patch that adds support for building Postgres for the
> windows/arm64 platform using the MSVC toolchain. Following changes have
> been included
> >
> > 1. Extend MSVC scripts to handle ARM64 platform.
> > 2. Add arm64 definition of spin_delay function.
> > 3. Exclude arm_acle.h import with MSVC compiler.
> >
> > Compilation steps are consistent and similar to other windows platforms.
> >
> > The change has been tested on windows/x86_64 and windows/arm64 and all
> regression tests passes on both platforms.
>
> + # arm64 linker only supports dynamic base address
> + my $cfgrandbaseaddress = $self->{platform} eq 'ARM64' ? 'true' :
> 'false';
> ...
> + <RandomizedBaseAddress>$cfgrandbaseaddress</RandomizedBaseAddress>
>
> Does that mean that you can't turn off ASLR on this arch? Does it
> cause random backend failures due to inability to map shared memory at
> the expected address? Our experience with EXEC_BACKEND on various
> Unix systems tells us that you have to turn off ASLR if you want 100%
> success rate on starting backends, but I guess it depends on the
> details of how the randomisation is done.
>
> Any interest in providing a build farm animal, so that we could know
> that this works?
>

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tatsuo Ishii 2022-03-22 09:44:15 Re: [HACKERS] WIP aPatch: Pgbench Serialization and deadlock errors
Previous Message Alexey Kondratov 2022-03-22 09:23:35 Re: Supply restore_command to pg_rewind via CLI argument