-
Notifications
You must be signed in to change notification settings - Fork 29.7k
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
clang-12 + Release mode causes zlib failures (apparent data corruption) #39313
Comments
Refs: vercel/pkg-fetch#208 I can reproduce this issue with Apple Clang compiled macos-x64 executable.
At least Node 14 and 16 release lines are impacted. Interestingly, the issue does not appear with arm64 executable compiled with the same toolchain. This could become a release-critical bug, once the new Clang/Xcode versions roll in. I suggest that we re-triage this issue as I am looking at the issue right now, and to raise attention here are some pings to recent committers to the zlib parts: @RaisinTen, @addaleax, @mscdex, @aduh95, @ronag . |
Perhaps we need to apply the fix referred to in #31800 (comment) to solve this issue. But we need #33044 to land first to be able to update our copy of zlib. |
All supported macOS versions have zlib as a system library.
Describe another failure case for installing node versions from source on mac arm64 machines. It seems to be related to nodejs/node#39313 (which describes a similar issue).
…rom source on mac arm64 machines. It seems to be related to nodejs/node#39313 (which describes a similar issue).
Newer version of clang (tested on macOS with Xcode 13.2.1) seem to fail to generate correct code when compiling |
#45387 landed. I cannot reproduce on macOS with clang 14. Can this be closed? |
Did the fix find its way into all currently supported versions of node.js? |
#45387 is not yet included in any version. |
I suggest to close the bug after the upstream fix has been merged into all currently supported versions of node.js. |
Why? we usually close the issue when the fix lands on main. If the issue is fixed on main there is no reason to keep it open. |
I can confirm that the bug no longer exists on main. So, you might close this if you want. I still need to keep my workaround in my build script for releases until all releases are fixed. |
Thank you for the confirmation. |
I experience this issue with clang-14, nvm, node 16.15.1, npm 8.11.0, macOS 13.3.1 (22E261). Using |
Version
16.3.0, 16.4.0, 16.4.2
Platform
Linux 5.8.0-53-generic #60~20.04.1-Ubuntu SMP Thu May 6 09:52:46 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Subsystem
zlib
What steps will reproduce the bug?
Install clang 12.
Download and build Node with clang-12
Run the following script with the produced binary:
Observe output:
How often does it reproduce? Is there a required condition?
Always when compilied in Release mode with clang-12
What is the expected behavior?
prettier.tar should be produced without errors
What do you see instead?
Additional information
This error does not appear when:
Ubuntu clang version 11.0.0-2~ubuntu20.04.1
)gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
)This error is also not present when compiling upstream zlib (https://zlib.net/) with clang-12.
This issue breaks
npm install
for prettier and several other packages as well because the files cannot be decompressed.Built on an AMD Threadripper CPU.
The text was updated successfully, but these errors were encountered: