Embedder crashing at node::InitializeNodeWithArgs with C0000005 (access violation) on Windows
#42188
Replies
|
I've converted this to a discussion because this is likely not a bug in node.js itself. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment


Version
v17.6.1-pre (built from source from https://github.com/nodejs/node/tree/v17.x-staging)
Platform
Microsoft Windows NT 10.0.19044.0 x64
Subsystem
No response
What steps will reproduce the bug?
I'm trying to build node into a static library and link it to a project with CMake.
--fully-static&--enable-static. I used MS Build Tools 2019.MTDV8_COMPRESS_POINTERS,D_ITERATOR_DEBUG_LEVEL=0v8,node,uvv8_monolith.lib(v 9.9-lkgr),node.lib(v17.x-staging),dbghelp.lib,Winmm.lib/ignore:4099test.exe console.log(42).How often does it reproduce? Is there a required condition?
No response
What is the expected behavior?
The program would not crash and 42 gets outputted to the console.
What do you see instead?
node::InitializeNodeWithArgs.Using the debugger, I found that it crashes at
with
Exception 0xc0000005 encountered at address 0x51dfefe: User-mode data execution prevention (DEP) violation at location 0x051dfefe-858993460also got stored in exit_code variableDid I build node wrong? If so, how do I build it into a .lib correctly?
Additional information
CMakeLists.txt - https://gist.github.com/giilbert/db130af69dce695af2f40fb83c87352e