tar 1.33 symlinks : Cannot change mode to...

Corinna Vinschen corinna-cygwin@cygwin.com
Tue Jan 12 18:16:40 GMT 2021


On Jan 12 12:49, Ken Brown via Cygwin wrote:
> On 1/12/2021 12:15 PM, Corinna Vinschen wrote:
> > On Jan 12 11:55, Ken Brown via Cygwin wrote:
> > > [...]
> > > This appears to be a bug in fstat in 32-bit Cygwin.  Here's what I'm seeing
> > > in gdb, using an unoptimized build of cygwin1.dll.  There is a call to
> > > fstatat in the tar source file gnu/fchmodat.c:87.  This ultimately leads to
> > > a call to fstat, whose definition in syscalls.cc is the following in the
> > > 32-bit case:
> > 
> > No, wait.  struct stat == struct _stat64 since Cygwin 1.5.0!
> > 
> > With Cygwin 1.5.0, the old entry point fstat was only retained to serve
> > old 32 bit applications buil.t under Cygwin 1.3.x or earlier.
> > 
> > Consequentially, newer 32 bit apps, built with Cygwin 1.5.0 or later,
> > are redirected to fstat64, see NEW_FUNCTIONS in Makefile.in.
> > 
> > If tar is actually calling fstat, something fishy is going on.
> 
> It's not tar that's calling fstat, it's Cygwin's fstatat at
> syscalls.cc:4855. This appears to be a bug that I introduced in commit
> 84252946.  I'll fix it.

Oh, right, this code should call fstat64, or resolve to an fhandler
and call its fstat method.

> Thanks for setting me straight.

Never mind, shit happens.


Corinna


More information about the Cygwin mailing list