Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7cb5c09

Browse filesBrowse files
danbevdanielleadams
authored andcommitted
deps: cherry-pick 9a49b22 from V8 upstream
Original commit message: Fix alloc/dealloc size mismatch for v8::BackingStore On newer compilers the {operator delete} with explicit {size_t} argument would be instantiated for {v8::BackingStore} and used in the destructor of {std::unique_ptr<v8::BackingStore>}. The {size_t} argument is wrong though, since the pointer actually points to a {v8::internal::BackingStore} object. The solution is to explicitly provide a {operator delete}, preventing an implicitly generated {size_t} operator. Bug:v8:11081 Change-Id: Iee0aa47a67f0e41000bea628942f7e3d70198b83 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2506712 Commit-Queue: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Camillo Bruni <cbruni@chromium.org> Cr-Commit-Position: refs/heads/master@{#70916} PR-URL: #35939 Fixes: #35669 Refs: v8/v8@9a49b22 Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Richard Lau <rlau@redhat.com> Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Gus Caplan <me@gus.host>
1 parent af2a560 commit 7cb5c09
Copy full SHA for 7cb5c09

File tree

Expand file treeCollapse file tree

2 files changed

+8
-1
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+8
-1
lines changed
Open diff view settings
Collapse file

‎common.gypi‎

Copy file name to clipboardExpand all lines: common.gypi
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636

3737
# Reset this number to 0 on major V8 upgrades.
3838
# Increment by one for each non-official patch applied to deps/v8.
39-
'v8_embedder_string': '-node.16',
39+
'v8_embedder_string': '-node.17',
4040

4141
##### V8 defaults for Node.js #####
4242

Collapse file

‎deps/v8/include/v8.h‎

Copy file name to clipboardExpand all lines: deps/v8/include/v8.h
+7Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5020,6 +5020,13 @@ class V8_EXPORT BackingStore : public v8::internal::BackingStoreBase {
50205020
*/
50215021
bool IsShared() const;
50225022

5023+
/**
5024+
* Prevent implicit instantiation of operator delete with size_t argument.
5025+
* The size_t argument would be incorrect because ptr points to the
5026+
* internal BackingStore object.
5027+
*/
5028+
void operator delete(void* ptr) { ::operator delete(ptr); }
5029+
50235030
/**
50245031
* Wrapper around ArrayBuffer::Allocator::Reallocate that preserves IsShared.
50255032
* Assumes that the backing_store was allocated by the ArrayBuffer allocator

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.