changeset 6752:360ea0726dd1

8037157: Verify <init> call Summary: Check for null method Reviewed-by: coleenp, acorn, mschoene
author hseigel
date Wed, 07 May 2014 19:34:48 +0400
parents 730557fa1e4c
children f74993a364c2
files src/share/vm/classfile/verifier.cpp
diffstat 1 files changed, 5 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/classfile/verifier.cpp	Mon Jul 14 13:15:06 2014 +0400
+++ b/src/share/vm/classfile/verifier.cpp	Wed May 07 19:34:48 2014 +0400
@@ -2311,6 +2311,11 @@
         vmSymbols::object_initializer_name(),
         cp->signature_ref_at(bcs->get_index_u2()),
         Klass::normal);
+      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(