Bug 1638764 - Make the incremental marking validator check that all chunks are found in its map r=sfink
authorJon Coppeard <jcoppeard@mozilla.com>
Wed, 24 Jun 2020 14:04:39 +0000
changeset 537196 27a7ed0c155ae353d86865c00c9b959edd0d2cf7
parent 537195 4ae7220cf7d80b3df42e10ebb32ca2ddbcf94ed7
child 537197 bb63fec29274aee35899e8897e3ebe73845bd566
push id119838
push userjcoppeard@mozilla.com
push dateWed, 24 Jun 2020 14:33:09 +0000
treeherderautoland@27a7ed0c155a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssfink
bugs1638764
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1638764 - Make the incremental marking validator check that all chunks are found in its map r=sfink I still don't know why this is happening, but this should make the problem a release mode assertion failure rather than an illegal memory access. Differential Revision: https://phabricator.services.mozilla.com/D80866
js/src/gc/Verifier.cpp
--- a/js/src/gc/Verifier.cpp
+++ b/js/src/gc/Verifier.cpp
@@ -628,17 +628,19 @@ void js::gc::MarkingValidator::nonIncrem
   }
 
   /* Take a copy of the non-incremental mark state and restore the original. */
   {
     AutoLockGC lock(gc);
     for (auto chunk = gc->allNonEmptyChunks(lock); !chunk.done();
          chunk.next()) {
       ChunkBitmap* bitmap = &chunk->bitmap;
-      ChunkBitmap* entry = map.lookup(chunk)->value().get();
+      auto ptr = map.lookup(chunk);
+      MOZ_RELEASE_ASSERT(ptr, "Chunk not found in map");
+      ChunkBitmap* entry = ptr->value().get();
       std::swap(*entry, *bitmap);
     }
   }
 
   for (GCZonesIter zone(gc); !zone.done(); zone.next()) {
     WeakMapBase::unmarkZone(zone);
     AutoEnterOOMUnsafeRegion oomUnsafe;
     if (!zone->gcWeakKeys().clear()) {