Red Hat Bugzilla – Bug 202305
Wishlist for --track-fds=yes
Last modified: 2007-11-30 17:11:40 EST
Description of problem:
--track-fds doesn't notify of attempt to close a file descriptor that is not open.
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. create this file:
2. cc -g foo.c
3. valgrind --tool=memcheck --num-callers=20 --leak-check=yes --track-fds=yes
No error message
Since file descriptors are being tracked, it would be useful to warn of closing
files that aren't open
I'm not sure it is a good idea, many programs close all file descriptors to make
sure no fds from the program that executed it are passed on (or perhaps more
often no fds but 0, 1, 2).
In any case, such enhancement requests should be filled upstream, not here.