--- a/src/hotspot/share/gc/shared/weakProcessor.cpp Tue Aug 27 16:35:50 2019 +0200
+++ b/src/hotspot/share/gc/shared/weakProcessor.cpp Tue Aug 27 19:22:58 2019 +0200
@@ -116,10 +116,10 @@
StorageState* cur_state = _storage_states;
OopStorageSet::Iterator it = OopStorageSet::weak_iterator();
for ( ; !it.is_end(); ++it, ++cur_state) {
- assert((cur_state - _storage_states) < storage_count, "invariant");
+ assert(pointer_delta(cur_state, _storage_states, sizeof(StorageState)) < storage_count, "invariant");
new (cur_state) StorageState(*it, _nworkers);
}
- assert((cur_state - _storage_states) == storage_count, "invariant");
+ assert(pointer_delta(cur_state, _storage_states, sizeof(StorageState)) == storage_count, "invariant");
StringTable::reset_dead_counter();
ResolvedMethodTable::reset_dead_counter();
}