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

JVMTI Spec: specify behavior of method functions on native methods

XMLWordPrintable

    • b46
    • generic
    • generic

      Alan Stevens wrote:

      >A spec question from iSeries -
      >
      >JVMTI Several of the Methods functions cannot return any data if the input
      >jmethodID identifies a native method. The spec does not indicate what
      >return code should be returned in this case. The methods are:

      Below is what the RI does (which is, arguably, correct) --

      > Get Line Number Table

      JVMTI_ERROR_ABSENT_INFORMATION

      > Get Method Location

      Start of -1 (even though it also has JVMTI_ERROR_ABSENT_INFORMATION)

      > Get Local Variable Table


      JVMTI_ERROR_ABSENT_INFORMATION

      > Get Bytecodes

      Zero length array (I think, hopefully not the stub)

      At the very minimum the returns for native methods need to be clearly specified. And maybe some of this
      should change. That there is an absent information return on GetMethodLocation seems goofy esp given
      none on GetBytecodes. I will open a bug. Do you or the iSeries team have a feeling about what these
      should be?


      >Is the VM expected to return JVMTI_ERROR_INVALID_METHODID (23) ?

      Invalid method ID is only when it is a bad method ID (eg NULL). That probably should be clarified too.

      ###@###.### 2004-03-04

      The full set of JVMTI functions whose behavior is unspecified when passed a native method:
      GetLineNumberTable
      GetLocalVariableTable
      GetMaxLocals
      GetArgumentSize
      GetMethodLocation
      GetBytecodes
      ###@###.### 2004-03-12

            sspitsyn Serguei Spitsyn
            rfield Robert Field (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: