Re: Invalid control file checksum with AVX-512 during initdb on a clang19 -O0 build

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Soumyadeep Chakraborty <soumyadeep2007(at)gmail(dot)com>
Cc: PostgreSQL mailing lists <pgsql-bugs(at)lists(dot)postgresql(dot)org>, johncnaylorls(at)gmail(dot)com
Subject: Re: Invalid control file checksum with AVX-512 during initdb on a clang19 -O0 build
Date: 2025-06-11 21:42:19
Message-ID: aEn4O2qhLgtkSt7N@nathan
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

(I've CC'd the committer of the feature.)

On Wed, Jun 11, 2025 at 11:10:31AM -0700, Soumyadeep Chakraborty wrote:
> We are getting a control file checksum mismatch during initdb.
>
> [...]
>
> Note that this only reproduces with clang-19 -O0 and NOT -O3. I haven't
> tried with other versions of clang.
>
> OTOH, gcc-14 is cool with both -O0 and -O3, with AVX-512 getting picked
> for both cases, for CRC instructions.

I'm wondering if there's anything else this could be besides a compiler
bug. It's interesting that -O0 is the broken case. Have you tried looking
for differences in the assembly code?

--
nathan

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Masahiko Sawada 2025-06-11 22:03:04 Re: Logical replication 'invalid memory alloc request size 1585837200' after upgrading to 17.5
Previous Message Soumyadeep Chakraborty 2025-06-11 18:10:31 Invalid control file checksum with AVX-512 during initdb on a clang19 -O0 build