8186072: dll_build_name returns true even if file is missing

Split dll_build_name into two functions and consolidate to os.cpp file.

Reviewed-by: stuefe, dholmes
This commit is contained in:
Goetz Lindenmaier 2017-08-17 17:26:02 +02:00
parent b885046273
commit b07974fd9f
10 changed files with 96 additions and 299 deletions

View file

@ -1066,7 +1066,7 @@ void ClassLoader::load_zip_library() {
char path[JVM_MAXPATHLEN];
char ebuf[1024];
void* handle = NULL;
if (os::dll_build_name(path, sizeof(path), Arguments::get_dll_dir(), "zip")) {
if (os::dll_locate_lib(path, sizeof(path), Arguments::get_dll_dir(), "zip")) {
handle = os::dll_load(path, ebuf, sizeof ebuf);
}
if (handle == NULL) {
@ -1104,7 +1104,7 @@ void ClassLoader::load_jimage_library() {
char path[JVM_MAXPATHLEN];
char ebuf[1024];
void* handle = NULL;
if (os::dll_build_name(path, sizeof(path), Arguments::get_dll_dir(), "jimage")) {
if (os::dll_locate_lib(path, sizeof(path), Arguments::get_dll_dir(), "jimage")) {
handle = os::dll_load(path, ebuf, sizeof ebuf);
}
if (handle == NULL) {