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

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

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 11
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b03
    • CPU:
      generic
    • OS:
      generic

      Description

      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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: