Hi, I'm trying to add a new option for the --track-fds. https://bugs.kde.org/show_bug.cgi?id=493433
Normally a newly recreated file descriptor gets the lowest available number. This might cause old file descriptor numbers to be reused and hide bad file descriptor accesses (because the old number is new again). When using --track-fds=new, the highest available file descriptor will be returned opposed to the lowest. The question is, how should the new 'new' option work with the other track-fds options. --track-fds=yes will show still opened file descriptors excluding stdin/out/err, while --track-fds=all will show all the open fds, including the standard ones. I think, when --track-fds=new is specified, what's expected is only returning the highest available fd instead of the lowest available one. This means, if you also want to track file descriptors, you should use --track-fds=new,yes. But I'm not sure how to deal with 'all' here. I think it's not right 'new' should be enabled in a case of --track-fds=all. I propose to have 'new' as a completely separate option. This means, if I want to track *all* the opened file descriptors (including the standard ones) and also to be getting the highest file descriptors available when opening/creating them, I'll need to use --track-fds=new,all. The other question is, how should the new option be called? Is "new" a good name for it? Other options could be --track-fds=high or even --track-fds=random. Another option that should be added is "bad". https://bugs.kde.org/show_bug.cgi?id=493434 Currently --track-fds=yes or --track-fds=all report both bad usage and never closed file descriptors. Sometimes users are only interested in bad file descriptor usage errors, but don't care about never close file descriptors. Instead of making them create suppressions for the never closed file descriptors we could have an --track-fds=bad mod that only reports errors on bad usage. I think the "bad" option should also be independent of "all" in the same fashion I proposed "new" to be. Another possibility would be to to keep --track-fds=[yes,no,all] and add new --track-bad-fds=yes, --track-leaky-fds=yes and --track-high-fds=yes. I'm open to any suggestions. Thank you, Alexandra
_______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users