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

Several sections of JDWP spec don't specify sending a a type tag in the command packet.

    Details

    • Type: CSR
    • Status: Closed
    • Priority: P4
    • Resolution: Withdrawn
    • Fix Version/s: 15
    • Component/s: core-svc
    • Labels:
      None
    • Subcomponent:
    • Compatibility Risk:
      minimal

      Description

      Summary

      Several sections of JDWP spec don't match to the actual implementation and don't specify sending a type tag in the command packet.

      Problem

      The following sections of JDWP spec don't specify sending a type tag in the command packet while the implementation always expects this tag is present in the packet and uses it to identify the type of the value being sent:

      https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ClassType_InvokeMethod https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_InterfaceType_InvokeMethod
      https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ObjectReference_InvokeMethod https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ClassType_NewInstance https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ThreadReference_ForceEarlyReturn https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_StackFrame_SetValues

      Solution

      Update the following sections of JDWP spec

      https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ClassType_InvokeMethod https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_InterfaceType_InvokeMethod
      https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ObjectReference_InvokeMethod https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ClassType_NewInstance https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_ThreadReference_ForceEarlyReturn https://docs.oracle.com/en/java/javase/14/docs/specs/jdwp/jdwp-protocol.html#JDWP_StackFrame_SetValues

      to add missed type tag in the command packet specification.

      Specification

      Update make/data/jdwp/jdwp.spec as below:

      @@ -1174,6 +1174,8 @@
               (threadObject thread "The thread in which to invoke.")
               (method methodID "The method to invoke.")
               (Repeat arguments
      +                (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
      +                              "identifying the type of the argument.")
                       (value arg "The argument value.")
                   )
               (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
      @@ -1250,6 +1252,8 @@
               (threadObject thread "The thread in which to invoke the constructor.")
               (method methodID "The constructor to invoke.")
               (Repeat arguments
      +                (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
      +                              "identifying the type of the argument.")
                   (value arg "The argument value.")
               )
               (int options "Constructor invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
      @@ -1348,6 +1352,8 @@
               (threadObject thread "The thread in which to invoke.")
               (method methodID "The method to invoke.")
               (Repeat arguments
      +                (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
      +                              "identifying the type of the argument.")
                   (value arg "The argument value.")
               )
               (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
      @@ -1690,6 +1696,8 @@
               (classType clazz "The class type.")
               (method methodID "The method to invoke.")
               (Repeat arguments "The number of arguments."
      +                (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
      +                              "identifying the type of the argument.")
                   (value arg "The argument value.")
               )
               (int options "Invocation <a href=\"#JDWP_InvokeOptions\">options</a>")
      @@ -2122,6 +2130,8 @@
           "<a href=\"#JDWP_VirtualMachine_CapabilitiesNew\">CapabilitiesNew</a>."
           (Out
               (threadObject thread "The thread object ID. ")
      +            (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
      +                         "identifying the type of the value to return.")
               (value value "The value to return. ")
           )
           (Reply "none"
      @@ -2610,6 +2620,8 @@
               (Repeat slotValues "The number of values to set. "
                   (Group SlotInfo
                       (int slot "The slot ID. ")
      +                    (byte sigbyte "A <a href=\"#JDWP_Tag\">tag</a> "
      +                                  "identifying the type of the variable."
                       (value slotValue "The value to set. ")
                   )
               )

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                dtitov Daniil Titov
                Reporter:
                dtitov Daniil Titov
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: