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

Nathan Bossart <nathandbossart@gmail.com>

From: Nathan Bossart <nathandbossart@gmail.com>
To: Soumyadeep Chakraborty <soumyadeep2007@gmail.com>
Cc: PostgreSQL mailing lists <pgsql-bugs@lists.postgresql.org>, johncnaylorls@gmail.com
Date: 2025-06-11T21:42:19Z
Lists: pgsql-bugs

Commits

Same data as JSON: GET /api/v1/messages/:b64id/commits the thread's linked commits as JSON, with link sources. API reference →
  1. Workaround code generation bug in clang

  2. Don't reduce output request size on non-Unix-socket connections.

(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