Merge
authorcoleenp
Thu, 24 Dec 2015 03:28:25 +0000
changeset 35223 a68498ab5403
parent 35222 fc89375d788d (current diff)
parent 35221 9d8ada7b9fee (diff)
child 35224 e723bb1c6ef9
Merge
--- a/hotspot/src/share/vm/classfile/classFileParser.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/classfile/classFileParser.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -567,6 +567,9 @@
           const int name_index = cp->name_ref_index_at(index);
           const Symbol* const name = cp->symbol_at(name_index);
           const Symbol* const sig = cp->symbol_at(sig_index);
+          guarantee_property(sig->utf8_length() != 0,
+            "Illegal zero length constant pool entry at %d in class %s",
+            sig_index, CHECK);
           if (sig->byte_at(0) == JVM_SIGNATURE_FUNC) {
             verify_legal_method_signature(name, sig, CHECK);
           } else {
@@ -593,8 +596,9 @@
           verify_legal_field_name(name, CHECK);
           if (_need_verify && _major_version >= JAVA_7_VERSION) {
             // Signature is verified above, when iterating NameAndType_info.
-            // Need only to be sure it's the right type.
-            if (signature->byte_at(0) == JVM_SIGNATURE_FUNC) {
+            // Need only to be sure it's non-zero length and the right type.
+            if (signature->utf8_length() == 0 ||
+                signature->byte_at(0) == JVM_SIGNATURE_FUNC) {
               throwIllegalSignature(
                 "Field", name, signature, CHECK);
             }
@@ -605,8 +609,9 @@
           verify_legal_method_name(name, CHECK);
           if (_need_verify && _major_version >= JAVA_7_VERSION) {
             // Signature is verified above, when iterating NameAndType_info.
-            // Need only to be sure it's the right type.
-            if (signature->byte_at(0) != JVM_SIGNATURE_FUNC) {
+            // Need only to be sure it's non-zero length and the right type.
+            if (signature->utf8_length() == 0 ||
+                signature->byte_at(0) != JVM_SIGNATURE_FUNC) {
               throwIllegalSignature(
                 "Method", name, signature, CHECK);
             }
@@ -617,8 +622,7 @@
             // 4509014: If a class method name begins with '<', it must be "<init>".
             assert(name != NULL, "method name in constant pool is null");
             const unsigned int name_len = name->utf8_length();
-            assert(name_len > 0, "bad method name");  // already verified as legal name
-            if (name->byte_at(0) == '<') {
+            if (name_len != 0 && name->byte_at(0) == '<') {
               if (name != vmSymbols::object_initializer_name()) {
                 classfile_parse_error(
                   "Bad method name at constant pool index %u in class file %s",
@@ -5369,12 +5373,12 @@
       }
     }
 
-    if (TraceClassResolution) {
+    if (log_is_enabled(Info, classresolve))  {
       ResourceMark rm;
       // print out the superclass.
       const char * from = ik->external_name();
       if (ik->java_super() != NULL) {
-        tty->print("RESOLVE %s %s (super)\n",
+        log_info(classresolve)("%s %s (super)",
                    from,
                    ik->java_super()->external_name());
       }
@@ -5385,7 +5389,7 @@
         for (int i = 0; i < length; i++) {
           const Klass* const k = local_interfaces->at(i);
           const char * to = k->external_name();
-          tty->print("RESOLVE %s %s (interface)\n", from, to);
+          log_info(classresolve)("%s %s (interface)", from, to);
         }
       }
     }
--- a/hotspot/src/share/vm/classfile/verificationType.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/classfile/verificationType.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -61,7 +61,7 @@
     Klass* obj = SystemDictionary::resolve_or_fail(
         name(), Handle(THREAD, klass->class_loader()),
         Handle(THREAD, klass->protection_domain()), true, CHECK_false);
-    if (TraceClassResolution) {
+    if (log_is_enabled(Info, classresolve)) {
       Verifier::trace_class_resolution(obj, klass());
     }
 
@@ -80,7 +80,7 @@
       Klass* from_class = SystemDictionary::resolve_or_fail(
           from.name(), Handle(THREAD, klass->class_loader()),
           Handle(THREAD, klass->protection_domain()), true, CHECK_false);
-      if (TraceClassResolution) {
+      if (log_is_enabled(Info, classresolve)) {
         Verifier::trace_class_resolution(from_class, klass());
       }
       return InstanceKlass::cast(from_class)->is_subclass_of(this_class());
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -106,9 +106,9 @@
   const char* resolve = resolve_class->external_name();
   // print in a single call to reduce interleaving between threads
   if (source_file != NULL) {
-    tty->print("RESOLVE %s %s %s (verification)\n", verify, resolve, source_file);
+    log_info(classresolve)("%s %s %s (verification)", verify, resolve, source_file);
   } else {
-    tty->print("RESOLVE %s %s (verification)\n", verify, resolve);
+    log_info(classresolve)("%s %s (verification)", verify, resolve);
   }
 }
 
@@ -206,7 +206,7 @@
     ResourceMark rm(THREAD);
     instanceKlassHandle kls =
       SystemDictionary::resolve_or_fail(exception_name, true, CHECK_false);
-    if (TraceClassResolution) {
+    if (log_is_enabled(Info, classresolve)) {
       Verifier::trace_class_resolution(kls(), klass());
     }
 
@@ -1992,7 +1992,7 @@
     name, Handle(THREAD, loader), Handle(THREAD, protection_domain),
     true, THREAD);
 
-  if (TraceClassResolution) {
+  if (log_is_enabled(Info, classresolve)) {
     instanceKlassHandle cur_class = current_class();
     Verifier::trace_class_resolution(kls, cur_class());
   }
--- a/hotspot/src/share/vm/classfile/verifier.hpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/classfile/verifier.hpp	Thu Dec 24 03:28:25 2015 +0000
@@ -61,7 +61,7 @@
   // Relax certain verifier checks to enable some broken 1.1 apps to run on 1.2.
   static bool relax_verify_for(oop class_loader);
 
-  // Print output for -XX:+TraceClassResolution
+  // Print output for classresolve
   static void trace_class_resolution(Klass* resolve_class, InstanceKlass* verify_class);
 
  private:
--- a/hotspot/src/share/vm/logging/logTag.hpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/logging/logTag.hpp	Thu Dec 24 03:28:25 2015 +0000
@@ -37,6 +37,7 @@
   LOG_TAG(bot) \
   LOG_TAG(census) \
   LOG_TAG(classhisto) \
+  LOG_TAG(classresolve) \
   LOG_TAG(classinit) \
   LOG_TAG(comp) \
   LOG_TAG(compaction) \
--- a/hotspot/src/share/vm/oops/constantPool.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/oops/constantPool.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -204,11 +204,11 @@
   if (k() != this_cp->pool_holder()) {
     // only print something if the classes are different
     if (source_file != NULL) {
-      tty->print("RESOLVE %s %s %s:%d\n",
+      log_info(classresolve)("%s %s %s:%d",
                  this_cp->pool_holder()->external_name(),
                  k->external_name(), source_file, line_number);
     } else {
-      tty->print("RESOLVE %s %s\n",
+      log_info(classresolve)("%s %s",
                  this_cp->pool_holder()->external_name(),
                  k->external_name());
     }
@@ -277,7 +277,7 @@
   ClassLoaderData* this_key = this_cp->pool_holder()->class_loader_data();
   this_key->record_dependency(k(), CHECK_NULL); // Can throw OOM
 
-  if (TraceClassResolution && !k->is_array_klass()) {
+  if (log_is_enabled(Info, classresolve) && !k->is_array_klass()) {
     // skip resolving the constant pool so that this code gets
     // called the next time some bytecodes refer to this class.
     trace_class_resolution(this_cp, k);
--- a/hotspot/src/share/vm/prims/jni.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/prims/jni.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -345,7 +345,7 @@
                                                    &st,
                                                    CHECK_NULL);
 
-  if (TraceClassResolution && k != NULL) {
+  if (log_is_enabled(Info, classresolve) && k != NULL) {
     trace_class_resolution(k);
   }
 
@@ -415,7 +415,7 @@
   result = find_class_from_class_loader(env, sym, true, loader,
                                         protection_domain, true, thread);
 
-  if (TraceClassResolution && result != NULL) {
+  if (log_is_enabled(Info, classresolve) && result != NULL) {
     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
   }
 
@@ -3277,7 +3277,7 @@
   TempNewSymbol sym = SymbolTable::new_symbol(name, CHECK_NULL);
   jclass result =  find_class_from_class_loader(env, sym, true, loader, protection_domain, true, CHECK_NULL);
 
-  if (TraceClassResolution && result != NULL) {
+  if (log_is_enabled(Info, classresolve) && result != NULL) {
     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
   }
   return result;
--- a/hotspot/src/share/vm/prims/jvm.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/prims/jvm.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -206,9 +206,9 @@
       const char * to = to_class->external_name();
       // print in a single call to reduce interleaving between threads
       if (source_file != NULL) {
-        tty->print("RESOLVE %s %s %s:%d (%s)\n", from, to, source_file, line_number, trace);
+        log_info(classresolve)("%s %s %s:%d (%s)", from, to, source_file, line_number, trace);
       } else {
-        tty->print("RESOLVE %s %s (%s)\n", from, to, trace);
+        log_info(classresolve)("%s %s (%s)", from, to, trace);
       }
     }
   }
@@ -835,7 +835,7 @@
     return NULL;
   }
 
-  if (TraceClassResolution) {
+  if (log_is_enabled(Info, classresolve)) {
     trace_class_resolution(k);
   }
   return (jclass) JNIHandles::make_local(env, k->java_mirror());
@@ -872,7 +872,7 @@
   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
                                                h_prot, false, THREAD);
 
-  if (TraceClassResolution && result != NULL) {
+  if (log_is_enabled(Info, classresolve) && result != NULL) {
     trace_class_resolution(java_lang_Class::as_Klass(JNIHandles::resolve_non_null(result)));
   }
   return result;
@@ -902,7 +902,7 @@
   jclass result = find_class_from_class_loader(env, h_name, init, h_loader,
                                                h_prot, true, thread);
 
-  if (TraceClassResolution && result != NULL) {
+  if (log_is_enabled(Info, classresolve) && result != NULL) {
     // this function is generally only used for class loading during verification.
     ResourceMark rm;
     oop from_mirror = JNIHandles::resolve_non_null(from);
@@ -912,7 +912,7 @@
     oop mirror = JNIHandles::resolve_non_null(result);
     Klass* to_class = java_lang_Class::as_Klass(mirror);
     const char * to = to_class->external_name();
-    tty->print("RESOLVE %s %s (verification)\n", from_name, to);
+    log_info(classresolve)("%s %s (verification)", from_name, to);
   }
 
   return result;
@@ -980,7 +980,7 @@
                                                    &st,
                                                    CHECK_NULL);
 
-  if (TraceClassResolution && k != NULL) {
+  if (log_is_enabled(Info, classresolve) && k != NULL) {
     trace_class_resolution(k);
   }
 
--- a/hotspot/src/share/vm/runtime/arguments.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/runtime/arguments.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -400,6 +400,8 @@
 };
 
 static AliasedFlag const aliased_jvm_logging_flags[] = {
+  { "-XX:+TraceClassResolution", "-Xlog:classresolve=info"},
+  { "-XX:-TraceClassResolution", "-Xlog:classresolve=off"},
   { "-XX:+TraceExceptions", "-Xlog:exceptions=info" },
   { "-XX:-TraceExceptions", "-Xlog:exceptions=off" },
   { "-XX:+TraceMonitorInflation", "-Xlog:monitorinflation=debug" },
--- a/hotspot/src/share/vm/runtime/globals.hpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/runtime/globals.hpp	Thu Dec 24 03:28:25 2015 +0000
@@ -1496,9 +1496,6 @@
   develop(bool, TraceClearedExceptions, false,                              \
           "Print when an exception is forcibly cleared")                    \
                                                                             \
-  product(bool, TraceClassResolution, false,                                \
-          "Trace all constant pool resolutions (for debugging)")            \
-                                                                            \
   product(bool, TraceBiasedLocking, false,                                  \
           "Trace biased locking in JVM")                                    \
                                                                             \
--- a/hotspot/src/share/vm/runtime/reflection.cpp	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/src/share/vm/runtime/reflection.cpp	Thu Dec 24 03:28:25 2015 +0000
@@ -74,9 +74,9 @@
     const char * to = to_class->external_name();
     // print in a single call to reduce interleaving between threads
     if (source_file != NULL) {
-      tty->print("RESOLVE %s %s %s:%d (reflection)\n", from, to, source_file, line_number);
+      log_info(classresolve)("%s %s %s:%d (reflection)", from, to, source_file, line_number);
     } else {
-      tty->print("RESOLVE %s %s (reflection)\n", from, to);
+      log_info(classresolve)("%s %s (reflection)", from, to);
     }
   }
 }
@@ -599,7 +599,7 @@
                                                        Handle(THREAD, protection_domain),
                                                        true,
                                                        CHECK_NULL);
-    if (TraceClassResolution) {
+    if (log_is_enabled(Info, classresolve)) {
       trace_class_resolution(k);
     }
     return k->java_mirror();
@@ -654,7 +654,7 @@
                                       Handle(THREAD, k->protection_domain()),
                                       true, CHECK_(Handle()));
 
-  if (TraceClassResolution) {
+  if (log_is_enabled(Info, classresolve)) {
     trace_class_resolution(result);
   }
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/BadNameAndType.java	Thu Dec 24 03:28:25 2015 +0000
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2015, 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 8042660
+ * @summary Constant pool NameAndType entries must point to non-zero length Utf8 strings
+ * @compile emptySigUtf8.jcod
+ * @compile emptyNameUtf8.jcod
+ * @run main/othervm -Xverify:all BadNameAndType
+ */
+
+// Test that a constant pool NameAndType descriptor_index and/or name_index
+// that points to a zero length Utf8 string causes a ClassFormatError.
+public class BadNameAndType {
+    public static void main(String args[]) throws Throwable {
+
+        System.out.println("Regression test for bug 8042660");
+
+        // Test descriptor_index pointing to zero-length string.
+        try {
+            Class newClass = Class.forName("emptySigUtf8");
+            throw new RuntimeException("Expected ClassFormatError exception not thrown");
+        } catch (java.lang.ClassFormatError e) {
+            System.out.println("Test BadNameAndType passed test case emptySigUtf8");
+        }
+
+        // Test name_index pointing to zero-length string.
+        try {
+            Class newClass = Class.forName("emptyNameUtf8");
+            throw new RuntimeException("Expected ClassFormatError exception not thrown");
+        } catch (java.lang.ClassFormatError e) {
+            System.out.println("Test BadNameAndType passed test case emptyNameUtf8");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/emptyNameUtf8.jcod	Thu Dec 24 03:28:25 2015 +0000
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ */
+
+// This class has an illegal NameAndType at constant pool #4.  It's illegal because
+// the Utf8 that it points to at #27 is a zero length string which is not a valid
+// name.  Loading this class should cause a ClassFormatError exception.
+class emptyNameUtf8 {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [29] { // Constant Pool
+    ; // first element is empty
+    Method #6 #15; // #1     at 0x0A
+    Field #16 #17; // #2     at 0x0F
+    String #18; // #3     at 0x14
+    NameAndType #27 #28; // #4     at 0x9F
+    class #21; // #5     at 0x1C
+    class #22; // #6     at 0x1F
+    Utf8 "<init>"; // #7     at 0x22
+    Utf8 "()V"; // #8     at 0x2B
+    Utf8 "Code"; // #9     at 0x2E
+    Utf8 "LineNumberTable"; // #10     at 0x35
+    Utf8 "main"; // #11     at 0x47
+    Utf8 "([Ljava/lang/String;)V"; // #12     at 0x4E
+    Utf8 "SourceFile"; // #13     at 0x67
+    Utf8 "emptyNameUtf8.java"; // #14     at 0x74
+    NameAndType #7 #8; // #15     at 0x81
+    class #23; // #16     at 0x86
+    NameAndType #24 #25; // #17     at 0x89
+    Utf8 "Hello World"; // #18     at 0x8E
+    class #26; // #19     at 0x9C
+    Method #19 #4; // #20     at 0x17
+    Utf8 "emptyNameUtf8"; // #21     at 0xA4
+    Utf8 "java/lang/Object"; // #22     at 0xAC
+    Utf8 "java/lang/System"; // #23     at 0xBF
+    Utf8 "out"; // #24     at 0xD2
+    Utf8 "Ljava/io/PrintStream;"; // #25     at 0xD8
+    Utf8 "java/io/PrintStream"; // #26     at 0xF0
+    Utf8 ""; // #27     at 0x0106
+    Utf8 "()V"; // #28     at 0x0110
+  } // Constant Pool
+
+  0x0021; // access
+  #5;// this_cpx
+  #6;// super_cpx
+
+  [0] { // Interfaces
+  } // Interfaces
+
+  [0] { // fields
+  } // fields
+
+  [2] { // methods
+    { // Member at 0x0134
+      0x0001; // access
+      #7; // name_cpx
+      #8; // sig_cpx
+      [1] { // Attributes
+        Attr(#9, 29) { // Code at 0x013C
+          1; // max_stack
+          1; // max_locals
+          Bytes[5]{
+            0x2AB70001B1;
+          };
+          [0] { // Traps
+          } // end Traps
+          [1] { // Attributes
+            Attr(#10, 6) { // LineNumberTable at 0x0153
+              [1] { // LineNumberTable
+                0  2; //  at 0x015F
+              }
+            } // end LineNumberTable
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member at 0x015F
+      0x0009; // access
+      #11; // name_cpx
+      #12; // sig_cpx
+      [1] { // Attributes
+        Attr(#9, 37) { // Code at 0x0167
+          2; // max_stack
+          1; // max_locals
+          Bytes[9]{
+            0xB200021203B60004;
+            0xB1;
+          };
+          [0] { // Traps
+          } // end Traps
+          [1] { // Attributes
+            Attr(#10, 10) { // LineNumberTable at 0x0182
+              [2] { // LineNumberTable
+                0  4; //  at 0x018E
+                8  5; //  at 0x0192
+              }
+            } // end LineNumberTable
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [1] { // Attributes
+    Attr(#13, 2) { // SourceFile at 0x0194
+      #14;
+    } // end SourceFile
+  } // Attributes
+} // end class emptyNameUtf8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/hotspot/test/runtime/classFileParserBug/emptySigUtf8.jcod	Thu Dec 24 03:28:25 2015 +0000
@@ -0,0 +1,131 @@
+/*
+ * Copyright (c) 2015, 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.
+ *
+ */
+
+// This class has an illegal NameAndType at constant pool #4.  It's illegal because
+// the type that it points to at #28 is a zero length Utf8 string which is not a
+// valid signature.  Loading this class should cause a ClassFormatError exception.
+class emptySigUtf8 {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [29] { // Constant Pool
+    ; // first element is empty
+    Method #6 #15; // #1     at 0x0A
+    Field #16 #17; // #2     at 0x0F
+    String #18; // #3     at 0x14
+    NameAndType #27 #28; // #4     at 0x9F
+    class #21; // #5     at 0x1C
+    class #22; // #6     at 0x1F
+    Utf8 "<init>"; // #7     at 0x22
+    Utf8 "()V"; // #8     at 0x2B
+    Utf8 "Code"; // #9     at 0x2E
+    Utf8 "LineNumberTable"; // #10     at 0x35
+    Utf8 "main"; // #11     at 0x47
+    Utf8 "([Ljava/lang/String;)V"; // #12     at 0x4E
+    Utf8 "SourceFile"; // #13     at 0x67
+    Utf8 "emptySigUtf8.java"; // #14     at 0x74
+    NameAndType #7 #8; // #15     at 0x81
+    class #23; // #16     at 0x86
+    NameAndType #24 #25; // #17     at 0x89
+    Utf8 "Hello World"; // #18     at 0x8E
+    class #26; // #19     at 0x9C
+    Method #19 #4; // #20     at 0x17
+    Utf8 "emptySigUtf8"; // #21     at 0xA4
+    Utf8 "java/lang/Object"; // #22     at 0xAC
+    Utf8 "java/lang/System"; // #23     at 0xBF
+    Utf8 "out"; // #24     at 0xD2
+    Utf8 "Ljava/io/PrintStream;"; // #25     at 0xD8
+    Utf8 "java/io/PrintStream"; // #26     at 0xF0
+    Utf8 "hi"; // #27     at 0x0106
+    Utf8 ""; // #28     at 0x0110
+  } // Constant Pool
+
+  0x0021; // access
+  #5;// this_cpx
+  #6;// super_cpx
+
+  [0] { // Interfaces
+  } // Interfaces
+
+  [0] { // fields
+  } // fields
+
+  [2] { // methods
+    { // Member at 0x0134
+      0x0001; // access
+      #7; // name_cpx
+      #8; // sig_cpx
+      [1] { // Attributes
+        Attr(#9, 29) { // Code at 0x013C
+          1; // max_stack
+          1; // max_locals
+          Bytes[5]{
+            0x2AB70001B1;
+          };
+          [0] { // Traps
+          } // end Traps
+          [1] { // Attributes
+            Attr(#10, 6) { // LineNumberTable at 0x0153
+              [1] { // LineNumberTable
+                0  2; //  at 0x015F
+              }
+            } // end LineNumberTable
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member at 0x015F
+      0x0009; // access
+      #11; // name_cpx
+      #12; // sig_cpx
+      [1] { // Attributes
+        Attr(#9, 37) { // Code at 0x0167
+          2; // max_stack
+          1; // max_locals
+          Bytes[9]{
+            0xB200021203B60004;
+            0xB1;
+          };
+          [0] { // Traps
+          } // end Traps
+          [1] { // Attributes
+            Attr(#10, 10) { // LineNumberTable at 0x0182
+              [2] { // LineNumberTable
+                0  4; //  at 0x018E
+                8  5; //  at 0x0192
+              }
+            } // end LineNumberTable
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [1] { // Attributes
+    Attr(#13, 2) { // SourceFile at 0x0194
+      #14;
+    } // end SourceFile
+  } // Attributes
+} // end class emptySigUtf8
--- a/hotspot/test/runtime/logging/MonitorInflationTest.java	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/test/runtime/logging/MonitorInflationTest.java	Thu Dec 24 03:28:25 2015 +0000
@@ -26,7 +26,6 @@
  * @bug 8133885
  * @summary monitorinflation=debug should have logging from each of the statements in the code
  * @library /testlibrary
- * @ignore 8145587
  * @modules java.base/sun.misc
  *          java.management
  * @build jdk.test.lib.OutputAnalyzer jdk.test.lib.ProcessTools
@@ -40,7 +39,8 @@
     static void analyzeOutputOn(ProcessBuilder pb) throws Exception {
         OutputAnalyzer output = new OutputAnalyzer(pb.start());
         output.shouldContain("Inflating object");
-        output.shouldContain("Deflating object ");
+        output.shouldContain("type MonitorInflationTest$Waiter");
+        output.shouldContain("I've been waiting.");
         output.shouldHaveExitValue(0);
     }
 
@@ -52,19 +52,34 @@
 
     public static void main(String[] args) throws Exception {
         ProcessBuilder pb = ProcessTools.createJavaProcessBuilder(
-            "-Xlog:monitorinflation=debug", "-version");
+            "-Xlog:monitorinflation=debug", InnerClass.class.getName());
         analyzeOutputOn(pb);
 
         pb = ProcessTools.createJavaProcessBuilder(
-            "-XX:+TraceMonitorInflation", "-version");
+            "-XX:+TraceMonitorInflation", InnerClass.class.getName());
         analyzeOutputOn(pb);
 
         pb = ProcessTools.createJavaProcessBuilder(
-            "-Xlog:monitorinflation=off", "-version");
+            "-Xlog:monitorinflation=off", InnerClass.class.getName());
         analyzeOutputOff(pb);
 
         pb = ProcessTools.createJavaProcessBuilder(
-            "-XX:-TraceMonitorInflation", "-version");
+            "-XX:-TraceMonitorInflation", InnerClass.class.getName());
         analyzeOutputOff(pb);
     }
+
+    public static class Waiter {
+        public static void foo() {
+            System.out.println("I've been waiting.");
+        }
+    }
+    public static class InnerClass {
+        public static void main(String[] args) throws Exception {
+            Waiter w = new Waiter();
+            synchronized (w) {
+                w.wait(100);
+                w.foo();
+            }
+        }
+    }
 }
--- a/hotspot/test/runtime/verifier/TraceClassRes.java	Wed Dec 23 20:07:39 2015 +0000
+++ b/hotspot/test/runtime/verifier/TraceClassRes.java	Thu Dec 24 03:28:25 2015 +0000
@@ -38,7 +38,7 @@
         "-XX:+TraceClassResolution", "-verify", "-Xshare:off", "-version");
 
     OutputAnalyzer output = new OutputAnalyzer(pb.start());
-    output.shouldContain("RESOLVE java.lang.ClassLoader java.lang.Throwable ClassLoader.java (verification)");
+    output.shouldContain("[classresolve] java.lang.ClassLoader java.lang.Throwable ClassLoader.java (verification)");
     output.shouldHaveExitValue(0);
   }
 }