Merge
authorjwilhelm
Thu, 20 Jun 2019 02:10:53 +0200
changeset 55439 726cb89a9997
parent 55431 43627549a488 (current diff)
parent 55438 0692b67f5462 (diff)
child 55440 48a14297c030
Merge
src/hotspot/share/classfile/classFileParser.cpp
--- a/make/data/jdwp/jdwp.spec	Wed Jun 19 05:04:08 2019 -0800
+++ b/make/data/jdwp/jdwp.spec	Thu Jun 20 02:10:53 2019 +0200
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2018, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -602,7 +602,7 @@
     (Command Signature=1
         "Returns the JNI signature of a reference type. "
         "JNI signature formats are described in the "
-        "<a href=\"http://java.sun.com/products/jdk/1.2/docs/guide/jni/index.html\">Java Native Inteface Specification</a>"
+        "<a href=\"../jni/index.html\">Java Native Interface Specification</a>"
         "<p>
         "For primitive classes "
         "the returned signature is the signature of the corresponding primitive "
--- a/src/hotspot/share/classfile/classFileParser.cpp	Wed Jun 19 05:04:08 2019 -0800
+++ b/src/hotspot/share/classfile/classFileParser.cpp	Thu Jun 20 02:10:53 2019 +0200
@@ -4958,6 +4958,7 @@
 bool ClassFileParser::verify_unqualified_name(const char* name,
                                               unsigned int length,
                                               int type) {
+  if (length == 0) return false;  // Must have at least one char.
   for (const char* p = name; p != name + length; p++) {
     switch(*p) {
       case '.':
@@ -5107,7 +5108,7 @@
           int newlen = c - (char*) signature;
           bool legal = verify_unqualified_name(signature, newlen, LegalClass);
           if (!legal) {
-            classfile_parse_error("Class name contains illegal character "
+            classfile_parse_error("Class name is empty or contains illegal character "
                                   "in descriptor in class file %s",
                                   CHECK_0);
             return NULL;
--- a/test/hotspot/jtreg/ProblemList-graal.txt	Wed Jun 19 05:04:08 2019 -0800
+++ b/test/hotspot/jtreg/ProblemList-graal.txt	Thu Jun 20 02:10:53 2019 +0200
@@ -147,16 +147,16 @@
 # jvmti tests
 vmTestbase/nsk/jvmti/PopFrame/popframe009/TestDescription.java                     8195639   generic-all
 
-vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/TestDescription.java     8195674   generic-all
-vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn002/TestDescription.java     8195674   generic-all
+vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/TestDescription.java     8195674,8195635   generic-all
+vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn002/TestDescription.java     8195674,8195635   generic-all
 
 runtime/appcds/cacheObject/RedefineClassTest.java                                  8204506   macosx-all
-vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java        8204506   macosx-all
+vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java        8204506,8195635   macosx-all,generic-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t002/TestDescription.java        8204506   macosx-all
 
-vmTestbase/nsk/jvmti/PopFrame/popframe001/TestDescription.java                     8207013   generic-all
-vmTestbase/nsk/jvmti/PopFrame/popframe003/TestDescription.java                     8207013   generic-all
-vmTestbase/nsk/jvmti/PopFrame/popframe005/TestDescription.java                     8207013   generic-all
+vmTestbase/nsk/jvmti/PopFrame/popframe001/TestDescription.java                     8207013,8195635   generic-all
+vmTestbase/nsk/jvmti/PopFrame/popframe003/TestDescription.java                     8207013,8195635   generic-all
+vmTestbase/nsk/jvmti/PopFrame/popframe005/TestDescription.java                     8207013,8195635   generic-all
 vmTestbase/nsk/jvmti/StopThread/stopthrd007/TestDescription.java                   8207013   generic-all
 
 serviceability/jvmti/FieldAccessWatch/FieldAccessWatch.java                        8202482   generic-all
@@ -181,14 +181,8 @@
 vmTestbase/nsk/jdi/stress/serial/forceEarlyReturn002/TestDescription.java                         8195635 generic-all
 vmTestbase/nsk/jdi/stress/serial/mixed002/TestDescription.java                                    8195635 generic-all
 vmTestbase/nsk/jdwp/ThreadReference/ForceEarlyReturn/forceEarlyReturn002/forceEarlyReturn002.java 8195635 generic-all
-vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn001/TestDescription.java                    8195635 generic-all
-vmTestbase/nsk/jvmti/ForceEarlyReturn/ForceEarlyReturn002/TestDescription.java                    8195635 generic-all
-vmTestbase/nsk/jvmti/PopFrame/popframe001/TestDescription.java                                    8195635 generic-all
-vmTestbase/nsk/jvmti/PopFrame/popframe003/TestDescription.java                                    8195635 generic-all
-vmTestbase/nsk/jvmti/PopFrame/popframe005/TestDescription.java                                    8195635 generic-all
 vmTestbase/nsk/jvmti/scenarios/capability/CM01/cm01t007/TestDescription.java                      8195635 generic-all
 vmTestbase/nsk/jvmti/scenarios/capability/CM03/cm03t001/TestDescription.java                      8195635 generic-all
-vmTestbase/nsk/jvmti/scenarios/hotswap/HS102/hs102t001/TestDescription.java                       8195635 generic-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t001/TestDescription.java                       8195635 generic-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS201/hs201t002/TestDescription.java                       8195635 generic-all
 vmTestbase/nsk/jvmti/scenarios/hotswap/HS202/hs202t002/hs202t002.java                             8195635 generic-all
--- a/test/hotspot/jtreg/ProblemList.txt	Wed Jun 19 05:04:08 2019 -0800
+++ b/test/hotspot/jtreg/ProblemList.txt	Thu Jun 20 02:10:53 2019 +0200
@@ -49,8 +49,8 @@
 compiler/jvmci/compilerToVM/InvalidateInstalledCodeTest.java 8163894 generic-all
 compiler/tiered/LevelTransitionTest.java 8067651 generic-all
 
-compiler/types/correctness/CorrectnessTest.java 8225620 solaris-sparcv9
-compiler/types/correctness/OffTest.java         8225620 solaris-sparcv9
+compiler/types/correctness/CorrectnessTest.java 8225670,8225620 generic-all,solaris-sparcv9
+compiler/types/correctness/OffTest.java         8225670,8225620 generic-all,solaris-sparcv9
 
 compiler/c2/Test6852078.java 8194310 generic-all
 compiler/c2/Test8004741.java 8214904 generic-all
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/classFileParserBug/EmptyUnqName.jasm	Thu Jun 20 02:10:53 2019 +0200
@@ -0,0 +1,43 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+super public class EmptyUnqName version 56:0 {
+
+    public Method "<init>":"()V" stack 1 locals 1 {
+        aload_0;
+        invokespecial Method java/lang/Object."<init>":"()V";
+        return;
+    }
+
+    public static Method main:"([Ljava/lang/String;)V" stack 2 locals 1 {
+        getstatic Field java/lang/System.out:"Ljava/io/PrintStream;";
+        ldc String "Testing method param types";
+        invokevirtual Method java/io/PrintStream.println:"(Ljava/lang/String;)V";
+        return;
+    }
+
+    public static Method func:"(L;)V" stack 0 locals 1 {
+        return;
+    }
+
+} // end Class EmptyUnqName
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/hotspot/jtreg/runtime/classFileParserBug/TestEmptyUnqName.java	Thu Jun 20 02:10:53 2019 +0200
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2019, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8225789
+ * @summary Test that an unqualified name of "L;" causes a ClassFormatError exception.
+ * @compile EmptyUnqName.jasm
+ * @run main/othervm -Xverify:remote TestEmptyUnqName
+ */
+
+public class TestEmptyUnqName {
+    public static void main(String args[]) throws Throwable {
+
+        System.out.println("Regression test for bug 8225789");
+
+        try {
+            Class newClass = Class.forName("EmptyUnqName");
+            throw new RuntimeException("Expected ClassFormatError exception not thrown");
+        } catch (java.lang.ClassFormatError e) {
+            if (!e.getMessage().contains("Class name is empty or contains illegal character")) {
+                throw new RuntimeException("Wrong ClassFormatError: " + e.getMessage());
+            }
+        }
+    }
+}
--- a/test/hotspot/jtreg/runtime/verifier/TestSigParse.java	Wed Jun 19 05:04:08 2019 -0800
+++ b/test/hotspot/jtreg/runtime/verifier/TestSigParse.java	Thu Jun 20 02:10:53 2019 +0200
@@ -63,7 +63,7 @@
             throw new RuntimeException("Expected ClasFormatError exception not thrown");
         } catch (java.lang.ClassFormatError e) {
             String eMsg = e.getMessage();
-            if (!eMsg.contains("Class name contains illegal character")) {
+            if (!eMsg.contains("Class name is empty or contains illegal character")) {
                 throw new RuntimeException("Unexpected exception: " + eMsg);
             }
         }
--- a/test/jdk/ProblemList-aot.txt	Wed Jun 19 05:04:08 2019 -0800
+++ b/test/jdk/ProblemList-aot.txt	Thu Jun 20 02:10:53 2019 +0200
@@ -30,3 +30,5 @@
 java/lang/invoke/VarHandles/VarHandleTestByteArrayAsShort.java  8222445 windows-x64
 java/lang/invoke/VarHandles/VarHandleTestByteArrayAsChar.java   8222445 windows-x64
 java/lang/invoke/VarHandles/VarHandleTestAccessBoolean.java     8222445 windows-x64
+java/lang/reflect/PublicMethods/PublicMethodsTest.java          8226309 generic-all
+java/lang/constant/MethodTypeDescTest.java                      8225349 windows-x64
--- a/test/jdk/ProblemList-graal.txt	Wed Jun 19 05:04:08 2019 -0800
+++ b/test/jdk/ProblemList-graal.txt	Thu Jun 20 02:10:53 2019 +0200
@@ -78,27 +78,13 @@
 java/util/concurrent/ScheduledThreadPoolExecutor/BasicCancelTest.java   8196611   generic-all
 
 # tests require pop_frame and force_early_return capabilities
-com/sun/jdi/RedefineTTYLineNumber.java                                  8195635   generic-all
-com/sun/jdi/RedefineG.java                                              8195635   generic-all
-com/sun/jdi/RedefineCrossStart.java                                     8195635   generic-all
-com/sun/jdi/PopSynchronousTest.java                                     8195635   generic-all
-com/sun/jdi/RedefineTTYLineNumber.java                                  8195635   generic-all
-com/sun/jdi/RedefineG.java                                              8195635   generic-all
-com/sun/jdi/RedefineCrossStart.java                                     8195635   generic-all
-com/sun/jdi/PopSynchronousTest.java                                     8195635   generic-all
-com/sun/jdi/PopAsynchronousTest.java                                    8195635   generic-all
+com/sun/jdi/EarlyReturnTest.java                                        8195635   generic-all
 com/sun/jdi/PopAndStepTest.java                                         8195635   generic-all
 com/sun/jdi/PopAsynchronousTest.java                                    8195635   generic-all
-com/sun/jdi/PopAndStepTest.java                                         8195635   generic-all
-com/sun/jdi/EarlyReturnTest.java                                        8195635   generic-all
-com/sun/jdi/RedefineTTYLineNumber.java                                  8195635   generic-all
-com/sun/jdi/RedefineG.java                                              8195635   generic-all
+com/sun/jdi/PopSynchronousTest.java                                     8195635   generic-all
 com/sun/jdi/RedefineCrossStart.java                                     8195635   generic-all
-com/sun/jdi/PopSynchronousTest.java                                     8195635   generic-all
-com/sun/jdi/PopAsynchronousTest.java                                    8195635   generic-all
-com/sun/jdi/PopAndStepTest.java                                         8195635   generic-all
-com/sun/jdi/EarlyReturnTest.java                                        8195635   generic-all
-com/sun/jdi/EarlyReturnTest.java                                        8195635   generic-all
+com/sun/jdi/RedefineG.java                                              8195635   generic-all
+com/sun/jdi/RedefineTTYLineNumber.java                                  8195635   generic-all
 
 # Next JFR tests fail with Graal. Assuming 8193210.
 jdk/jfr/event/compiler/TestCodeSweeper.java              8193210   generic-all