Commit ae44450b authored by Leon Bettscheider's avatar Leon Bettscheider Committed by V8 LUCI CQ

[heap] Fix data race in YoungGenerationMarkingVisitorBase

This CL fixes a data race that was found using TSAN.

Bug: v8:13012
Change-Id: Ic29620edce116effea097a9f1d58532ba93b2224
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3857424Reviewed-by: 's avatarDominik Inführ <dinfuehr@chromium.org>
Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Leon Bettscheider <bettscheider@google.com>
Cr-Commit-Position: refs/heads/main@{#82738}
parent f8aebf80
......@@ -602,7 +602,8 @@ template <typename TSlot>
void YoungGenerationMarkingVisitorBase<
ConcreteVisitor, MarkingState>::VisitPointerImpl(HeapObject host,
TSlot slot) {
typename TSlot::TObject target = *slot;
typename TSlot::TObject target =
slot.Relaxed_Load(ObjectVisitorWithCageBases::cage_base());
if (Heap::InYoungGeneration(target)) {
// Treat weak references as strong.
HeapObject target_object = target.GetHeapObject();
......
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