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

[help wanted] deps: update V8 to 13.6 #57753

Draft
wants to merge 35 commits into
base: main
Choose a base branch
from
Draft

[help wanted] deps: update V8 to 13.6 #57753

wants to merge 35 commits into from

Conversation

targos
Copy link
Member

@targos targos commented Apr 5, 2025

I hope it can replace #57114

Notable changes:

@nodejs/v8-update @nodejs/tsc

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/gyp
  • @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 5, 2025
@targos
Copy link
Member Author

targos commented Apr 5, 2025

@joyeecheung (or maybe someone else from @nodejs/cpp-reviewers) Can you help finalizing 05eab64 ?
I ported all the referenced PRs from #52718 but there is an issue with node_mksnapshot:

[1903/1919] ACTION node: node_mksnapshot_9b7a2d2290b02e76d66661df74749f56
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

  #  /Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot[39108]: IsolatePlatformDelegate *node::NodePlatform::ForIsolate(Isolate *) at ../../src/node_platform.cc:530
  #  Assertion failed: (data.first) != nullptr

----- Native stack trace -----

 1: 0x104f36d9c node::DumpNativeBacktrace(__sFILE*) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 2: 0x1050a0e5c node::Assert(node::AssertionInfo const&) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 3: 0x10519b9a4 node::NodePlatform::ForIsolate(v8::Isolate*) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 4: 0x10519bcec node::NodePlatform::GetForegroundTaskRunner(v8::Isolate*, v8::TaskPriority) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 5: 0x106ffd978 cppgc::internal::Sweeper::SweeperImpl::Start(cppgc::internal::SweepingConfig) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 6: 0x106feda98 cppgc::internal::HeapBase::Terminate() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 7: 0x1060c52d0 v8::internal::CppHeap::~CppHeap() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 8: 0x1060c5368 non-virtual thunk to v8::internal::CppHeap::~CppHeap() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
 9: 0x10613ba18 v8::internal::Heap::TearDown() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
10: 0x1060382d8 v8::internal::Isolate::Deinit() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
11: 0x106037dbc v8::internal::Isolate::Delete(v8::internal::Isolate*) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
12: 0x105325a74 node::RAIIIsolateWithoutEntering::~RAIIIsolateWithoutEntering() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
13: 0x105325aa8 node::RAIIIsolateWithoutEntering::~RAIIIsolateWithoutEntering() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
14: 0x105325b60 node::RAIIIsolate::~RAIIIsolate() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
15: 0x105325b8c node::RAIIIsolate::~RAIIIsolate() [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
16: 0x1051fdf20 node::BuildCodeCacheFromSnapshot(node::SnapshotData*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
17: 0x1051fe2c4 node::SnapshotBuilder::Generate(node::SnapshotData*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::optional<std::__1::basic_string_view<char, std::__1::char_traits<char>>>, node::SnapshotConfig const&) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
18: 0x1051fedac node::SnapshotBuilder::GenerateAsSource(char const*, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, std::__1::vector<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::allocator<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>> const&, node::SnapshotConfig const&, bool) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
19: 0x104e2c4bc BuildSnapshot(int, char**) [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
20: 0x104e2c220 main [/Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot]
21: 0x1943c6b4c start [/usr/lib/dyld]
/bin/sh: line 1: 39108 Abort trap: 6           /Users/mzasso/git/nodejs/v8-next-update/out/Debug/node_mksnapshot /Users/mzasso/git/nodejs/v8-next-update/out/Debug/gen/node_snapshot.cc

@targos targos marked this pull request as draft April 5, 2025 09:11
@targos targos added the semver-major PRs that contain breaking changes and should be released in the next major version. label Apr 5, 2025
targos and others added 20 commits April 6, 2025 13:13
Major V8 updates are usually API/ABI incompatible with previous
versions. This commit adapts NODE_MODULE_VERSION for V8 13.6.

Refs: https://github.com/nodejs/CTC/blob/master/meetings/2016-09-28.md
dllexport introduces issues when compiling with MSVC.

PR-URL: nodejs#47251
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
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 <rlau@redhat.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
PR-URL: nodejs#54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Co-Authored-By: Michaël Zasso <targos@protonmail.com>
PR-URL: nodejs#53134
Refs: nodejs#52809
Reviewed-By: Yagiz Nizipli <yagiz.nizipli@sentry.io>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
PR-URL: nodejs#55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
It's causing compiler errors with some classes on Xcode 11
and the attribute should have no runtime effect.

PR-URL: nodejs#54077
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: nodejs#55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
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 <targos@protonmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
PR-URL: nodejs#55014
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
GCC emits warnings because of the trailing backslashes.
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 <abdirahim.musse@ibm.com>
@targos targos changed the title deps: update V8 to 13.6 [help wanted] deps: update V8 to 13.6 Apr 6, 2025
@targos targos added the help wanted Issues that need assistance from volunteers or PRs that need help to proceed. label Apr 6, 2025
@danmcd
Copy link

danmcd commented Apr 6, 2025

I will run a build on illumos/SmartOS. If you fixed the JSDispatchEntry assumptions about high-16-bits in kFreeEntryTag that'll help out a lot.

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. help wanted Issues that need assistance from volunteers or PRs that need help to proceed. 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.

5 participants