cygwin1.dll > 3.1.4: Program execution fails if (WSL-)symlink exists and is present in PATH

Mattl Mario Mario.Mattl@ssi-schaefer.com
Tue Dec 1 09:24:25 GMT 2020


Hello,

Since cygwin1.dll version 3.1.5, I observed the following behavior:
If a symbolic link is existing in the PATH environment, programs (external from Cygwin's system directory) using cygwin1.dll cannot be executed anymore.
Possibly, because the Cygwin-DLL isn't found anymore.

Steps to reproduce:

cd /
mkdir link_test
cp /usr/bin/sed.exe link_test
ln -s link_test test
export PATH=/test:/link_test:/usr/bin:/bin

/link_test/sed cannot be executed
$ ldd /link_test/sed
        ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffffd960000)
        KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffffd140000)
        KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffffa8e0000)
        SYSFER.DLL => /cygdrive/c/WINDOWS/System32/SYSFER.DLL (0x550c0000)

-> no cygwin- DLLs found

If I delete the symbolic link
$ ll test
lrwxrwxrwx 1 mmattl Users 9 Dec  1 10:14 test -> link_test/
simply with
rm test

everything is working fine; sed can be executed
$ /link_test/sed
Usage: /link_test/sed [OPTION]... {script-only-if-no-other-script} [input-file]...
[...]
And

$ ldd /link_test/sed
        ntdll.dll => /cygdrive/c/WINDOWS/SYSTEM32/ntdll.dll (0x7ffffd960000)
        KERNEL32.DLL => /cygdrive/c/WINDOWS/System32/KERNEL32.DLL (0x7ffffd140000)
        KERNELBASE.dll => /cygdrive/c/WINDOWS/System32/KERNELBASE.dll (0x7ffffa8e0000)
        SYSFER.DLL => /cygdrive/c/WINDOWS/System32/SYSFER.DLL (0x550c0000)
        cygwin1.dll => /usr/bin/cygwin1.dll (0x180040000)
        cygintl-8.dll => /usr/bin/cygintl-8.dll (0x3f7110000)
        cygiconv-2.dll => /usr/bin/cygiconv-2.dll (0x3f7160000)

It would be great if you could give some advice to this issue.

Many thanks and best regards,
Mario


SSI Schäfer IT Solutions GmbH | Friesachstrasse 15 | 8114 Friesach | Austria
Registered Office: Friesach | Commercial Register: 49324 K | VAT no. ATU28654300
Commercial Court: Landesgericht für Zivilrechtssachen Graz
Unsere Hinweise zum Umgang mit personenbezogenen Daten finden Sie hier<https://www.ssi-schaefer.com/de-at/datenschutz-49548>.
You can find our information on the handling of personal data here<https://www.ssi-schaefer.com/en-at/privacy-13258>.


More information about the Cygwin mailing list