mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Valgrind has a weird hack where it invokes a glibc function called __libc_freeres on exit. See: http://valgrind.org/docs/manual/faq.html#faq.exit_errors This is intended to free up memory that glibc won't normally free (since glibc doesn't free everything on exit for efficiency reasons). More importantly, valgrind runs __libc_freeres even if the process calls _exit, resulting in this bug: https://bugs.kde.org/show_bug.cgi?id=361810 (either a bug in valgrind, or in glibc, or in both, depending on your point of view). In any case we don't want this behaviour, so disable it. Also we have to add suppressions for new "leaks" in glibc found by valgrind because __libc_freeres no longer runs. In fact there is only one such suppression needed, for TLS allocation in multithreaded tests.