mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 06:45:07 +02:00
6964170: Verifier crashes
Check if klassOop != NULL rather than klass_part != NULL Reviewed-by: kamg, never
This commit is contained in:
parent
8ce591cea8
commit
3888d500b9
2 changed files with 6 additions and 8 deletions
|
@ -1847,12 +1847,8 @@ void ClassVerifier::verify_invoke_init(
|
|||
if (type == VerificationType::uninitialized_this_type()) {
|
||||
// The method must be an <init> method of either this class, or one of its
|
||||
// superclasses
|
||||
klassOop oop = current_class()();
|
||||
Klass* klass = oop->klass_part();
|
||||
while (klass != NULL && ref_class_type.name() != klass->name()) {
|
||||
klass = klass->super()->klass_part();
|
||||
}
|
||||
if (klass == NULL) {
|
||||
if (ref_class_type.name() != current_class()->name() &&
|
||||
!name_in_supers(ref_class_type.name(), current_class())) {
|
||||
verify_error(bci, "Bad <init> method call");
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue