From: Mark W. <ma...@kl...> - 2024-09-21 12:57:29
|
Hi, At the Cauldron "Using the Valgrind error manager for file descriptor tracking" talk https://gcc.gnu.org/wiki/cauldron2024#cauldron2024talks.using_the_valgrind_error_manager_for_file_descriptor_tracking there were various questions and suggestions. I added several to bugzilla: Add bad fd usage errors for --track-fds in ML_(fd_allowed) https://bugs.kde.org/show_bug.cgi?id=493418 Add --track-fds=bad mode (no "leak" tracking) https://bugs.kde.org/show_bug.cgi?id=493434 Add a new fds only mode to --track-fds https://bugs.kde.org/show_bug.cgi?id=493433 Review all syscalls (and ioctls) that use or return (new) file descriptors https://bugs.kde.org/show_bug.cgi?id=493430 There was also a question about using valgrind on a program that implements a fuse file system, like the new glibc test support helper by Florian. I didn't give a very good answer to that one. Because I forgot that valgrind already should be able to handle that. Valgrind obviously already has to handle blocking syscalls that could be unblock by another thread. There is a "sim hint" to extend this to syscalls that might block when the underlying file system managed by the program itself. --sim-hints=hint1,hint2,... Pass miscellaneous hints to Valgrind which slightly modify the simulated behaviour in nonstandard or dangerous ways, possibly to help the simulation of strange features. By default no hints are enabled. Use with caution! Currently known hints are: [...] • fuse-compatible: Enable special handling for certain system calls that may block in a FUSE file-system. This may be necessary when running Valgrind on a multi-threaded program that uses one thread to manage a FUSE file-system and another thread to access that file-system. Please let me know if this still doesn't work. This hint hasn't been updated in a long time and there might be some newer syscalls that should enable this hint, but don't (yet). Cheers, Mark |