# HG changeset patch # User smonteith # Date 1554806854 -7200 # Node ID 4fa1fd8bc21e22cb4a970686c2f704c265784d07 # Parent 7fd299216e970e75b8245e8f9f3124d8f73fd74a 8222180: ZGC: ZForwarding::verify() failing when checking for duplicates Reviewed-by: pliden, eosterlund diff -r 7fd299216e97 -r 4fa1fd8bc21e 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"); }