v1-crc-workaround-clang-18.patch

text/x-patch

Filename: v1-crc-workaround-clang-18.patch
Type: text/x-patch
Part: 0
Message: Re: Invalid control file checksum with AVX-512 during initdb on a clang19 -O0 build

Patch

Same data as JSON: GET /api/v1/attachments/:id/patch the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes. API reference →
Format: unified
Series: patch v1
File+
src/port/pg_crc32c_sse42.c 4 1
diff --git a/src/port/pg_crc32c_sse42.c b/src/port/pg_crc32c_sse42.c
index 9af3474a6ca..ec267384b5d 100644
--- a/src/port/pg_crc32c_sse42.c
+++ b/src/port/pg_crc32c_sse42.c
@@ -122,7 +122,10 @@ pg_comp_crc32c_avx512(pg_crc32c crc, const void *data, size_t len)
 					y0;
 		__m512i		k;
 
-		k = _mm512_broadcast_i32x4(_mm_setr_epi32(0x740eef02, 0, 0x9e4addf8, 0));
+		k = _mm512_setr_epi32(0x740eef02, 0, 0x9e4addf8, 0,
+							  0x740eef02, 0, 0x9e4addf8, 0,
+							  0x740eef02, 0, 0x9e4addf8, 0,
+							  0x740eef02, 0, 0x9e4addf8, 0);
 		x0 = _mm512_xor_si512(_mm512_castsi128_si512(_mm_cvtsi32_si128(crc0)), x0);
 		buf += 64;