Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8175384

SA: clhsdb 'printall' throws ClassCastException while printing out the bytecodes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 11
    • 9, 10
    • hotspot
    • b03
    • generic
    • generic

      Attaching clhsdb to a simple HelloWorld program and executing the 'printall' command results in ClassCastException being thrown multiple times.

      =========snippet from the printall output===============
      Constant Pool^M
      Constant Pool of [final class java.lang.invoke.MethodTypeForm @0x00000007c004bd68] @0x00007f8ed145cea8^M
      java.lang.ClassCastException: jdk.hotspot.agent/sun.jvm.hotspot.oops.ObjArrayKlass cannot be cast to jdk.hotspot.agent/sun.jvm.hotspot.oops.InstanceKlass^M
              at jdk.hotspot.agent/sun.jvm.hotspot.oops.ConstantPool.getFieldOrMethodKlassRefAt(ConstantPool.java:338)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.oops.ConstantPool.getMethodRefAt(ConstantPool.java:343)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeInvoke.getInvokedMethod(BytecodeInvoke.java:73)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator$1.visit(HTMLGenerator.java:699)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.interpreter.BytecodeDisassembler.decode(BytecodeDisassembler.java:156)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.ui.classbrowser.HTMLGenerator.genHTML(HTMLGenerator.java:651)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$19$1.visit(CommandProcessor.java:898)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary$2.visit(SystemDictionary.java:179)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.memory.Dictionary.classesDo(Dictionary.java:68)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.classesDo(SystemDictionary.java:190)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.memory.SystemDictionary.allClassesDo(SystemDictionary.java:183)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor$19.doit(CommandProcessor.java:891)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1963)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.executeCommand(CommandProcessor.java:1933)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CommandProcessor.run(CommandProcessor.java:1813)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.run(CLHSDB.java:99)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.CLHSDB.main(CLHSDB.java:40)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.runCLHSDB(SALauncher.java:191)^M
              at jdk.hotspot.agent/sun.jvm.hotspot.SALauncher.main(SALauncher.java:439)^M
      0x00007f8ed145f958 45^M

            jgeorge Jini George (Inactive)
            jgeorge Jini George (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: