Commit d6b4d229 authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

cppgc: Add missing in construction check to ephemeron processing

We need to check whether ephemeron key is fully constructed to sync the
mark bit before checking it.

Bug: chromium:1246730
Change-Id: I3ba69898202c1df94833a0bc7442b2be0e61694e
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3143993Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#76678}
parent 7c67bc19
......@@ -289,7 +289,9 @@ void MarkingStateBase::ProcessEphemeron(const void* key, const void* value,
// Filter out already marked keys. The write barrier for WeakMember
// ensures that any newly set value after this point is kept alive and does
// not require the callback.
if (HeapObjectHeader::FromObject(key).IsMarked<AccessMode::kAtomic>()) {
if (!HeapObjectHeader::FromObject(key)
.IsInConstruction<AccessMode::kAtomic>() &&
HeapObjectHeader::FromObject(key).IsMarked<AccessMode::kAtomic>()) {
if (value_desc.base_object_payload) {
MarkAndPush(value_desc.base_object_payload, value_desc);
} else {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment