You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Windows: update zlib-ng to 2.2.5 (PGO builds with Visual Studio 17.11 decompress wrongly on AVX-512 CPUs) #161735
On Windows, a PGO build made with Visual Studio 17.11 (MSVC 14.41, MSC v.1941) decompresses deflate data wrongly on CPUs with AVX-512 (here a Ryzen 9 7950X): test_zlib (test_decompressmaxlen*: "incorrect data check"), test_gzip (test_write_seek_write: "CRC check failed") and test_tarfile fail. The checks are right, the data is wrong: raw inflate of an intact file returns different bytes than Linux gzip, and zlib.crc32() is correct. Builds without PGO and the python.org builds (newer compiler) are fine.
This is zlib-ng/zlib-ng#1883: MSVC from Visual Studio 17.11 miscompiles GET_CHUNK_MAG() (arch/x86/chunkset_avx512.c, used for back-references shorter than 32 bytes). zlib-ng 2.2.5 works around it (zlib-ng/zlib-ng#1884) by turning optimization off for that function for Visual Studio before 17.13 (_MSC_VER < 1943). main, 3.15 and 3.14 bundle 2.2.4.
As discussed on #131438, I would like to request updating the Windows build to zlib-ng 2.2.5. 2.2.5 also checks for ZMM support before using the VPCLMULQDQ CRC code that CPython builds (zlib-ng/zlib-ng#1932) and reverts a deflate_medium change that regressed performance (zlib-ng/zlib-ng#1938). I'm happy to test a build on the affected machine.
Activity
StanFromIreland commentedon Nov 10, 2026
CC @zware
fixup! pythongh-161735: Update zlib-ng to 2.2.5 on Windows