mirror of
https://github.com/openjdk/jdk.git
synced 2026-05-29 23:02:28 +00:00
8357525: Default CDS archive becomes non-deterministic after JDK-8305895
Reviewed-by: shade, coleenp
This commit is contained in:
parent
dede3532f7
commit
2ec6ab347a
@ -810,10 +810,18 @@ void Klass::remove_unshareable_info() {
|
||||
set_class_loader_data(nullptr);
|
||||
set_is_shared();
|
||||
|
||||
// FIXME: validation in Klass::hash_secondary_supers() may fail for shared klasses.
|
||||
// Even though the bitmaps always match, the canonical order of elements in the table
|
||||
// is not guaranteed to stay the same (see tie breaker during Robin Hood hashing in Klass::hash_insert).
|
||||
//assert(compute_secondary_supers_bitmap(secondary_supers()) == _secondary_supers_bitmap, "broken table");
|
||||
if (CDSConfig::is_dumping_classic_static_archive()) {
|
||||
// "Classic" static archives are required to have deterministic contents.
|
||||
// The elements in _secondary_supers are addresses in the ArchiveBuilder
|
||||
// output buffer, so they should have deterministic values. If we rehash
|
||||
// _secondary_supers, its elements will appear in a deterministic order.
|
||||
//
|
||||
// Note that the bitmap is guaranteed to be deterministic, regardless of the
|
||||
// actual addresses of the elements in _secondary_supers. So rehashing shouldn't
|
||||
// change it.
|
||||
uintx bitmap = hash_secondary_supers(secondary_supers(), true);
|
||||
assert(bitmap == _secondary_supers_bitmap, "bitmap should not be changed due to rehashing");
|
||||
}
|
||||
}
|
||||
|
||||
void Klass::remove_java_mirror() {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user