-
Notifications
You must be signed in to change notification settings - Fork 3.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
zlib Illegal Instruction on CPU without SSSE3/SSE4.2 support #7688
Labels
Comments
Does it still happen on the latest version? |
Yes it happens since 0.49.0, but we manually disabled SSSE3 features by the following patch: diff --git a/deps/zlib/crc32.c b/deps/zlib/crc32.c
index e95b9087351c1a46dda520025c55d0ef8a1484e0..7db41a794a97beeb556370bd6778894998539fe7 100644
--- a/deps/zlib/crc32.c
+++ b/deps/zlib/crc32.c
@@ -501,7 +501,7 @@ uLong ZEXPORT crc32_combine64(crc1, crc2, len2)
ZLIB_INTERNAL void crc_reset(deflate_state *const s)
{
if (x86_cpu_enable_simd) {
- crc_fold_init(s);
+ // crc_fold_init(s);
return;
}
s->strm->adler = crc32(0L, Z_NULL, 0);
@@ -509,14 +509,14 @@ ZLIB_INTERNAL void crc_reset(deflate_state *const s)
ZLIB_INTERNAL void crc_finalize(deflate_state *const s)
{
- if (x86_cpu_enable_simd)
- s->strm->adler = crc_fold_512to32(s);
+ // if (x86_cpu_enable_simd)
+ // s->strm->adler = crc_fold_512to32(s);
}
ZLIB_INTERNAL void copy_with_crc(z_streamp strm, Bytef *dst, long size)
{
if (x86_cpu_enable_simd) {
- crc_fold_copy(strm->state, dst, strm->next_in, size);
+ // crc_fold_copy(strm->state, dst, strm->next_in, size);
return;
}
zmemcpy(dst, strm->next_in, size);
|
I'm gonna be honest I am waaay out of my depth here. I'll leave this open for anyone who encounters this error |
Got same problem with "unzipper", it unzipped zero/one file and crashes. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am experiencing the same bug as nodejs/node#32553 mentioned.
NWJS Version : 0.49.0
Operating System : Windows 7 SP1 6.1.7601 24520
Expected behavior
zlib.gzipSync(data)
should work with any CPU.Actual behavior
When calling
zlib.gzipSync(data)
in 0.49.0 with some CPU architecture, the webview crashed with EXCEPTION_ILLEGAL_INSTRUCTION.Experiencing this issue in the following CPUs:
Those two CPUs don't have SSSE3/SSE4.2 supported, which might be the issue.
How to reproduce
Also
I tried to remove flags in
zlib.gyp
which is also removed by upstream node here, but I cannot compile node after removing-msse4.2
(removing-mssse3
is fine).I think it relates to nodejs/node@65db9b2 this change, but 0.49.0 already has this patch in it.
The text was updated successfully, but these errors were encountered: