Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Ignore pseudo-leaks when we use dlopen in smpi.
authordegomme <augustin.degomme@unibas.ch>
Wed, 17 May 2017 13:33:04 +0000 (15:33 +0200)
committerdegomme <augustin.degomme@unibas.ch>
Wed, 17 May 2017 13:33:04 +0000 (15:33 +0200)
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.

tools/simgrid.supp

index 82cd7a8..e15cfce 100644 (file)
    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:
 # ,----