Commit 6169cbf5 authored by Michael Lippautz's avatar Michael Lippautz Committed by V8 LUCI CQ

cppgc: Unpoison live object before compaction

The object may have been poisoned again between marking and compaction
through executing pre-finalizers or custom weakness handling of
related objects.

Bug: chromium:1220666, chromium:1056170
Change-Id: Ibba4b42852a2921640d6f3ded473521febb2114f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2966386Reviewed-by: 's avatarOmer Katz <omerkatz@chromium.org>
Commit-Queue: Michael Lippautz <mlippautz@chromium.org>
Auto-Submit: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#75189}
parent df912633
...@@ -362,6 +362,9 @@ void CompactPage(NormalPage* page, CompactionState& compaction_state) { ...@@ -362,6 +362,9 @@ void CompactPage(NormalPage* page, CompactionState& compaction_state) {
#if !defined(CPPGC_YOUNG_GENERATION) #if !defined(CPPGC_YOUNG_GENERATION)
header->Unmark(); header->Unmark();
#endif #endif
// Potentially unpoison the live object as well as it is the source of
// the copy.
ASAN_UNPOISON_MEMORY_REGION(header->ObjectStart(), header->ObjectSize());
compaction_state.RelocateObject(page, header_address, size); compaction_state.RelocateObject(page, header_address, size);
header_address += size; header_address += size;
} }
......
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