mirror of
https://github.com/openjdk/jdk.git
synced 2026-01-28 03:58:21 +00:00
8374343: Fix SIGSEGV when lib/modules is unreadable
This commit is contained in:
parent
d34ef196c2
commit
f3da8c8267
@ -965,7 +965,12 @@ bool AOTClassLocationConfig::validate(const char* cache_filename, bool has_aot_l
|
||||
|
||||
log_locations(cache_filename, /*is_write=*/false);
|
||||
|
||||
const char* jrt = ClassLoader::get_jrt_entry()->name();
|
||||
ClassPathEntry* jrt_entry = ClassLoader::get_jrt_entry();
|
||||
if (jrt_entry == nullptr) {
|
||||
log_warning(class, path)("Runtime image (modules) is unreadable or missing - validation failed");
|
||||
return false;
|
||||
}
|
||||
const char* jrt = jrt_entry->name();
|
||||
log_info(class, path)("Checking [0] (modules image)");
|
||||
bool success = class_location_at(0)->check(jrt, has_aot_linked_classes);
|
||||
log_info(class, path)("Modules image %s validation: %s", jrt, success ? "passed" : "failed");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user