v8/include
Michael Lippautz 8bdce52713 Reland "cppgc: Properly clear (Weak)Peristent and WeakMember pointers"
This is a reland of e0c1a349ea

The issue was passing SentinelPointer (== +1) through T*.

The fix is disabling cfi unrelated cast diagnostic for the bottlenecks
(Get()). This means that nullptr is treated the same as
kSentinelPointer.

The alternative would be a DCHECK that Get() does not return
kSentinelPointer and adjusting all Member and Persistent logic that
uses Get() to work on void*. This is quite intrusive as it involves
Swap(), heterogeneous assignments, comparisons, etc.

Original change's description:
> cppgc: Properly clear (Weak)Peristent and WeakMember pointers
>
> The CL addresses two issues with (Weak)Persistent and WeakMember:
> 1. (Weak)Persistent pointers are cleared on heap teardown. Before this
>    CL the pointers would contain stale values which could lead to UAF.
> 2. WeakPersistent and WeakMember are cleared using a combination of
>    internal clearing methods and mutable fields which avoids the use
>    of const_cast<>.
>
> Bug: chromium:1056170
> Change-Id: Ibf2b0f0856771b4f6906608cde13a6d43ebf81f3
> Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2248190
> Reviewed-by: Omer Katz <omerkatz@chromium.org>
> Reviewed-by: Anton Bikineev <bikineev@chromium.org>
> Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
> Cr-Commit-Position: refs/heads/master@{#68394}

Bug: chromium:1056170
Change-Id: I3d74b43464c2973df1956f51b1419d755dd9f519
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2250240
Reviewed-by: Omer Katz <omerkatz@chromium.org>
Reviewed-by: Anton Bikineev <bikineev@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68426}
2020-06-19 08:48:49 +00:00
..
cppgc Reland "cppgc: Properly clear (Weak)Peristent and WeakMember pointers" 2020-06-19 08:48:49 +00:00
libplatform Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
APIDesign.md Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
DEPS heap,cppgc: Update StackState enum values 2020-05-12 12:07:27 +00:00
js_protocol-1.2.json Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
js_protocol-1.3.json Move inspector protocol definitions to include/ 2019-06-18 17:59:36 +00:00
js_protocol.pdl [wasm] Rename anyref to externref, anyref flag/feature to reftypes 2020-06-09 17:51:04 +00:00
OWNERS [api] Add cbruni@ as api owner 2020-06-16 22:30:44 +00:00
v8-fast-api-calls.h [api] Avoid using v8::NewFromUtf8Lilteral if possible 2020-06-10 07:41:50 +00:00
v8-inspector-protocol.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-inspector.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-internal.h [sandbox][api] Introduce Internals::GetIsolateForHeapSandbox() 2020-05-13 09:42:00 +00:00
v8-platform.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-profiler.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-util.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-value-serializer-version.h Expose the ValueSerializer data format version as a compile-time constant. 2017-04-27 15:14:41 +00:00
v8-version-string.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-version.h Changed version number to 8.5 2020-05-15 11:04:29 +00:00
v8-wasm-trap-handler-posix.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8-wasm-trap-handler-win.h Fix LINT exceptions across the code base 2020-04-27 16:37:04 +00:00
v8.h [v8] Allow for 4GB TypedArrays 2020-06-19 06:52:21 +00:00
v8config.h Reland "cppgc: Properly clear (Weak)Peristent and WeakMember pointers" 2020-06-19 08:48:49 +00:00