OpenJDK / jdk / jdk
changeset 54487:4fa1fd8bc21e
8222180: ZGC: ZForwarding::verify() failing when checking for duplicates
Reviewed-by: pliden, eosterlund
author | smonteith |
---|---|
date | Tue, 09 Apr 2019 12:47:34 +0200 |
parents | 7fd299216e97 |
children | 25199b48f34f |
files | src/hotspot/share/gc/z/zForwarding.cpp |
diffstat | 1 files changed, 5 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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"); }