mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
6989076: JVM crashes in klassItable::initialize_itable_for_interface
Hotspot should check protection attribute besides the name and signature of the method when constructing vtable. Reviewed-by: dcubed
This commit is contained in:
parent
03a1ccfef2
commit
d344b51209
1 changed files with 9 additions and 6 deletions
|
@ -518,18 +518,21 @@ bool klassVtable::is_miranda_entry_at(int i) {
|
||||||
bool klassVtable::is_miranda(methodOop m, objArrayOop class_methods, klassOop super) {
|
bool klassVtable::is_miranda(methodOop m, objArrayOop class_methods, klassOop super) {
|
||||||
symbolOop name = m->name();
|
symbolOop name = m->name();
|
||||||
symbolOop signature = m->signature();
|
symbolOop signature = m->signature();
|
||||||
|
|
||||||
if (instanceKlass::find_method(class_methods, name, signature) == NULL) {
|
if (instanceKlass::find_method(class_methods, name, signature) == NULL) {
|
||||||
// did not find it in the method table of the current class
|
// did not find it in the method table of the current class
|
||||||
if (super == NULL) {
|
if (super == NULL) {
|
||||||
// super doesn't exist
|
// super doesn't exist
|
||||||
return true;
|
return true;
|
||||||
} else {
|
}
|
||||||
if (instanceKlass::cast(super)->lookup_method(name, signature) == NULL) {
|
|
||||||
// super class hierarchy does not implement it
|
methodOop mo = instanceKlass::cast(super)->lookup_method(name, signature);
|
||||||
return true;
|
if (mo == NULL || mo->access_flags().is_private() ) {
|
||||||
}
|
// super class hierarchy does not implement it or protection is different
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue