Details
-
Bug
-
Resolution: Fixed
-
P4
-
9
-
b15
-
windows
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8267322 | openjdk8u302 | Serguei Spitsyn | P4 | Resolved | Fixed | b04 |
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().
// 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
- backported by
-
JDK-8267322 hsdis library not picked up correctly on expected paths
- Resolved
- relates to
-
JDK-6667042 PrintAssembly option does not work without special plugin
- Closed