Mercurial > hg > graal-jvmci-8
diff src/share/vm/runtime/thread.cpp @ 6967:d9a84e246cce
Merge
author | cjplummer |
---|---|
date | Fri, 09 Nov 2012 09:45:00 -0800 |
parents | c284cf4781f0 6cb0d32b828b |
children | 80e866b1d053 |
line wrap: on
line diff
--- a/src/share/vm/runtime/thread.cpp Thu Nov 08 22:39:08 2012 +0100 +++ b/src/share/vm/runtime/thread.cpp Fri Nov 09 09:45:00 2012 -0800 @@ -3753,8 +3753,10 @@ } } else { // Try to load the agent from the standard dll directory - os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), name); - library = os::dll_load(buffer, ebuf, sizeof ebuf); + if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(), + name)) { + library = os::dll_load(buffer, ebuf, sizeof ebuf); + } #ifdef KERNEL // Download instrument dll if (library == NULL && strcmp(name, "instrument") == 0) { @@ -3779,8 +3781,9 @@ #endif // KERNEL if (library == NULL) { // Try the local directory char ns[1] = {0}; - os::dll_build_name(buffer, sizeof(buffer), ns, name); - library = os::dll_load(buffer, ebuf, sizeof ebuf); + if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) { + library = os::dll_load(buffer, ebuf, sizeof ebuf); + } if (library == NULL) { const char *sub_msg = " on the library path, with error: "; size_t len = strlen(msg) + strlen(name) + strlen(sub_msg) + strlen(ebuf) + 1;