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] |
On 09/11/2017 10:25 AM, Zack Weinberg wrote:
It should be enough to make a dummy call, e.g. pglob->gl_lstat(".", &statbuf);
Unfortunately calling lstat is quite expensive on some (non-POSIX) platforms, even on the working directory. So we can't do the above in the Gnulib version. Besides, under the proposed patch glob is going to use gl_lstat instead of gl_stat in almost all cases, so the dummy call won't add much extra checking.
I suppose we could valid gl_stat instead, as gl_stat usage will become rare (used only if GLOB_MARK is also specified, just before returning results). But we don't have any code in the wild that is giving us invalid gl_stat pointers, so it wouldn't be that helpful to try to validate gl_stat either.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |