|
From: Beorn J. <beo...@ya...> - 2006-08-13 19:53:52
|
I feel this idea (tracking the closing of un-opened fds) is very good. It should be extremely easy to implement. In fact, it would be a great starter/warm-up project for someone who wants to learn valgrind internals. Actually, I'm surprised I haven't seen a patch on the mailling list already; should be what, about five lines? I'm perhaps more surprised that it isn't in there already. It would also be extremely useful. Closing fds not known to be open may be fine in a single-threaded environment, but in a multi-threaded environment it is absolute disaster. I am not enough of an strace/gdb expert to be able to easily track this sort of thing down in under 1/2 a day in a complex multi-threaded program. It would be a matter of seconds with valgrind's help. (Oh, and throw in user-level threading to make things even more complex.) I do have some experience with multi-threaded servers, and in fact this very problem of closing previously closed file descriptors was one of those ghost bugs that haunted us for a while. Nigel Horne's idea is really very good (and so simple!), and should be encouraged. - Beorn Johnson __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com |