Details
-
Bug
-
Resolution: Fixed
-
P3
-
11, 12
-
b16
-
windows
Backports
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8243663 | 11.0.8-oracle | Bob Vandette | P3 | Resolved | Fixed | b05 |
JDK-8234157 | 11.0.6 | Bob Vandette | P3 | Resolved | Fixed | b04 |
Description
-XX:AOTLibrary used to specify aot-ed library doesn't accepts windows paths and fails with "error opening file: Can't find dependent libraries"
The error is thrown by open/src/hotspot/os/windows/os_windows.cp:os::dll_load
1358 void * os::dll_load(const char *name, char *ebuf, int ebuflen) {
1359 void * result = LoadLibrary(name);
1360 if (result != NULL) {
1361 // Recalculate pdb search path if a DLL was loaded successfully.
1362 SymbolEngine::recalc_search_path();
1363 return result;
1364 }
1365
1366 DWORD errcode = GetLastError();
1367 if (errcode == ERROR_MOD_NOT_FOUND) {
1368 strncpy(ebuf, "Can't find dependent libraries", ebuflen - 1);
1369 ebuf[ebuflen - 1] = '\0';
1370 return NULL;
1371 }
The cause is that windows LoadLibrary() doesn't accept path.
AOT JEP (http://openjdk.java.net/jeps/295) says:
"-XX:AOTLibrary=<file>
Specify a list of AOT library files. Separate libraries entries with colons (:) or comma (,)."
Also -XX:AOTLibrary works fine with paths on unix systems.
Looks like os_windows.cp:os::dll_load need to be fixed to accepts paths.
The error is thrown by open/src/hotspot/os/windows/os_windows.cp:os::dll_load
1358 void * os::dll_load(const char *name, char *ebuf, int ebuflen) {
1359 void * result = LoadLibrary(name);
1360 if (result != NULL) {
1361 // Recalculate pdb search path if a DLL was loaded successfully.
1362 SymbolEngine::recalc_search_path();
1363 return result;
1364 }
1365
1366 DWORD errcode = GetLastError();
1367 if (errcode == ERROR_MOD_NOT_FOUND) {
1368 strncpy(ebuf, "Can't find dependent libraries", ebuflen - 1);
1369 ebuf[ebuflen - 1] = '\0';
1370 return NULL;
1371 }
The cause is that windows LoadLibrary() doesn't accept path.
AOT JEP (http://openjdk.java.net/jeps/295) says:
"-XX:AOTLibrary=<file>
Specify a list of AOT library files. Separate libraries entries with colons (:) or comma (,)."
Also -XX:AOTLibrary works fine with paths on unix systems.
Looks like os_windows.cp:os::dll_load need to be fixed to accepts paths.
Attachments
Issue Links
- backported by
-
JDK-8234157 [AOT] -XX:AOTLibrary doesn't accept windows path
- Resolved
-
JDK-8243663 [AOT] -XX:AOTLibrary doesn't accept windows path
- Resolved