Index: src/heap/mark-compact.cc |
diff --git a/src/heap/mark-compact.cc b/src/heap/mark-compact.cc |
index f95b91ac4db80791a7cf2dc9ea408e9369a1286e..d431aa0dfa082eb791fb87d037e8865edb1f1155 100644 |
--- a/src/heap/mark-compact.cc |
+++ b/src/heap/mark-compact.cc |
@@ -4431,10 +4431,13 @@ void MarkCompactCollector::SweepSpaces() { |
// buffer entries are already filter out. We can just release the memory. |
heap()->FreeQueuedChunks(); |
- heap()->FreeDeadArrayBuffers(false); |
- |
EvacuateNewSpaceAndCandidates(); |
+ // NOTE: ArrayBuffers must be evacuated first, before freeing them. Otherwise |
Michael Lippautz
2015/09/01 08:30:06
Can you elaborate on this comment a bit more. Why
fedor.indutny
2015/09/01 08:50:08
I might not be understanding this correctly, but w
Michael Lippautz
2015/09/01 09:01:36
StaticMarkingVisitor is also registering live arra
|
+ // not yet discovered buffers for scavenge will have all of them, and they |
+ // will be erroneously freed. |
+ heap()->FreeDeadArrayBuffers(false); |
+ |
// Clear the marking state of live large objects. |
heap_->lo_space()->ClearMarkingStateOfLiveObjects(); |