Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8211740

[AOT] -XX:AOTLibrary doesn't accept windows path

    XMLWordPrintable

Details

    • b16
    • windows

    Backports

      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.

        Attachments

          Issue Links

            Activity

              People

                bobv Bob Vandette (Inactive)
                epavlova Ekaterina Pavlova
                Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: