< prev index next >
src/share/vm/compiler/disassembler.cpp
Print this page
rev 11179 : 8140594: Various minor code improvements (compiler)
Reviewed-by: thartmann
@@ -111,17 +111,17 @@
if (jvm_offset >= 0) {
// 1. <home>/jre/lib/<arch>/<vm>/libhsdis-<arch>.so
strcpy(&buf[jvm_offset], hsdis_library_name);
strcat(&buf[jvm_offset], os::dll_file_extension());
_library = os::dll_load(buf, ebuf, sizeof ebuf);
- if (_library == NULL) {
+ if (_library == NULL && lib_offset >= 0) {
// 2. <home>/jre/lib/<arch>/<vm>/hsdis-<arch>.so
strcpy(&buf[lib_offset], hsdis_library_name);
strcat(&buf[lib_offset], os::dll_file_extension());
_library = os::dll_load(buf, ebuf, sizeof ebuf);
}
- if (_library == NULL) {
+ if (_library == NULL && lib_offset > 0) {
// 3. <home>/jre/lib/<arch>/hsdis-<arch>.so
buf[lib_offset - 1] = '\0';
const char* p = strrchr(buf, *os::file_separator());
if (p != NULL) {
lib_offset = p - buf + 1;
< prev index next >