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

parsing of sun.boot.library.path in os::dll_build_name somewhat broken

    XMLWordPrintable

Details

    • 6u15
    • b10

    Backports

      Description

        While fixing https://jbs.oracle.com/bugs/browse/JDK-7200297 I stumbled onto a few bugs in the dll_build_name function.
         If sun.boot.library.path consists of multiple paths then the last path in the list returned by split_path will not be null terminated. Attempting to create a name from that path will result in the path followed by garbage.
        After iterating through multiple paths if the lib is not found the 'buffer' variable passed in has the last file attempted. Caller of dll_build_name will then try to load this file. 'Buffer' variable should return NULL string if dll_build_name does not find the lib.
        Callers of dll_build_name do not check return value. Return could be NULL string if buffer too small (or above problem fixed). In that case, caller calls os::dll_load() with NULL string. Call succeeds (at least on linux) because NULL pointer or NULL string returns handle of current executable. So, you get a handle back but it's incorrect.

        Attachments

          Issue Links

            Activity

              People

                bpittore Bill Pittore (Inactive)
                bpittore Bill Pittore (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: