Skip to content
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

Building node 20.18.x fails with pointer compression on Windows OS #57407

Open
avcribl opened this issue Mar 10, 2025 · 1 comment
Open

Building node 20.18.x fails with pointer compression on Windows OS #57407

avcribl opened this issue Mar 10, 2025 · 1 comment
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.

Comments

@avcribl
Copy link

avcribl commented Mar 10, 2025

Version

20.18.0

Platform

Microsoft Windows NT 10.0.17763.0 x64

Subsystem

No response

What steps will reproduce the bug?

Building the nodejs 20.18.0 on Windows would fail. One can reproduce it by running vcbuild.bat x64 v8_ptr_compress.

How often does it reproduce? Is there a required condition?

Always

What is the expected behavior? Why is that the expected behavior?

The build for Windows OS should not fail

What do you see instead?

v8_snapshot.vcxproj -> ....\out\Release\lib\v8_snapshot.lib
node_pch.cc
node_snapshot_stub.cc
node_mksnapshot.cc
Creating library out\Release\node_mksnapshot.lib and object out\Release\node_mksnapshot.exp
node_mksnapshot.vcxproj -> out\Release\node_mksnapshot.exe
node_mksnapshot

Fatal error in , line 0
Check failed: GetProcessWideSandbox()->Contains(pointer).
FailureMessage Object: 000000E0854FEAB0
----- Native stack trace -----

1: 00007FF680D5E56D node::DumpNativeBacktrace+157 [C:\Users\Administrator\projects\newf\build\node-v20.18.0\src
debug_utils.cc]:L322
2: 00007FF680DFCD4F <lambda_45d78f1d2215ed726c4ba68a2190e4ad>::<lambda_invoker_cdecl>+47 [C:\Users\Administrator\p
rojects\newf\build\node-v20.18.0\src\node_platform.cc]:L570
3: 00007FF681EE0A92 V8_Fatal+162 [C:\Users\Administrator\projects\newf\build\node-v20.18.0\deps\v8\src\base\logg
ing.cc]:L166
4: 00007FF6815267DE v8::internal::Factory::NewJSTypedArray+1006 [C:\Users\Administrator\projects\newf\build\node
-v20.18.0\deps\v8\src\heap\factory.cc]:L3217
5: 00007FF6813C0741 v8::Float64Array::New+241 [C:\Users\Administrator\projects\newf\build\node-v20.18.0\deps\v8
src\api\api.cc]:L8923
6: 00007FF680DAAE7E node::AsyncHooks::AsyncHooks+158 [C:\Users\Administrator\projects\newf\build\node-v20.18.0\s
rc\env.cc]:L1617
7: 00007FF680DAB7B5 node::Environment::Environment+629 [C:\Users\Administrator\projects\newf\build\node-v20.18.0
\src\env.cc]:L811
8: 00007FF680E70BD8 node::CreateEnvironment+168 [C:\Users\Administrator\projects\newf\build\node-v20.18.0\src\ap
i\environment.cc]:L415
9: 00007FF680E6F6CB std::_Func_impl_no_alloc<<lambda_bbd07f2f9ab02223ef9d8e2f538d9d59>,node::Environment *,node::C
ommonEnvironmentSetup const *>::_Do_call+123 [C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC
\14.41.34120\include\functional]:L878
10: 00007FF680E6DF56 node::CommonEnvironmentSetup::CommonEnvironmentSetup+1558 [C:\Users\Administrator\projects\newf
\build\node-v20.18.0\src\api\embed_helpers.cc]:L164
11: 00007FF680E6EAEC node::CommonEnvironmentSetup::CreateForSnapshotting+188 [C:\Users\Administrator\projects\newf
n\build\node-v20.18.0\src\api\embed_helpers.cc]:L188
12: 00007FF680D2F9F5 node::BuildSnapshotWithoutCodeCache+101 [C:\Users\Administrator\projects\newf\build\node-v20
.18.0\src\node_snapshotable.cc]:L978
13: 00007FF680D32921 node::SnapshotBuilder::GenerateAsSource+817 [C:\Users\Administrator\projects\newf\build\node
-v20.18.0\src\node_snapshotable.cc]:L1225
14: 00007FF6809961A3 BuildSnapshot+883 [C:\Users\Administrator\projects\newf\build\node-v20.18.0\tools\snapshot\n
ode_mksnapshot.cc]:L96
15: 00007FF682521B04 __scrt_common_main_seh+268 [D:\a_work\1\s\src\vctools\crt\vcstartup\src\startup\exe_common.in
l]:L288
16: 00007FFF76887AC4 BaseThreadInitThunk+20
17: 00007FFF77DBA8C1 RtlUserThreadStart+33
C:\Program Files\Microsoft Visual Studio\2022\Community\MSBuild\Microsoft\VC\v170\Microsoft.CppCommon.targets(254,5):
error MSB8066: Custom build for 'out\Release\node_mksnapshot.exe;deps\openssl\nodejs-openssl.cnf' exited with code
-2147483645. [C:\Users\Administrator\projects\newf\build\node-v20.18.0\node.vcxproj]

Additional information

The issue is similar to what's been reported here: #54531
Also, I tracked this issue down and it started happening after this commit: #53884
Enabling pointer compression and V8 sandbox at the same time causes the issue for Windows OS. Generally, I think we should be able to turn on these features independently.

@marco-ippolito marco-ippolito added windows Issues and PRs related to the Windows platform. build Issues and PRs related to build files or the CI. labels Mar 12, 2025
@joyeecheung
Copy link
Member

joyeecheung commented Mar 20, 2025

This sounds like a V8 issue. Generally only two combinations of configurations are supported by V8:

  • Pointer compression + sandbox, which is used by Chrome
  • No pointer compression + no sandbox, which is used by Node.js

If you wish to use V8 with pointer compression but without sandbox, it enters unsupported territory of V8. If you would like to see it fixed, the best place to report it is V8's issue tracker instead of here. Although my impression is that V8 may accept patches for this unsupported combination if it's not too invasive, but probably won't go out of their way to write the patch themselves.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Issues and PRs related to build files or the CI. windows Issues and PRs related to the Windows platform.
Projects
None yet
Development

No branches or pull requests

3 participants