提交 e459d2a8 编写于 作者: H hseigel

8037157: Verify <init> call

Summary: Check for null method
Reviewed-by: coleenp, acorn, mschoene
上级 ce75f899
......@@ -2307,6 +2307,11 @@ void ClassVerifier::verify_invoke_init(
Method* m = InstanceKlass::cast(ref_klass)->uncached_lookup_method(
vmSymbols::object_initializer_name(),
cp->signature_ref_at(bcs->get_index_u2()));
if (m == NULL) {
verify_error(ErrorContext::bad_code(bci),
"Call to missing <init> method");
return;
}
instanceKlassHandle mh(THREAD, m->method_holder());
if (m->is_protected() && !mh->is_same_class_package(_klass())) {
bool assignable = current_type().is_assignable_from(
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册