8213259: [AOT] AOTing java.base fails with "java.lang.AssertionError: no fingerprint for Ljdk/internal/event/Event"

Reviewed-by: iklam, kvn
This commit is contained in:
Dean Long 2018-11-26 22:49:57 -08:00
parent abf1e47f29
commit 787f8b320e
2 changed files with 7 additions and 5 deletions

View File

@ -5521,10 +5521,16 @@ InstanceKlass* ClassFileParser::create_instance_klass(bool changed_by_loadhook,
assert(_klass == ik, "invariant");
if (ik->should_store_fingerprint()) {
ik->store_fingerprint(_stream->compute_fingerprint());
}
ik->set_has_passed_fingerprint_check(false);
if (UseAOT && ik->supers_have_passed_fingerprint_checks()) {
uint64_t aot_fp = AOTLoader::get_saved_fingerprint(ik);
if (aot_fp != 0 && aot_fp == _stream->compute_fingerprint()) {
uint64_t fp = ik->has_stored_fingerprint() ? ik->get_stored_fingerprint() : _stream->compute_fingerprint();
if (aot_fp != 0 && aot_fp == fp) {
// This class matches with a class saved in an AOT library
ik->set_has_passed_fingerprint_check(true);
} else {

View File

@ -231,10 +231,6 @@ InstanceKlass* KlassFactory::create_from_stream(ClassFileStream* stream,
result->set_cached_class_file(cached_class_file);
}
if (result->should_store_fingerprint()) {
result->store_fingerprint(stream->compute_fingerprint());
}
JFR_ONLY(ON_KLASS_CREATION(result, parser, THREAD);)
#if INCLUDE_CDS