From: degomme Date: Wed, 17 May 2017 13:33:04 +0000 (+0200) Subject: Ignore pseudo-leaks when we use dlopen in smpi. X-Git-Tag: v3.16~281^2~15 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/87e788a85c4e031bb3fddacfa282472b49f36055?hp=da0d7d1fbe3beaa4a4b234bd39668700aec0031a Ignore pseudo-leaks when we use dlopen in smpi. In a perfect world we should dlclose everything properly, but this leads to issues with some other atexit handles. The xbt_postexit is always executed last, and closes the logs. If the SMPI code used XBT_LOG features, it is then needed until the last moment. So we would need to store the handle at the XBT level instead of the SMPI one... And we don't really want that. So we just hide these non-leaks from valgrind. --- diff --git a/tools/simgrid.supp b/tools/simgrid.supp index 82cd7a8293..e15cfce365 100644 --- a/tools/simgrid.supp +++ b/tools/simgrid.supp @@ -72,6 +72,29 @@ fun:smpi_simulated_main_ } +#SMPI leaks the dlopen handle used for loading the program +{ + dlopen handle leaks (1/2) + Memcheck:Leak + match-leak-kinds:reachable + fun:malloc + ... + fun:dlopen@@GLIBC_* + ... + fun:main +} + +{ + dlopen handle leaks (2/2) + Memcheck:Leak + match-leak-kinds:reachable + fun:calloc + ... + fun:dlopen@@GLIBC_* + ... + fun:main +} + # Memory leaks appearing to be in libcgraph. They can be seen with the # following simple program: # ,----