| Index: src/heap/mark-compact.cc
|
| diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc
|
| index b257da8f672009acbafa1763f7ba63d9239dafc4..a526d8f5e496fad320b09bf0610a025d3c4c9a74 100644
|
| --- a/src/heap/mark-compact.cc
|
| +++ b/src/heap/mark-compact.cc
|
| @@ -3265,8 +3265,13 @@ void MarkCompactCollector::EvacuatePagesInParallel() {
|
| // happens upon moving (which we potentially didn't do).
|
| // - Leave the page in the list of pages of a space since we could not
|
| // fully evacuate it.
|
| + // - Mark them for rescanning for store buffer entries as we otherwise
|
| + // might have stale store buffer entries that become "valid" again
|
| + // after reusing the memory. Note that all existing store buffer
|
| + // entries of such pages are filtered before rescanning.
|
| DCHECK(p->IsEvacuationCandidate());
|
| p->SetFlag(Page::COMPACTION_WAS_ABORTED);
|
| + p->set_scan_on_scavenge(true);
|
| abandoned_pages++;
|
| break;
|
| case MemoryChunk::kCompactingFinalize:
|
| @@ -3678,9 +3683,6 @@ void MarkCompactCollector::EvacuateNewSpaceAndCandidates() {
|
|
|
| // First pass on aborted pages, fixing up all live objects.
|
| if (p->IsFlagSet(Page::COMPACTION_WAS_ABORTED)) {
|
| - // Clearing the evacuation candidate flag here has the effect of
|
| - // stopping recording of slots for it in the following pointer
|
| - // update phases.
|
| p->ClearEvacuationCandidate();
|
| VisitLiveObjects(p, &updating_visitor);
|
| }
|
|
|