mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-17 09:34:38 +02:00
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:
parent
b885046273
commit
b07974fd9f
10 changed files with 96 additions and 299 deletions
|
@ -3925,13 +3925,12 @@ static OnLoadEntry_t lookup_on_load(AgentLibrary* agent,
|
|||
}
|
||||
} else {
|
||||
// Try to load the agent from the standard dll directory
|
||||
if (os::dll_build_name(buffer, sizeof(buffer), Arguments::get_dll_dir(),
|
||||
if (os::dll_locate_lib(buffer, sizeof(buffer), Arguments::get_dll_dir(),
|
||||
name)) {
|
||||
library = os::dll_load(buffer, ebuf, sizeof ebuf);
|
||||
}
|
||||
if (library == NULL) { // Try the local directory
|
||||
char ns[1] = {0};
|
||||
if (os::dll_build_name(buffer, sizeof(buffer), ns, name)) {
|
||||
if (library == NULL) { // Try the library path directory.
|
||||
if (os::dll_build_name(buffer, sizeof(buffer), name)) {
|
||||
library = os::dll_load(buffer, ebuf, sizeof ebuf);
|
||||
}
|
||||
if (library == NULL) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue