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

os::stat doesn't follow symlinks on Windows

XMLWordPrintable

    • x86_64
    • windows

      A DESCRIPTION OF THE PROBLEM :
      I noticed that the underlying os file stat library function in hotspot follows symlinks on POSIX platforms (because it simply calls stat(2)) but not on Windows (because GetFileAttributesExW does not follow symlinks). This may cause inconsistencies between Windows and other platforms with regard to symlinks.

      One I ran into is that if you put a directory on the boot class path, class files within the directory may be symlinks on POSIX platforms but not Windows. This is because ClassPathDirEntry::open_stream assumes the size it gets back from os::stat is the size of the file it will read with os::open.


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: