From: Martin Quinson Date: Wed, 24 May 2017 09:39:46 +0000 (+0200) Subject: maxmin: be more explicit about the leaked variables X-Git-Tag: v3.16~223 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/999c6ca0248ff66351ef2ebd0901622384212bc6 maxmin: be more explicit about the leaked variables --- diff --git a/src/surf/maxmin.cpp b/src/surf/maxmin.cpp index 5d5cff5ae6..0f156e3709 100644 --- a/src/surf/maxmin.cpp +++ b/src/surf/maxmin.cpp @@ -6,13 +6,14 @@ /* \file callbacks.h */ -#include "xbt/sysdep.h" +#include "maxmin_private.hpp" #include "xbt/log.h" #include "xbt/mallocator.h" -#include "maxmin_private.hpp" -#include -#include /* sprintf */ +#include "xbt/sysdep.h" +#include #include +#include /* sprintf */ +#include XBT_LOG_NEW_DEFAULT_SUBCATEGORY(surf_maxmin, surf, "Logging specific to SURF (maxmin)"); typedef struct s_dyn_light { @@ -115,7 +116,12 @@ void lmm_system_free(lmm_system_t sys) return; while ((var = (lmm_variable_t) extract_variable(sys))) { - XBT_WARN("Variable %d still in system when freing it: this may be a bug", var->id_int); + int status; + char* demangled = abi::__cxa_demangle(typeid(*var->id).name(), 0, 0, &status); + + XBT_WARN("Probable bug: a %s variable (#%d) not removed before the LMM system destruction.", demangled, + var->id_int); + xbt_free(demangled); lmm_var_free(sys, var); } while ((cnst = (lmm_constraint_t) extract_constraint(sys))) diff --git a/teshsuite/s4u/listen_async/listen_async.tesh b/teshsuite/s4u/listen_async/listen_async.tesh index 184718e296..a888ec0f9d 100644 --- a/teshsuite/s4u/listen_async/listen_async.tesh +++ b/teshsuite/s4u/listen_async/listen_async.tesh @@ -3,4 +3,4 @@ $ ./listen_async ${srcdir:=.}/../../../examples/platforms/small_platform.xml "-- > [ 0.000195] (test@Tremblay) Data successfully received from regular mailbox > [ 0.000195] (test@Tremblay) Task listen works on asynchronous mailboxes > [ 0.000195] (test@Tremblay) Data successfully received from asynchronous mailbox -> [ 0.000195] (maestro@) Variable 3 still in system when freing it: this may be a bug +> [ 0.000195] (maestro@) Probable bug: a simgrid::surf::NetworkCm02Action variable (#3) not removed before the LMM system destruction.