From 87e788a85c4e031bb3fddacfa282472b49f36055 Mon Sep 17 00:00:00 2001 From: degomme Date: Wed, 17 May 2017 15:33:04 +0200 Subject: [PATCH] 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. --- tools/simgrid.supp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) 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: # ,---- -- 2.20.1