-
-
Notifications
You must be signed in to change notification settings - Fork 31.6k
deps: update V8 to 10.2 #42115
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
deps: update V8 to 10.2 #42115
Conversation
Review requested:
|
New Windows failure, as usual 😞
|
I created a V8 issue: https://bugs.chromium.org/p/v8/issues/detail?id=12661 |
Anyone knows how we could work around the Windows error? |
Untested, but does this diff work? diff --git a/include/cppgc/heap.h b/include/cppgc/heap.h
index 136c4fb44d..e677bb2845 100644
--- a/include/cppgc/heap.h
+++ b/include/cppgc/heap.h
@@ -111,13 +111,6 @@ class V8_EXPORT Heap {
* heap through `Heap::Create()`.
*/
struct HeapOptions {
- /**
- * Creates reasonable defaults for instantiating a Heap.
- *
- * \returns the HeapOptions that can be passed to `Heap::Create()`.
- */
- static HeapOptions Default() { return {}; }
-
/**
* Custom spaces added to heap are required to have indices forming a
* numbered sequence starting at 0, i.e., their `kSpaceIndex` must
@@ -161,7 +154,7 @@ class V8_EXPORT Heap {
*/
static std::unique_ptr<Heap> Create(
std::shared_ptr<Platform> platform,
- HeapOptions options = HeapOptions::Default());
+ HeapOptions options = {});
virtual ~Heap() = default;
I think the compiler is allowed to fail here because it's not required to apply copy elision in Default(). |
Let's try it! |
@bnoordhuis GCC doesn't like it:
|
Also, MSVC still gives the same error as before, I think. |
Maybe msvc is tripping over its own auto-generated copy constructors. Does explicitly deleting them help? diff --git a/include/cppgc/heap.h b/include/cppgc/heap.h
index 136c4fb44d..23c1756abb 100644
--- a/include/cppgc/heap.h
+++ b/include/cppgc/heap.h
@@ -150,6 +150,9 @@ class V8_EXPORT Heap {
* GC scheduler follows.
*/
ResourceConstraints resource_constraints;
+
+ HeapOptions(const HeapOptions&) = delete;
+ void operator=(const HeapOptions&) = delete;
};
/**
diff --git a/include/v8-cppgc.h b/include/v8-cppgc.h
index af21054e2b..7d11c245c7 100644
--- a/include/v8-cppgc.h
+++ b/include/v8-cppgc.h
@@ -80,6 +80,9 @@ struct WrapperDescriptor final {
struct V8_EXPORT CppHeapCreateParams {
std::vector<std::unique_ptr<cppgc::CustomSpaceBase>> custom_spaces;
WrapperDescriptor wrapper_descriptor;
+
+ CppHeapCreateParams(const CppHeapCreateParams&) = delete;
+ void operator=(const CppHeapCreateParams&) = delete;
};
/** The gcc error can probably be fixed by writing |
That error is gone, thanks! Now we have:
I going to investigate on my machine, because 32dd0d7#diff-33f548d8c76be9f5052a98ec2fff58be393ac5b920e0c997227bf17cbb2deaa0R169 was supposed to take care of it. |
Also:
|
The problem is the path fixing logic from node/tools/gyp/pylib/gyp/generator/msvs.py Line 431 in d50efc6
|
Same error about the deleted function on windows:
|
FYI: #42192 ... tl;dr 9.9 updates the value serialization format such that any version of Node.js using < 9.9 won't be able to deserialize anything serialized with >= 9.9. |
@gengjiawen Do you have any idea about a magical workaround? |
I should have time on weekends. But I need a windows vm if this not fixed this at that time. |
@targos Please try, I have verified on vs2022. I will upstream it later. diff --git a/deps/v8/include/v8-cppgc.h b/deps/v8/include/v8-cppgc.h
index af21054e2b..43be774632 100644
--- a/deps/v8/include/v8-cppgc.h
+++ b/deps/v8/include/v8-cppgc.h
@@ -78,6 +78,9 @@ struct WrapperDescriptor final {
};
struct V8_EXPORT CppHeapCreateParams {
+ CppHeapCreateParams(const CppHeapCreateParams&) = delete;
+ CppHeapCreateParams& operator=(const CppHeapCreateParams&) = delete;
+
std::vector<std::unique_ptr<cppgc::CustomSpaceBase>> custom_spaces;
WrapperDescriptor wrapper_descriptor;
} |
I opened nodejs/gyp-next#143 for the GYP fix. |
They are probably not paths, and V8 uses an argument like that, so the fix is needed in Node.js Refs: nodejs/node#42115
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: #42532 Refs: #42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message: [ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756} Refs: v8/v8@87ce4f5
Original commit message: [ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756} Refs: v8/v8@87ce4f5
Original commit message: [ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756} Refs: v8/v8@87ce4f5
Original commit message: [ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: #42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756} Refs: v8/v8@87ce4f5 PR-URL: #42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Original commit message: [ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756} Refs: v8/v8@87ce4f5 PR-URL: nodejs#42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: nodejs#42532 Refs: nodejs#42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Original commit message: [ic] use CSA_DCHECK in CodeStubAssembler::SharedValueBarrier Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756} Refs: v8/v8@87ce4f5 PR-URL: nodejs#42657 Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michael Dawson <midawson@redhat.com>
This seems to break diff --git a/deps/v8/src/codegen/register.h b/deps/v8/src/codegen/register.h
index e36e4d1e9a..ef5f6dfcf7 100644
--- a/deps/v8/src/codegen/register.h
+++ b/deps/v8/src/codegen/register.h
@@ -26,7 +26,8 @@ template <typename... RegTypes,
std::conjunction_v<std::is_same<Register, RegTypes>...> ||
std::conjunction_v<std::is_same<DoubleRegister, RegTypes>...>>>
inline constexpr bool AreAliased(RegTypes... regs) {
- int num_different_regs = RegListBase{regs...}.Count();
+ using FirstRegType = std::tuple_element_t<0, std::tuple<RegTypes...>>;
+ int num_different_regs = RegListBase<FirstRegType>{regs...}.Count();
int num_given_regs = (... + (regs.is_valid() ? 1 : 0));
return num_different_regs < num_given_regs;
} |
Since the code is generated unconditionally, using a DCHECK to check that shared RO heap is enabled breaks builds with v8_enable_shared_ro_heap set to false, this patch turns that into a CSA_DCHECK so it only crashes when V8 actually attempts to store into a shared struct while the RO heap isn't shared at run time. Refs: nodejs/node#42115 Bug: v8:12547 Change-Id: I30d9a02b98a0b647097125c0a9d141e40d6348cc Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3561598 Reviewed-by: Shu-yu Guo <syg@chromium.org> Reviewed-by: Leszek Swirski <leszeks@chromium.org> Commit-Queue: Joyee Cheung <joyee@igalia.com> Cr-Commit-Position: refs/heads/main@{#79756}
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: #42532 Refs: #42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: #42532 Refs: #42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: #42532 Refs: #42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: #42532 Refs: #42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Since v8 10.1 v8::External::New DCHECKs that the data passed into it cannot be a nullptr because that's not serializable as external references. This updates the test to pass a dummy data pointer to the call - which does not matter for the test since we only care about whether the finalizer is called. Refs: https://chromium-review.googlesource.com/c/v8/v8/+/3513234 PR-URL: nodejs/node#42532 Refs: nodejs/node#42115 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
ETA: Tue, Mar 1, 2022