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

hsdis library not picked up correctly on expected paths

    XMLWordPrintable

    Details

    • Subcomponent:
      svc
    • Resolved In Build:
      b15
    • OS:
      windows

      Backports

        Description

        On Windows, the hsdis library isn't picked up correctly in all expected paths described in Disassembler::load_library():

          // Find the disassembler shared library.
          // Search for several paths derived from libjvm, in this order:
          // 1. <home>/jre/lib/<arch>/<vm>/libhsdis-<arch>.so (for compatibility)
          // 2. <home>/jre/lib/<arch>/<vm>/hsdis-<arch>.so
          // 3. <home>/jre/lib/<arch>/hsdis-<arch>.so
          // 4. hsdis-<arch>.so (using LD_LIBRARY_PATH)

        The reason is that the code that concatenates the paths doesn't take os::file_separator() into account, and always uses '/' instead, like:

        const char* p = strrchr(buf, '/');

        The fix is to change the use of '/' into *os::file_separator() on two lines in Disassembler::load_library().

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kmo Krystal Mo
                Reporter:
                kmo Krystal Mo
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: