8222180: ZGC: ZForwarding::verify() failing when checking for duplicates
authorsmonteith
Tue, 09 Apr 2019 12:47:34 +0200
changeset 54487 4fa1fd8bc21e
parent 54486 7fd299216e97
child 54488 25199b48f34f
8222180: ZGC: ZForwarding::verify() failing when checking for duplicates Reviewed-by: pliden, eosterlund
src/hotspot/share/gc/z/zForwarding.cpp
--- a/src/hotspot/share/gc/z/zForwarding.cpp	Wed Apr 10 12:05:50 2019 +0200
+++ b/src/hotspot/share/gc/z/zForwarding.cpp	Tue Apr 09 12:47:34 2019 +0200
@@ -69,6 +69,11 @@
     // Check for duplicates
     for (ZForwardingCursor j = i + 1; j < _entries.length(); j++) {
       const ZForwardingEntry other = at(&j);
+      if (!other.populated()) {
+        // Skip empty entries
+        continue;
+      }
+
       guarantee(entry.from_index() != other.from_index(), "Duplicate from");
       guarantee(entry.to_offset() != other.to_offset(), "Duplicate to");
     }