From a7bb3ee261dbd959fb0630264c73c6c97e06dcbc Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Wed, 6 Sep 2023 12:28:40 +0200 Subject: [PATCH] zlib: disable CRC32 SIMD optimization It seems that the optimization causes memory corruption. Disable it until the issue is fixed upstream. Fixes: https://github.com/nodejs/node/issues/45268 --- deps/zlib/zlib.gyp | 57 +++++++++++++++++++++++----------------------- 1 file changed, 29 insertions(+), 28 deletions(-) diff --git a/deps/zlib/zlib.gyp b/deps/zlib/zlib.gyp index 49de2a6c6de903..5fc69ea61a43e2 100644 --- a/deps/zlib/zlib.gyp +++ b/deps/zlib/zlib.gyp @@ -107,33 +107,34 @@ }], ], }, # zlib_arm_crc32 - { - 'target_name': 'zlib_crc32_simd', - 'type': 'static_library', - 'conditions': [ - ['OS!="win" or llvm_version!="0.0"', { - 'cflags': [ - '-msse4.2', - '-mpclmul', - ], - 'xcode_settings': { - 'OTHER_CFLAGS': [ - '-msse4.2', - '-mpclmul', - ], - }, - }] - ], - 'defines': [ 'CRC32_SIMD_SSE42_PCLMUL' ], - 'include_dirs': [ '<(ZLIB_ROOT)' ], - 'direct_dependent_settings': { - 'defines': [ 'CRC32_SIMD_SSE42_PCLMUL' ], - 'include_dirs': [ '<(ZLIB_ROOT)' ], - }, - 'sources': [ - '