8004967: Default method cause VerifyError: Illegal use of nonvirtual

Mon, 28 Jan 2013 10:55:30 -0500

author
acorn
date
Mon, 28 Jan 2013 10:55:30 -0500
changeset 4499
815957d0203e
parent 4496
cf8470eaf7e5
child 4500
7885e162c30f

8004967: Default method cause VerifyError: Illegal use of nonvirtual
Summary: Recognize VM generated method in old verifier
Reviewed-by: acorn, coleenp
Contributed-by: bharadwaj.yadavelli@oracle.com

make/bsd/makefiles/mapfile-vers-debug file | annotate | diff | comparison | revisions
make/bsd/makefiles/mapfile-vers-product file | annotate | diff | comparison | revisions
make/linux/makefiles/mapfile-vers-debug file | annotate | diff | comparison | revisions
make/linux/makefiles/mapfile-vers-product file | annotate | diff | comparison | revisions
make/solaris/makefiles/mapfile-vers file | annotate | diff | comparison | revisions
src/share/vm/prims/jvm.cpp file | annotate | diff | comparison | revisions
src/share/vm/prims/jvm.h file | annotate | diff | comparison | revisions
     1.1 --- a/make/bsd/makefiles/mapfile-vers-debug	Sun Jan 27 21:58:34 2013 -0500
     1.2 +++ b/make/bsd/makefiles/mapfile-vers-debug	Mon Jan 28 10:55:30 2013 -0500
     1.3 @@ -188,6 +188,7 @@
     1.4                  JVM_IsSilentCompiler;
     1.5                  JVM_IsSupportedJNIVersion;
     1.6                  JVM_IsThreadAlive;
     1.7 +                JVM_IsVMGeneratedMethodIx;
     1.8                  JVM_LatestUserDefinedLoader;
     1.9                  JVM_Listen;
    1.10                  JVM_LoadClass0;
     2.1 --- a/make/bsd/makefiles/mapfile-vers-product	Sun Jan 27 21:58:34 2013 -0500
     2.2 +++ b/make/bsd/makefiles/mapfile-vers-product	Mon Jan 28 10:55:30 2013 -0500
     2.3 @@ -188,6 +188,7 @@
     2.4                  JVM_IsSilentCompiler;
     2.5                  JVM_IsSupportedJNIVersion;
     2.6                  JVM_IsThreadAlive;
     2.7 +                JVM_IsVMGeneratedMethodIx;
     2.8                  JVM_LatestUserDefinedLoader;
     2.9                  JVM_Listen;
    2.10                  JVM_LoadClass0;
     3.1 --- a/make/linux/makefiles/mapfile-vers-debug	Sun Jan 27 21:58:34 2013 -0500
     3.2 +++ b/make/linux/makefiles/mapfile-vers-debug	Mon Jan 28 10:55:30 2013 -0500
     3.3 @@ -184,6 +184,7 @@
     3.4                  JVM_IsSilentCompiler;
     3.5                  JVM_IsSupportedJNIVersion;
     3.6                  JVM_IsThreadAlive;
     3.7 +                JVM_IsVMGeneratedMethodIx;
     3.8                  JVM_LatestUserDefinedLoader;
     3.9                  JVM_Listen;
    3.10                  JVM_LoadClass0;
     4.1 --- a/make/linux/makefiles/mapfile-vers-product	Sun Jan 27 21:58:34 2013 -0500
     4.2 +++ b/make/linux/makefiles/mapfile-vers-product	Mon Jan 28 10:55:30 2013 -0500
     4.3 @@ -184,6 +184,7 @@
     4.4                  JVM_IsSilentCompiler;
     4.5                  JVM_IsSupportedJNIVersion;
     4.6                  JVM_IsThreadAlive;
     4.7 +                JVM_IsVMGeneratedMethodIx;
     4.8                  JVM_LatestUserDefinedLoader;
     4.9                  JVM_Listen;
    4.10                  JVM_LoadClass0;
     5.1 --- a/make/solaris/makefiles/mapfile-vers	Sun Jan 27 21:58:34 2013 -0500
     5.2 +++ b/make/solaris/makefiles/mapfile-vers	Mon Jan 28 10:55:30 2013 -0500
     5.3 @@ -184,6 +184,7 @@
     5.4                  JVM_IsSilentCompiler;
     5.5                  JVM_IsSupportedJNIVersion;
     5.6                  JVM_IsThreadAlive;
     5.7 +                JVM_IsVMGeneratedMethodIx;
     5.8                  JVM_LatestUserDefinedLoader;
     5.9                  JVM_Listen;
    5.10                  JVM_LoadClass0;
     6.1 --- a/src/share/vm/prims/jvm.cpp	Sun Jan 27 21:58:34 2013 -0500
     6.2 +++ b/src/share/vm/prims/jvm.cpp	Mon Jan 28 10:55:30 2013 -0500
     6.3 @@ -2302,6 +2302,15 @@
     6.4  JVM_END
     6.5  
     6.6  
     6.7 +JVM_QUICK_ENTRY(jboolean, JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cls, int method_index))
     6.8 +  JVMWrapper("JVM_IsVMGeneratedMethodIx");
     6.9 +  ResourceMark rm(THREAD);
    6.10 +  Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
    6.11 +  k = JvmtiThreadState::class_to_verify_considering_redefinition(k, thread);
    6.12 +  Method* method = InstanceKlass::cast(k)->methods()->at(method_index);
    6.13 +  return method->is_overpass();
    6.14 +JVM_END
    6.15 +
    6.16  JVM_ENTRY(const char*, JVM_GetMethodIxNameUTF(JNIEnv *env, jclass cls, jint method_index))
    6.17    JVMWrapper("JVM_GetMethodIxIxUTF");
    6.18    Klass* k = java_lang_Class::as_Klass(JNIHandles::resolve_non_null(cls));
     7.1 --- a/src/share/vm/prims/jvm.h	Sun Jan 27 21:58:34 2013 -0500
     7.2 +++ b/src/share/vm/prims/jvm.h	Mon Jan 28 10:55:30 2013 -0500
     7.3 @@ -860,6 +860,13 @@
     7.4  JVM_IsConstructorIx(JNIEnv *env, jclass cb, int index);
     7.5  
     7.6  /*
     7.7 + * Is the given method generated by the VM.
     7.8 + * The method is identified by method_index.
     7.9 + */
    7.10 +JNIEXPORT jboolean JNICALL
    7.11 +JVM_IsVMGeneratedMethodIx(JNIEnv *env, jclass cb, int index);
    7.12 +
    7.13 +/*
    7.14   * Returns the name of a given method in UTF format.
    7.15   * The result remains valid until JVM_ReleaseUTF is called.
    7.16   *

mercurial