Skip to content

Commit 20be5e0

Browse files
committed
8314846: Do not store Klass::_secondary_super_cache in CDS archive
Reviewed-by: stuefe, aph
1 parent 7e421ce commit 20be5e0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/hotspot/share/oops/klass.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,7 +726,6 @@ void Klass::metaspace_pointers_do(MetaspaceClosure* it) {
726726
}
727727

728728
it->push(&_name);
729-
it->push(&_secondary_super_cache);
730729
it->push(&_secondary_supers);
731730
for (int i = 0; i < _primary_super_limit; i++) {
732731
it->push(&_primary_supers[i]);
@@ -757,6 +756,11 @@ void Klass::remove_unshareable_info() {
757756
log_trace(cds, unshareable)("remove: %s", external_name());
758757
}
759758

759+
// _secondary_super_cache may be updated by an is_subtype_of() call
760+
// while ArchiveBuilder is copying metaspace objects. Let's reset it to
761+
// null and let it be repopulated at runtime.
762+
set_secondary_super_cache(nullptr);
763+
760764
set_subklass(nullptr);
761765
set_next_sibling(nullptr);
762766
set_next_link(nullptr);

0 commit comments

Comments
 (0)