-
Bug
-
Resolution: Fixed
-
P3
-
9
-
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.
"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.
- relates to
-
JDK-8040167 JDWP spec for ClassType#InvokeMethod contradicts JLS
-
- Resolved
-
-
JDK-8160984 JNI CallStatic<Type>Method don't validate class
-
- Closed
-