GNU bug report logs - #29231
26.0.90; invald file name for symbolic files

Previous Next

Package: emacs;

Reported by: Vincent Zhang <vincent_chueng <at> hotmail.com>

Date: Thu, 9 Nov 2017 17:43:02 UTC

Severity: normal

Merged with 28865

Found in version 26.0.90

Done: Alan Third <alan <at> idiocy.org>

Bug is archived. No further changes may be made.

Full log


Message #31 received at 29231 <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Alan Third <alan <at> idiocy.org>, Eli Zaretskii <eliz <at> gnu.org>
Cc: Vincent Zhang <vincent_chueng <at> hotmail.com>, 29231 <at> debbugs.gnu.org
Subject: Re: bug#29231: 26.0.90; invald file name for symbolic files
Date: Sat, 11 Nov 2017 15:21:26 -0800
Alan Third wrote:
> Only with symlinks faccessat returns success if it’s pointing to a
> file and you put ‘/’ on the end.

This is a well-known problem on macOS, and Emacs is supposed to compile a 
replacement fstatat function by building lib/fstatat.o and linking to that, and 
this replacement is supposed to implement the POSIX-required behavior where a 
trailing / works only on directories (or symlinks to directories, if following 
symlinks).

Evidently this replacement procedure is not working somehow. Please tell us 
whether the executable contains an fstatat workaround. You can do that via 
something like this:

$ gdb src/temacs
(gdb) disas rpl_fstatat

and I'd like to see the output of the 'disas' command.

Also, what are the values of the following macros in src/config.h? (The values 
on GNU/Linux are as shown.)

#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
#define HAVE_FSTATAT 1
/* #undef HAVE_WORKING_FSTATAT_ZERO_FLAG */




This bug report was last modified 7 years and 255 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.