Bug 337716 - False positive for openat system call with absolute paths
Summary: False positive for openat system call with absolute paths
Status: RESOLVED DUPLICATE of bug 307103
Alias: None
Product: valgrind
Classification: Developer tools
Component: general (show other bugs)
Version: 3.9.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Julian Seward
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-07-23 02:54 UTC by Steven Stewart-Gallus
Modified: 2014-10-20 22:13 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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 ***