Skip to content

deps: update V8 to 13.7 #58064

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

Open
wants to merge 39 commits into
base: main
Choose a base branch
from
Open

deps: update V8 to 13.7 #58064

wants to merge 39 commits into from

Conversation

targos
Copy link
Member

@targos targos commented Apr 28, 2025

Notable changes:

Might replace #57753

I removed a bunch of compat patches including all of those for MSVC and armv7.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/actions
  • @nodejs/gyp
  • @nodejs/performance
  • @nodejs/security-wg
  • @nodejs/tsc
  • @nodejs/v8-update

@nodejs-github-bot nodejs-github-bot added build Issues and PRs related to build files or the CI. dependencies Pull requests that update a dependency file. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. v8 engine Issues and PRs related to the V8 dependency. labels Apr 28, 2025
@targos
Copy link
Member Author

targos commented Apr 28, 2025

Debug build fails on my mac:

FAILED: gen/node_snapshot.cc
cd ../../; export BUILT_FRAMEWORKS_DIR=/Users/mzasso/git/nodejs/v8-next-update/out/Debug; export BUILT_PRODUCTS_DIR=/Users/mzasso/git/nodejs/v8-next-update/out/Debug; export CONFIGURATION=Debug; export EXECUTABLE_NAME=node; export EXECUTABLE_PATH=node; export FULL_PRODUCT_NAME=node; export PRODUCT_NAME=node; export PRODUCT_TYPE=com.apple.product-type.tool; export SDKROOT=/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk; export SRCROOT=/Users/mzasso/git/nodejs/v8-next-update/out/Debug/../../; export SOURCE_ROOT="${SRCROOT}"; export TARGET_BUILD_DIR=/Users/mzasso/git/nodejs/v8-next-update/out/Debug; export TEMP_DIR="${TMPDIR}"; export XCODE_VERSION_ACTUAL=1630;/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot /Users/mzasso/git/nodejs/v8-next-update/out/Debug/gen/node_snapshot.cc


#
# Fatal error in ../../deps/v8/src/snapshot/serializer.cc, line 1194
# Debug check failed: InstanceTypeChecker::IsEmbedderDataArray(instance_type) || InstanceTypeChecker::IsJSTypedArray(instance_type) || InstanceTypeChecker::IsJSArrayBuffer(instance_type) || InstanceTypeChecker::IsExternalString(instance_type) || InstanceTypeChecker::IsNativeContext(instance_type) || InstanceTypeChecker::IsJSSynchronizationPrimitive(instance_type) || (InstanceTypeChecker::IsJSObject(instance_type) && Cast<JSObject>(host)->GetEmbedderFieldCount() > 0).
#
#
#
#FailureMessage Object: 0x16db877f8
----- Native stack trace -----

 1: 0x10299e534 node::DumpNativeBacktrace(__sFILE*) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 2: 0x102c0fed0 node::NodePlatform::GetStackTracePrinter()::$_0::operator()() const [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]

@miladfarca
Copy link
Contributor

miladfarca commented Apr 28, 2025

These two JSPI CLs might need to be included if not already part of this change, for ppc64 and s390x:
https://chromium-review.googlesource.com/c/v8/v8/+/6488239
https://chromium-review.googlesource.com/c/v8/v8/+/6488233

@targos
Copy link
Member Author

targos commented Apr 28, 2025

@anonrig any idea why macOS fails to build on GitHub actions (simdutf-related error)? I didn't get this error locally.

@targos
Copy link
Member Author

targos commented Apr 28, 2025

@miladfarca thanks for the heads up. I believe both commits are included already.

@anonrig
Copy link
Member

anonrig commented Apr 28, 2025

@anonrig any idea why macOS fails to build on GitHub actions (simdutf-related error)? I didn't get this error locally.

I'm not sure. @lemire any suggestions to why simdutf is failing on macOS? https://github.com/nodejs/node/actions/runs/14713137908/job/41290246774?pr=58064

@Renegade334
Copy link
Contributor

any idea why macOS fails to build on GitHub actions (simdutf-related error)? I didn't get this error locally.

I believe that macos builds are going to be dependent on Xcode >=16.3, as V8 now depends on simdutf features that are contingent on std::atomic_ref, which is not available in llvm <19.

This might necessitate changing the build image to macos-15.

@targos
Copy link
Member Author

targos commented Apr 29, 2025

I see, thanks @Renegade334. I think the easiest for now is to revert https://chromium-review.googlesource.com/c/v8/v8/+/6449193, since it touches a feature that's in development and behind a flag.

@targos
Copy link
Member Author

targos commented Apr 29, 2025

It looks like something is broken on the release builds too.
Locally, I get this stack trace:

Process 239 launched: '/Users/mzasso/git/nodejs/v8-next-update/out/Release/node' (arm64)
Process 239 stopped
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1f4e6ed34b21)
    frame #0: 0x00000001020ec9b0 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::OperationBuffer::Allocate(this=0x0000000136828e18, slot_count=4) at graph.h:99:25 [opt]
   96  	    operation_sizes_[OpIndex(idx.offset() + static_cast<uint32_t>(slot_count) *
   97  	                                                sizeof(OperationStorageSlot))
   98  	                         .id() -
-> 99  	                     1] = slot_count;
   100 	    return result;
   101 	  }
   102
Target 0: (node) stopped.
warning: node was compiled with optimization - stepping may behave oddly; variables may not be available.
(lldb) bt
* thread #1, name = 'MainThread', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1f4e6ed34b21)
  * frame #0: 0x00000001020ec9b0 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::OperationBuffer::Allocate(this=0x0000000136828e18, slot_count=4) at graph.h:99:25 [opt]
    frame #1: 0x00000001020ec974 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::Graph::Allocate(this=0x0000000136828e18, slot_count=4) at graph.h:707:24 [opt]
    frame #2: 0x00000001020ec974 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::AllocateOpStorage(graph=0x0000000136828e18, slot_count=4) at graph.h:1228:17 [opt]
    frame #3: 0x00000001020ec974 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp& v8::internal::compiler::turboshaft::OperationT<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp>::New<v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(graph=0x0000000136828e18, input_count=2, args=<unavailable>, args=ShadowyOpIndex @ x21, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=FeedbackSource @ 0x00006000031e7f20) at operations.h:1146:9 [opt]
    frame #4: 0x00000001020ec974 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp& v8::internal::compiler::turboshaft::FixedArityOperationT<2ul, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp>::New<v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(graph=0x0000000136828e18, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>) at operations.h:1287:9 [opt]
    frame #5: 0x00000001020ec974 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource) [inlined] v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp& v8::internal::compiler::turboshaft::Graph::Add<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(this=0x0000000136828e18, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>) at graph.h:725:14 [opt]
    frame #6: 0x00000001020ec974 node`v8::internal::compiler::turboshaft::OpIndex v8::internal::compiler::turboshaft::TSReducerBase<v8::internal::compiler::turboshaft::StackBottom<v8::base::tmp::list1<v8::internal::compiler::turboshaft::GraphVisitor, v8::internal::compiler::turboshaft::LoopStackCheckElisionReducer, v8::internal::compiler::turboshaft::StoreStoreEliminationReducer, v8::internal::compiler::turboshaft::LateLoadEliminationReducer, v8::internal::compiler::turboshaft::MachineOptimizationReducer, v8::internal::compiler::turboshaft::BranchEliminationReducer, v8::internal::compiler::turboshaft::ValueNumberingReducer, v8::internal::compiler::turboshaft::TSReducerBase>>>::Emit<v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ShadowyOpIndex, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::JSPrimitiveKind, v8::internal::compiler::turboshaft::ConvertJSPrimitiveToUntaggedOrDeoptOp::UntaggedKind, v8::internal::compiler::CheckForMinusZeroMode, v8::internal::compiler::FeedbackSource>(this=0x000000016fdfdfc8, args=ShadowyOpIndex @ x25, args=ShadowyOpIndex @ x21, args=kAdditiveSafeInteger, args=kAdditiveSafeInteger | 0x88, args=kDontCheckForMinusZero | 0x4, args=<unavailable>) at assembler.h:986:44 [opt]
    frame #7: 0x0000000100774d28 node`v8::internal::(anonymous namespace)::GetPropertyWithInterceptorInternal(it=0x000000016fdfdd98, interceptor=DirectHandle<v8::internal::InterceptorInfo> @ x21, done=0x000000016fdfdd30) at js-objects.cc:1211:19 [opt]
    frame #8: 0x00000001007fda84 node`v8::internal::Object::GetProperty(it=0x000000016fdfdd98, is_global_reference=<unavailable>) at objects.cc:1285:9 [opt]
    frame #9: 0x0000000100585264 node`v8::internal::LoadIC::Load(this=0x000000016fdfde68, object=<unavailable>, name=Handle<v8::internal::Name> @ x19, update_feedback=<unavailable>, receiver=<unavailable>) at ic.cc:453:5 [opt]
    frame #10: 0x000000010058c948 node`v8::internal::Runtime_LoadNoFeedbackIC_Miss(int, unsigned long*, v8::internal::Isolate*) [inlined] v8::internal::__RT_impl_Runtime_LoadNoFeedbackIC_Miss(args=v8::internal::RuntimeArguments @ 0x00006000031f21a0, isolate=0x0000000128008000) at ic.cc:2783:3 [opt]
    frame #11: 0x000000010058c8a4 node`v8::internal::Runtime_LoadNoFeedbackIC_Miss(args_length=<unavailable>, args_object=0x000000016fdfdfd0, isolate=0x0000000128008000) at ic.cc:2768:1 [opt]
    frame #12: 0x0000000100efbfb4 node`Builtins_CEntry_Return1_ArgvOnStack_NoBuiltinExit + 84
    frame #13: 0x0000000100fe3374 node`Builtins_GetNamedPropertyHandler + 4692
    frame #14: 0x0000000100e5d12c node`Builtins_InterpreterEntryTrampoline + 268
    frame #15: 0x0000000100e5d12c node`Builtins_InterpreterEntryTrampoline + 268
    frame #16: 0x0000000100e5d12c node`Builtins_InterpreterEntryTrampoline + 268
    frame #17: 0x0000000100e5d12c node`Builtins_InterpreterEntryTrampoline + 268
    frame #18: 0x0000000100e5a8cc node`Builtins_JSEntryTrampoline + 172
    frame #19: 0x0000000100e5a570 node`Builtins_JSEntry + 176
    frame #20: 0x000000010040dda8 node`v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [inlined] v8::internal::GeneratedCode<unsigned long, unsigned long, unsigned long, unsigned long, unsigned long, long, unsigned long**>::Call(this=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>, args=<unavailable>) at simulator.h:212:12 [opt]
    frame #21: 0x000000010040dda4 node`v8::internal::(anonymous namespace)::Invoke(isolate=0x0000000128008000, params=0x000000016fdfe528) at execution.cc:440:22 [opt]
    frame #22: 0x000000010040d738 node`v8::internal::Execution::Call(isolate=<unavailable>, callable=<unavailable>, receiver=<unavailable>, args=<unavailable>) at execution.cc:530:10 [opt]
    frame #23: 0x0000000100291cec node`v8::Function::Call(this=0x000000013682cc48, isolate=0x0000000128008000, context=<unavailable>, recv=Local<v8::Value> @ 0x000000016fdfe580, argc=4, argv=0x000000016fdfe638) at api.cc:5433:7 [opt]
    frame #24: 0x00000001000d6fc4 node`node::builtins::BuiltinLoader::CompileAndCall(v8::Local<v8::Context>, char const*, node::Realm*) [inlined] node::builtins::BuiltinLoader::CompileAndCall(this=<unavailable>, context=<unavailable>, id=<unavailable>, argc=<unavailable>, argv=<unavailable>, optional_realm=<unavailable>) at node_builtins.cc:500:14 [opt]
    frame #25: 0x00000001000d6f88 node`node::builtins::BuiltinLoader::CompileAndCall(this=0x000000013684ccc0, context=Local<v8::Context> @ x19, id="internal/main/repl", realm=<unavailable>) at node_builtins.cc:0 [opt]
    frame #26: 0x000000010016d440 node`node::Realm::ExecuteBootstrapper(this=0x00000001266044c0, id=<unavailable>) at node_realm.cc:161:32 [opt]
    frame #27: 0x00000001000bbc0c node`node::StartExecution(env=0x000000013684c200, main_script_id="internal/main/repl") at node.cc:254:35 [opt]
    frame #28: 0x00000001000bbbb0 node`node::StartExecution(env=0x000000013684c200, cb=<unavailable>) at node.cc:0 [opt]
    frame #29: 0x000000010002a870 node`node::LoadEnvironment(env=0x000000013684c200, cb=<unavailable>, preload=<unavailable>) at environment.cc:539:10 [opt]
    frame #30: 0x0000000100129f2c node`node::NodeMainInstance::Run() [inlined] node::NodeMainInstance::Run(this=<unavailable>, exit_code=<unavailable>, env=0x000000013684c200) at node_main_instance.cc:106:7 [opt]
    frame #31: 0x0000000100129efc node`node::NodeMainInstance::Run(this=<unavailable>) at node_main_instance.cc:99:3 [opt]
    frame #32: 0x00000001000bf594 node`node::Start(int, char**) [inlined] node::StartInternal(argc=<unavailable>, argv=<unavailable>) at node.cc:1538:24 [opt]
    frame #33: 0x00000001000bf4ac node`node::Start(argc=<unavailable>, argv=<unavailable>) at node.cc:1545:27 [opt]
    frame #34: 0x000000018d6a2b4c dyld`start + 6000

@targos
Copy link
Member Author

targos commented Apr 29, 2025

Some tests with a log in BuiltinLoader::CompileAndCall:

$ out/Release/node
Compiling and calling internal/main/repl
[1]    15840 segmentation fault  out/Release/node

$ out/Release/node -p process.version
Compiling and calling internal/main/eval_string
[1]    15895 illegal hardware instruction  out/Release/node -p process.version

$ out/Release/node test/parallel/test-util-parse-env.js
Compiling and calling internal/main/run_main_module
[1]    15999 segmentation fault  out/Release/node test/parallel/test-util-parse-env.js

@aduh95 aduh95 added the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 29, 2025
targos and others added 14 commits April 30, 2025 08:27
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 13.7.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
PR-URL: nodejs#54077
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Joyee Cheung <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
PR-URL: nodejs#53134
Refs: nodejs#52809
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
PR-URL: nodejs#55014
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
It's causing linker errors with node.lib in node-gyp and potentially
breaks other 3rd party tools

PR-URL: nodejs#56238
Refs: nodejs#55784
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
PR-URL: nodejs#55014
Reviewed-By: Matteo Collina <[email protected]>
GCC emits warnings because of the trailing backslashes.
illumos pointers are VA48, can allocate from the top of the 64-bit range as well.
It introduces process hangs on some platforms because Node.js doesn't
tear down V8 correctly.
Disable it while we work on a solution.

Refs: nodejs#47297
Refs: https://bugs.chromium.org/p/v8/issues/detail?id=13902
PR-URL: nodejs#47450
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
targos and others added 25 commits April 30, 2025 08:27
Build Node.js with simdutf version from V8.

Refs: v8/v8@d629051
Refs: v8/v8@616c875
Refs: v8/v8@e3204d5
Refs: v8/v8@e8293d2
Refs: v8/v8@aeb2220
Refs: v8/v8@5621164
Co-authored-by: Abdirahim Musse <[email protected]>
The API was removed from V8.
New V8 version includes more information about regular expressions.
We depend on V8's version of simdutf now.
The location of some third-party code has changed.
`Isolate::AdjustAmountOfExternalAllocatedMemory` is deprecated.

Refs: v8/v8@7dc4c18
The `--expose_externalize_string` flag adds a new global.
As V8 is moving towards built-in CppHeap creation, change the
management so that the automatic CppHeap creation on Node.js's end
is also enforced at Isolate creation time.

1. If embedder uses NewIsolate(), either they use
  IsolateSettings::cpp_heap to specify a CppHeap that will be owned
  by V8, or if it's not configured, Node.js will create a CppHeap
  that will be owned by V8.
2. If the embedder uses SetIsolateUpForNode(),
  IsolateSettings::cpp_heap will be ignored (as V8 has deprecated
  attaching CppHeap post-isolate-creation). The embedders need to
  ensure that the v8::Isolate has a CppHeap attached while it's
  still used by Node.js, preferably using v8::CreateParams.

See https://issues.chromium.org/issues/42203693 for details. In
future version of V8, this CppHeap will be created by V8 if not
provided, and we can remove our own "if no CppHeap provided,
create one" code in NewIsolate().
The order of these calls is important. When the Isolate is disposed,
it may still post tasks to the platform, so it must still be registered
for the task runner to be found from the map. After the isolate is torn
down, we need to remove it from the map before we can free the address,
so that when another Isolate::Allocate() is called, that would not be
allocated to the same address and be registered on an existing map
entry.
simdutf's `atomic_binary_to_base64` requires `std::atomic_ref`.
`std::atomic_ref` is only available in LLVM 19, which is only available
in Xcode 16.3, which is only available on macOS 15.

Refs: llvm/llvm-project#76647
Refs: v8/v8@e3cddbe
It depends on `std::atomic_ref`, which is not available in Xcode 16.1.

Refs: v8/v8@6d6c1e6
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. dependencies Pull requests that update a dependency file. meta Issues and PRs related to the general management of the project. needs-ci PRs that need a full CI run. semver-major PRs that contain breaking changes and should be released in the next major version. v8 engine Issues and PRs related to the V8 dependency.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants