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

JVMTI Doc: Inconsistent character encoding for Agent_OnLoad option string, ...

XMLWordPrintable

    • b55
    • generic
    • generic



      Name: nl37777 Date: 04/19/2004

      The new JVMTI SPI function Agent_OnLoad receives an
      options string. The specification of Agent_OnLoad does not specify the
      character encoding used for Agent_OnLoad, and parts of the
      implementation disagree on the character encoding.

      Agent_OnLoad receives the options from the command line through the JNI
      function JNI_CreateJavaVM. This function has traditionally received the
      options in platform encoding, and the specification is being updated
      under 4915107 to clarify this. However, the agents that provide the
      JDWP backend and the java.lang.instrument SPI interpret the option
      string as modified UTF-8, either by matching them against signatures
      obtained from functions such as GetClassSignature or by converting them
      to String objects using NewStringUTF.

      The character encoding for the Agent_OnLoad options string needs to be
      clearly specified, and the necessary character conversions added to
      ensure that the options are interpreted correctly in all cases.
      ======================================================================

      Name: nl37777 Date: 04/30/2004

      A related problem exists for four functions provided in
      the JVMTI API:
           GetSystemProperty
           SetSystemProperty
           GetSystemProperties
           AddToBootstrapClassLoaderSearch
      These functions assume that the strings that they accept or return are
      encoded in platform encoding. This is not documented, and in any case
      it would be better if these methods used the same encoding as all other
      JVMTI interfaces, that is, modified UTF-8.


      ======================================================================

            rfield Robert Field (Inactive)
            nlindenbsunw Norbert Lindenberg (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: