Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index 8a32ba8bda28d08c91b6876a3c4d9ed038fad9f6..8232dd5b0e0b6d819a3adfae3a2ecc99c01489d3 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -3353,6 +3353,12 @@ bool MarkCompactCollector::EvacuateLiveObjectsFromPage( |
HeapObject* target_object = nullptr; |
AllocationResult allocation = target_space->AllocateRaw(size, alignment); |
if (!allocation.To(&target_object)) { |
+ // We need to abort compaction for this page. Make sure that we reset |
+ // the mark bits for objects that have already been migrated. |
+ if (i > 0) { |
+ p->markbits()->ClearRange(p->AddressToMarkbitIndex(p->area_start()), |
+ p->AddressToMarkbitIndex(object_addr)); |
+ } |
return false; |
} |