Commit 387e2aca authored by Michael Lippautz's avatar Michael Lippautz Committed by Commit Bot

[heap] Use no barrier store forwarding objects during evacuation

This fixes a TSAN data race when writing the forwarding pointer in
MigrateObject and reading the object as a LayoutDescriptor when trying
to figure out the layout of another object in parallel.

BUG=chromium:701732

Change-Id: I1e291fa1afb42771244e1346680164de71c3a838
Reviewed-on: https://chromium-review.googlesource.com/455817Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#43826}
parent 3f6e7822
......@@ -1677,7 +1677,8 @@ class MarkCompactCollector::EvacuateVisitorBase
if (mode == kProfiled) {
heap_->OnMoveEvent(dst, src, size);
}
Memory::Address_at(src_addr) = dst_addr;
base::NoBarrier_Store(reinterpret_cast<base::AtomicWord*>(src_addr),
reinterpret_cast<base::AtomicWord>(dst_addr));
}
#ifdef VERIFY_HEAP
......
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