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

JDWP ClassType.InvokeMethod doesn't validate class

XMLWordPrintable

    • b140

      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.

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

              Created:
              Updated:
              Resolved: