comparison src/share/vm/classfile/verifier.cpp @ 1677:a5c9d63a187d

6964170: Verifier crashes Summary: Check if klassOop != NULL rather than klass_part != NULL Reviewed-by: kamg, never
author apangin
date Tue, 20 Jul 2010 08:41:42 -0700
parents 136b78722a08
children 7f0fdccac34f
comparison
equal deleted inserted replaced
1676:920aa833fd16 1677:a5c9d63a187d
1845 VerificationType type = current_frame->pop_stack( 1845 VerificationType type = current_frame->pop_stack(
1846 VerificationType::reference_check(), CHECK_VERIFY(this)); 1846 VerificationType::reference_check(), CHECK_VERIFY(this));
1847 if (type == VerificationType::uninitialized_this_type()) { 1847 if (type == VerificationType::uninitialized_this_type()) {
1848 // The method must be an <init> method of either this class, or one of its 1848 // The method must be an <init> method of either this class, or one of its
1849 // superclasses 1849 // superclasses
1850 klassOop oop = current_class()(); 1850 if (ref_class_type.name() != current_class()->name() &&
1851 Klass* klass = oop->klass_part(); 1851 !name_in_supers(ref_class_type.name(), current_class())) {
1852 while (klass != NULL && ref_class_type.name() != klass->name()) {
1853 klass = klass->super()->klass_part();
1854 }
1855 if (klass == NULL) {
1856 verify_error(bci, "Bad <init> method call"); 1852 verify_error(bci, "Bad <init> method call");
1857 return; 1853 return;
1858 } 1854 }
1859 current_frame->initialize_object(type, current_type()); 1855 current_frame->initialize_object(type, current_type());
1860 *this_uninit = true; 1856 *this_uninit = true;