Skip to content

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

Open
@avcribl

Description

@avcribl

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    buildIssues and PRs related to build files or the CI.windowsIssues and PRs related to the Windows platform.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions