changeset 14079:1915d0702dbf

Fix for Class.forName([Qtype;)
author dsimms
date Thu, 24 Nov 2016 11:25:43 +0100
parents 780c8eba356a
children c7c97756db18
files src/java.base/share/native/include/classfile_constants.h src/java.base/share/native/libverify/check_code.c src/java.base/share/native/libverify/check_format.c
diffstat 3 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/native/include/classfile_constants.h	Fri Aug 26 17:49:17 2016 -0400
+++ b/src/java.base/share/native/include/classfile_constants.h	Thu Nov 24 11:25:43 2016 +0100
@@ -124,6 +124,7 @@
     JVM_SIGNATURE_BYTE          = 'B',
     JVM_SIGNATURE_CHAR          = 'C',
     JVM_SIGNATURE_CLASS         = 'L',
+    JVM_SIGNATURE_VALUE_CLASS   = 'Q',
     JVM_SIGNATURE_ENDCLASS      = ';',
     JVM_SIGNATURE_ENUM          = 'E',
     JVM_SIGNATURE_FLOAT         = 'F',
--- a/src/java.base/share/native/libverify/check_code.c	Fri Aug 26 17:49:17 2016 -0400
+++ b/src/java.base/share/native/libverify/check_code.c	Thu Nov 24 11:25:43 2016 +0100
@@ -3789,7 +3789,8 @@
                 array_depth++;
                 continue;       /* only time we ever do the loop > 1 */
 
-            case JVM_SIGNATURE_CLASS: {
+            case JVM_SIGNATURE_CLASS:
+            case JVM_SIGNATURE_VALUE_CLASS: {
                 char buffer_space[256];
                 char *buffer = buffer_space;
                 char *finish = strchr(p, JVM_SIGNATURE_ENDCLASS);
@@ -4171,6 +4172,7 @@
             args_size += 1;
             break;
           case JVM_SIGNATURE_CLASS:
+          case JVM_SIGNATURE_VALUE_CLASS:
             args_size += 1;
             while (*p != JVM_SIGNATURE_ENDCLASS) p++;
             break;
@@ -4178,7 +4180,7 @@
             args_size += 1;
             while ((*p == JVM_SIGNATURE_ARRAY)) p++;
             /* If an array of classes, skip over class name, too. */
-            if (*p == JVM_SIGNATURE_CLASS) {
+            if (*p == JVM_SIGNATURE_CLASS || *p == JVM_SIGNATURE_VALUE_CLASS) {
                 while (*p != JVM_SIGNATURE_ENDCLASS)
                   p++;
             }
--- a/src/java.base/share/native/libverify/check_format.c	Fri Aug 26 17:49:17 2016 -0400
+++ b/src/java.base/share/native/libverify/check_format.c	Thu Nov 24 11:25:43 2016 +0100
@@ -191,7 +191,8 @@
             case JVM_SIGNATURE_DOUBLE:
                 return name + 1;
 
-            case JVM_SIGNATURE_CLASS: {
+            case JVM_SIGNATURE_CLASS:
+            case JVM_SIGNATURE_VALUE_CLASS: {
                 /* Skip over the classname, if one is there. */
                 char *p =
                     skip_over_fieldname(name + 1, JNI_TRUE, --length);