From c23c60f545c163e46f51027a8ceff23ccfaf4f0c Mon Sep 17 00:00:00 2001 From: Luigi Pinca Date: Sun, 10 Sep 2023 07:44:49 +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 PR-URL: https://github.com/nodejs/node/pull/49511 Reviewed-By: Ben Noordhuis Reviewed-By: Yagiz Nizipli --- deps/zlib/zlib.gyp | 58 ++++++++++++++++++++++++---------------------- 1 file changed, 30 insertions(+), 28 deletions(-) diff --git a/deps/zlib/zlib.gyp b/deps/zlib/zlib.gyp index 49de2a6c6de903..26ceed9fbe6825 100644 --- a/deps/zlib/zlib.gyp +++ b/deps/zlib/zlib.gyp @@ -107,33 +107,33 @@ }], ], }, # 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': [ - '