mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 07:14:30 +02:00
8218851: JVM crash in custom classloader stress test, JDK 12 & 13
Handle NULL and unloaded constraint class in loader constraint table, also cope with unloaded but not cleaned out klass in loader constraint entries. Reviewed-by: hseigel, huntch, stuefe
This commit is contained in:
parent
bec8431683
commit
d869d9287f
2 changed files with 6 additions and 3 deletions
|
@ -2114,7 +2114,7 @@ void SystemDictionary::check_constraints(unsigned int d_hash,
|
|||
ss.print(" wants to load %s %s.",
|
||||
k->external_kind(), k->external_name());
|
||||
Klass *existing_klass = constraints()->find_constrained_klass(name, class_loader);
|
||||
if (existing_klass->class_loader() != class_loader()) {
|
||||
if (existing_klass != NULL && existing_klass->class_loader() != class_loader()) {
|
||||
ss.print(" A different %s with the same name was previously loaded by %s. (%s)",
|
||||
existing_klass->external_kind(),
|
||||
existing_klass->class_loader_data()->loader_name_and_id(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue