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

x64 fixpath.exe doesn't setup correct environment to run x86 process

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9, 10
    • Fix Version/s: 18
    • Component/s: infrastructure
    • Labels:
    • Subcomponent:
    • OS:
      windows
    • Verification:
      Verified

      Description

      Uncovered weird issue with running cscript.exe from 64bit fixpath related to broken WoW64 mapping of file system paths.

      Consider the following simple JS:
      ---
      WScript.CreateObject("Scripting.FileSystemObject").GetFolder("C:\\windows\\Sysnative")
      WScript.Echo('OK')
      ---

      Run it with standalone cscript.exe, all good:
      ---
      $ /cygdrive/c/Windows/SysWOW64/cscript.exe //Nologo 'C:\Users\asemenyu\Documents\Sysnative.js'
      OK
      ---

      Run it with cscript.exe, started from 32bit fixpath, still all good:
      ---
      $ /cygdrive/c/work/as/jds/work/10/jdk10/build/windows-x86/configure-support/bin/fixpath.exe -c /cygdrive/c/Windows/SysWOW64/cscript.exe //Nologo 'C:\Users\asemenyu\Documents\Sysnative.js'
      OK
      ---

      Run it with cscript.exe, started from 64bit fixpath, all bad:
      ---
      $ /cygdrive/c/work/as/jds/work/10/jdk10/build/windows-x64/configure-support/bin/fixpath.exe -c /cygdrive/c/Windows/SysWOW64/cscript.exe //Nologo 'C:\Users\asemenyu\Documents\Sysnative.js'
      C:\Users\asemenyu\Documents\Sysnative.js(1, 1) Microsoft JScript runtime error: Path not found
      ---

      OS: Windows 7 64bit, Cygwin 32bit. Sysnative.js script attached.

      My best guess of the problem is that 64bit fixpath.exe doesn't setup environment to run 32bit cscript.exe properly and mapping for virtual 'Sysnative' folder doesn't work.
      This is minor issue and I have workaround for it, so this is not critical. But this looks like a time bomb and source of weird build errors.

        Attachments

        1. Sysnative.js
          0.1 kB
          Alexey Semenyuk

          Activity

            People

            Assignee:
            ihse Magnus Ihse Bursie
            Reporter:
            asemenyuk Alexey Semenyuk
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: