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

hsdis library not picked up correctly on expected paths

XMLWordPrintable

    • svc
    • b15
    • windows

        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().

              kmo Krystal Mo (Inactive)
              kmo Krystal Mo (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: