Bug 202305 - Wishlist for --track-fds=yes
Summary: Wishlist for --track-fds=yes
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: valgrind
Version: 5
Hardware: powerpc
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-08-12 14:32 UTC by Nigel Horne
Modified: 2007-11-30 22:11 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-08-12 17:45:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Nigel Horne 2006-08-12 14:32:29 UTC
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:

Comment 1 Jakub Jelinek 2006-08-12 17:45:28 UTC
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


Note You need to log in before you can comment on or make changes to this bug.