Symbolic link bug in recent Cygwin DLL build

Corinna Vinschen corinna-cygwin@cygwin.com
Thu Apr 16 08:58:07 GMT 2020


Hi Mark,

On Apr 15 23:53, Mark Geisert wrote:
> After installing a recent DLL built from the git source tree I noticed:
> 
> ~ ln -s /tmp/foo .
> 
> ~ ls -l foo
> lrwxrwxrwx 1 Mark None 12 Apr 15 23:44 foo -> /mnt/tmp/foo

Huh?  That works for me, independently of /tmp/foo existing or not:

  $ ln -s /tmp/foo .
  $ ls -l foo
  lrwxrwxrwx 1 corinna Users 8 Apr 16 10:38 foo -> /tmp/foo

Since you're building the DLL yourself, can you please debug this with
GDB?  It would be very important to find out what on your system adds
the /mnt prefix!

It could occur in creating the symlink, that's in path.cc, function
symlink_wsl(), or it could occur in reading the symlink, path.cc,
function check_reparse_point_target(), in the else if (rp->ReparseTag ==
IO_REPARSE_TAG_LX_SYMLINK) branch at line 2534.

As for /mnt itself, it's the WSL equivalent to the cygdrive prefix.
When creating WSL symlinks, Cygwin converts the cygdrive prefix to
/mnt, and when reading WSL symlinks, a leading /mnt is converted
to the current cygdrive prefix on the fly.

We should just move further discussions to the cygwin-developers ML.


Thanks,
Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://cygwin.com/pipermail/cygwin-developers/attachments/20200416/88a5f4d2/attachment.sig>


More information about the Cygwin-developers mailing list