From 26d1147ec30ab349fa361267937d935750622039 Mon Sep 17 00:00:00 2001 From: Arnaud Giersch Date: Wed, 13 Mar 2019 15:16:00 +0100 Subject: [PATCH] Activate assert when debug log is active. --- src/simix/popping.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/simix/popping.cpp b/src/simix/popping.cpp index 70d34c7f44..c482ab8923 100644 --- a/src/simix/popping.cpp +++ b/src/simix/popping.cpp @@ -14,12 +14,10 @@ void SIMIX_simcall_answer(smx_simcall_t simcall) XBT_DEBUG("Answer simcall %s (%d) issued by %s (%p)", SIMIX_simcall_name(simcall->call), (int)simcall->call, simcall->issuer->get_cname(), simcall->issuer); simcall->issuer->simcall.call = SIMCALL_NONE; -#if 0 - /* This check should be useless and slows everyone. Reactivate if you see something weird in process scheduling. */ - if (std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), simcall->issuer) != - end(simix_global->actors_to_run)) - DIE_IMPOSSIBLE; -#endif + xbt_assert(not XBT_LOG_ISENABLED(simix_popping, xbt_log_priority_debug) || + std::find(begin(simix_global->actors_to_run), end(simix_global->actors_to_run), simcall->issuer) == + end(simix_global->actors_to_run), + "Actor %p should not exist in actors_to_run!", simcall->issuer); simix_global->actors_to_run.push_back(simcall->issuer); } } -- 2.20.1