Using the Valgrind error manager for file descriptor tracking

Day 1 | 16:25 | 00:25 | K.3.201 | Alexandra Petlanova Hajkova


Note: I'm reworking this at the moment, some things won't work.

The stream isn't available yet! Check back at 16:25.
Get involved in the conversation!Join the chat

The valgrind error manager makes it easy for valgrind tools to report issues that can include execution backtraces for multiple events, integrate with gdb, generate xml reports and lets users suppress specific issues. The valgrind error manager contains a fast unwinder which can be used to detect "equivalent" issues.

For valgrind 3.23.0 we introduced "core errors" which are tool independent and can be used to report on core events for resources that are explicitly created and destroyed. We used this to add errors when using file descriptors that can be reported by any valgrind tool by using --track-fds=yes. This allows reporting on bad use of file descriptors, file descriptors that are double closed, used after closing, and file descriptors that "leak". Because these are "normal" valgrind errors all these events can be reported in the xml output, suppressed by the user, intercepted by gdb and integrated in CI runs with --error-exitcode.

For Valgrind 3.24.0 we added bad file descriptor usage errors.