https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106003
--- Comment #7 from David Malcolm <dmalcolm at gcc dot gnu.org> --- For reference, this article (by one of my colleagues) talks about how valgrind can detect file descriptor leaks *dynamically*: https://developers.redhat.com/articles/2023/01/09/how-use-valgrind-track-file-descriptors#