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): valgrind-3.1.0-2 How reproducible: Wishlist Steps to Reproduce: 1. create this file: main() { close(15); } 2. cc -g foo.c 3. valgrind --tool=memcheck --num-callers=20 --leak-check=yes --track-fds=yes ./a.out Actual results: No error message Expected results: Since file descriptors are being tracked, it would be useful to warn of closing files that aren't open Additional info:
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. http://www.valgrind.org/support/bug_reports.html