This is the mail archive of the glibc-bugs@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]

[Bug libc/18921] New: Regression: extraneous stat() and fstat() performed by opendir()


https://sourceware.org/bugzilla/show_bug.cgi?id=18921

            Bug ID: 18921
           Summary: Regression: extraneous stat() and fstat() performed by
                    opendir()
           Product: glibc
           Version: 2.22
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
          Assignee: roland at gnu dot org
          Reporter: P at draigBrady dot com
                CC: drepper.fsp at gmail dot com
  Target Milestone: ---

As diagnosed by Bernhard Voelker,
since glibc-2.22 ... and specifically this commit:
https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=glibc-2.21-360-g46f894d
opendir(".") has been changed from a simple openat() to this sequence of
stat()+open() as the following diff of `strace ls` outputs indicates:

   stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
  -openat(AT_FDCWD, ".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
  +stat(".", {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0
  +open(".", O_RDONLY|O_NONBLOCK|O_DIRECTORY|O_CLOEXEC) = 3
  +fstat(3, {st_mode=S_IFDIR|0700, st_size=4096, ...}) = 0

-- 
You are receiving this mail because:
You are on the CC list for the bug.


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