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

JDWP ClassType.InvokeMethod doesn't validate class

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: core-svc
    • Subcomponent:
    • Resolved In Build:
      b140

      Description

      Specification of ClassType.InvokeMethod says:
      "The method must be member of the class type or one of its superclasses".

      However, the command allows to invoke method passing an arbitrary class.

      Example (pseudocode):
      ============================
      Debuggee classes:

      public class A { }
      public class B {
          public static void testedMethod() { }
      }
      ============================
      Debugger pseudocode:

      threadId = suspendThread()
      classIdA = getClassId("A")
      classIdB = getClassId("B")
      methodId = getMethodId(classIdB, "testedMethod")
      ClassType.InvokeMethod(classIdA, threadId, methodId)
      ============================
      Such debugger code invokes the method with error code NONE, but INVALID_METHODID is expected.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              hseigel Harold Seigel (Inactive)
              Reporter:
              slukyanov Stanislav Lukyanov (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              8 Start watching this issue

                Dates

                Due:
                Created:
                Updated:
                Resolved: