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

JDWP: crash in utf8ToPlatform on Windows if transport library not found

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • core-svc
    • b10
    • 6
    • b23
    • generic
    • generic


      On Windows the JDWP agent will crash in NPT's utf8ToPlatform function if the transport library is not found. Consider the following:

      C:\> java -agentlib:transport=missing,server=y Test
      UTF ERROR ["../../../src/windows/npt/utf_md.c":63]: Can't get WIDE string length

      This application has requested the Runtime to terminate it in an unusual way.
      Please contact the application's support team for more information.


      The issues stems from the fallback mechanism used when the transport library cannot be loaded in sun.boot.library.path. If it's not in the usual place then the JDWP agent uses the PATH by specifying the "libdir" as "". This causes the transport code (loadTransportLibrary function in src/share/back/transport.c) to attempt to convert a zero length UTF-8 string to platform encoding. This triggers an error in NTP as MultiByteToWideChar returns a length of 0.

      ###@###.### 2005-1-24 09:15:24 GMT

            ohair Kelly Ohair (Inactive)
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: