8222180: ZGC: ZForwarding::verify() failing when checking for duplicates

Reviewed-by: pliden, eosterlund
This commit is contained in:
Stuart Monteith 2019-04-09 12:47:34 +02:00
parent 89a267ca46
commit 91c90755b5

View File

@ -69,6 +69,11 @@ void ZForwarding::verify() const {
// 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");
}