This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: realpath bug in glibc?


On Fri, Apr 03, 2015 at 09:51:44AM -0700, H.J. Lu wrote:
> gcc/ada/cstreams.c in GCC has
> 
>   /* Use realpath function which resolves links and references to . and ..
>      on those Unix systems that support it. Note that GNU/Linux provides it but
>      cannot handle more than 5 symbolic links in a full name, so we use the
>      getcwd approach instead. */
> 
> It is hard for me to believe.  Is this statement false?
> 
Not sure about 5 but there is limit. It uses __eloop_threshold which
uses SYMLOOP_MAX thas described in

sysdeps/generic/eloop-treshold.h:

/* POSIX specifies SYMLOOP_MAX as the "Maximum number of symbolic
   links that can be reliably traversed in the resolution of a
   pathname in the absence of a loop."  This makes it a minimum that
   we should certainly accept.  But it leaves open the possibility
   that more might sometimes work--just not "reliably".


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]