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

(fs) WindowsPath::getPathForWin32Calls synchronizes on String object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 16
    • 8, 11, 15, 16
    • core-libs
    • b21
    • windows

      sun.nio.fs.WindowsPath::getPathForWin32Calls synchronizes on 'path' field, which is a String object:

              if (type != WindowsPathType.DRIVE_RELATIVE) {
                  synchronized (path) {
                      pathForWin32Calls = new WeakReference<String>(resolved);
                  }
              }

      this might lead to a deadlock, this code should synchronize on "this".

            iignatyev Igor Ignatyev (Inactive)
            iignatyev Igor Ignatyev (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: