Re: [PATCH] Add native windows on arm64 support
Andres Freund <andres@anarazel.de>
From: Andres Freund <andres@anarazel.de>
To: Dave Cramer <davecramer@postgres.rocks>
Cc: Michael Paquier <michael@paquier.xyz>, Andrew Dunstan <andrew@dunslane.net>, Anthony Roberts <anthony.roberts@linaro.org>, Daniel Gustafsson <daniel@yesql.se>, Lina Iyer <lina.iyer@linaro.org>, Mike Holmes <mike.holmes@linaro.org>, Peter Eisentraut <peter@eisentraut.org>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>, Thomas Munro <thomas.munro@gmail.com>, Tom Lane <tgl@sss.pgh.pa.us>
Date: 2024-02-09T19:36:18Z
Lists: pgsql-hackers
Hi,
On 2024-02-09 14:23:46 -0500, Dave Cramer wrote:
> > interestingly meson test does not produce any error
> > The buildfarm produces the following error for me:
> >
> > -SELECT relname, attname, coltypes, get_columns_length(coltypes)
> > - FROM check_columns
> > - WHERE get_columns_length(coltypes) % 8 != 0 OR
> > - 'name'::regtype::oid = ANY(coltypes);
> > - relname | attname | coltypes | get_columns_length
> > ----------+---------+----------+--------------------
> > -(0 rows)
> > -
> > +server closed the connection unexpectedly
> > + This probably means the server terminated abnormally
> > + before or while processing the request.
> > +connection to server was lost
> >
>
> Actually digging some more, here is the actual error
>
> 2024-02-09 13:31:11.008 -05 postmaster[10672] LOG: server process (PID
> 11204) was terminated by exception 0xC0000005
> 2024-02-09 13:31:11.008 -05 postmaster[10672] DETAIL: Failed process was
> running: VACUUM;
> 2024-02-09 13:31:11.008 -05 postmaster[10672] HINT: See C include file
> "ntstatus.h" for a description of the hexadecimal value.
That's something like a segfault.
One suspicion I have is that src/port/pg_crc32c_armv8_choose.c possibly
doesn't properly support msvc. It seems to assume that SIGILL can be trapped,
but that IIRC doesn't work on windows.
I'd check if the problem persists if you change
cdata.set('USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK', 1)
to
cdata.set('USE_ARMV8_CRC32C_WITH_RUNTIME_CHECK', 0)
Also, yikes, that's an ugly way of doing hardware detection. Jumping out of a
signal handler into normal code. Brrr.
Greetings,
Andres Freund
Commits
-
MSVC: Support building for AArch64.
- a516b3f00d74 19 (unreleased) landed
-
Remove "#ifdef WIN32" guards from src/port/win32*.c
- 09eb633e1baa 17.0 cited
-
Adjust XML test case to avoid unstable behavior.
- 4ea07e7cf3c6 16.0 landed
-
Enable RandomizedBaseAddress (ASLR) on Windows with MSVC builds
- 36389a060ca6 16.0 landed