Bug 337716

Summary: False positive for openat system call with absolute paths
Product: [Developer tools] valgrind Reporter: Steven Stewart-Gallus <sstewartgallus00>
Component: generalAssignee: Julian Seward <jseward>
Status: RESOLVED DUPLICATE    
Severity: normal CC: flo2030, tom
Priority: NOR    
Version: 3.9.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Steven Stewart-Gallus 2014-07-23 02:54:27 UTC
It's perfectly okay to pass an invalid file descriptor into any at system call if an absolute path is used.

In the following example I get "Warning: invalid file descriptor -1 in syscall openat()":

#include <fcntl.h>
#include <unistd.h>

int main(void)
{
    openat(-1, "/proc", O_RDONLY);
}
Comment 1 Florian Krohm 2014-10-20 22:13:11 UTC
This was fixed some time ago in r13159. See also bug #307103.
I'm closing this as a duplicate.

*** This bug has been marked as a duplicate of bug 307103 ***