Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB barriers

From: Dave Cramer <davecramer(at)gmail(dot)com>
To: Nathan Bossart <nathandbossart(at)gmail(dot)com>
Cc: Greg Burd <greg(at)burd(dot)me>, Peter Eisentraut <peter(at)eisentraut(dot)org>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: [PATCH] Fix ARM64/MSVC atomic memory ordering issues on Win11 by adding explicit DMB barriers
Date: 2025-11-21 09:46:13
Message-ID: CADK3HHLMwQizkrpRujcXROT1N3wdZPdJStmBxk9EoRUgXmMKmA@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, 20 Nov 2025 at 17:36, Nathan Bossart <nathandbossart(at)gmail(dot)com>
wrote:

> I took a quick look at 0001.
>
> +#ifdef _MSC_VER
> +#include <intrin.h>
> +#else
> #include <arm_acle.h>
> unsigned int crc;
>
> I think you can remove this since we unconditionally do the runtime check
> for MSVC. In any case, the missing #endif seems likely to cause
> problems.
>
> --- a/src/port/pg_crc32c_armv8.c
> +++ b/src/port/pg_crc32c_armv8.c
> @@ -14,7 +14,9 @@
> */
> #include "c.h"
>
> +#ifndef _MSC_VER
> #include <arm_acle.h>
> +#endif
>
> Hm. Doesn't MSVC require intrin.h?
>
> --
> nathan
>

I posted this as a bug with Microsoft
https://developercommunity.visualstudio.com/t/MSVCs-_InterlockedCompareExchange-doe/11004239

Dave

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Chao Li 2025-11-21 10:03:41 Re: quoteOneName() inconsistency with quote_all_identifiers — replacement API proposed
Previous Message Chao Li 2025-11-21 09:23:10 Re: Allow GUC settings in CREATE SUBSCRIPTION CONNECTION to take effect