src/hotspot/share/gc/z/zForwarding.cpp
changeset 54487 4fa1fd8bc21e
parent 54330 69e80a82db9a
child 58237 944b58cbaf93
--- 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");
     }