-
Notifications
You must be signed in to change notification settings - Fork 29.8k
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
build: v8 pointer compression is 64bit arch only #40418
Conversation
ccecf9c
to
e888420
Compare
cc @nodejs/v8 |
/cc @nodejs/platform-aix @nodejs/platform-ppc |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the group ping @targos! Yes the AIX/ppc64, Linux/ppc64le, Linux/s390x and the in development RISC-V port etc.are all also 64-bit and based on the information in the descirption this will result in the wrong behavior on those. Also since 32-bit is now the smaller set of plaforms (It's unlikely any new 32-bit ones will appear!) I'd strongly suggest that this is changed to an explicit list of the 64-bit ones as opposed to not in
64-bit ones to set the option off.
Do we have any tests that show this failure at present?
e888420
to
dbddd86
Compare
@sxa we do not build with pointer compression enabled anywhere except the unofficial builds (https://github.com/nodejs/unofficial-builds/tree/master/recipes/x64-pointer-compression) and even there we do not run any tests. |
Thanks for the review, I have updated the code to test 32bit arches instead. There is no test for this in Node.js, as compiling with I think this is something that can be tested in node-gyp instead since it is about building native modules. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. Assuming that architecture list is correct (do we really have ia32
and x32
in different places) I'm ok with this change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Create new issues for 2 flaky test failures and kicked off resume |
PR-URL: #40418 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Stewart X Addison <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
Landed in a536de4 |
PR-URL: #40418 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Stewart X Addison <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
PR-URL: #40418 Reviewed-By: Jiawen Geng <[email protected]> Reviewed-By: Stewart X Addison <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Minwoo Jung <[email protected]> Reviewed-By: Michael Dawson <[email protected]>
The V8 pointer compression only works for 64bit arches, and the
v8_enable_pointer_compression
should be forced off when not building for them.Why this is needed
Node.js only provides one headers tarball, and the same
common.gypi
andconfig.gypi
file are used for building all architectures.So for Node.js distributions that have
v8_enable_pointer_compression=1
, their headers tarball will setv8_enable_pointer_compression=1
in theconfig.gypi
file, and building x86 native modules for those binaries will fail becausev8_enable_pointer_compression=1
can not work for 32bit architectures.The official Node.js distribution will also have this problem if it turned on V8 pointer compression in future.
Force turning off
v8_enable_pointer_compression
for non-64bit targets can fix it.