X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/91e78165e8e9deeeaffa4b8119ded328ab0ba6a3..c57842fe897f53b46f0be3da87f7c996674be7d6:/src/mc/mc_global.c diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index a24b223d40..42a7127a79 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -576,7 +576,8 @@ void MC_replay(xbt_fifo_t stack, int start) if (mc_reduce_kind == e_mc_reduce_dpor) { MC_SET_MC_HEAP; char *key = bprintf("%lu", saved_req->issuer->pid); - xbt_dict_remove(first_enabled_state, key); + if(xbt_dict_get_or_null(first_enabled_state, key)) + xbt_dict_remove(first_enabled_state, key); xbt_free(key); MC_SET_STD_HEAP; } @@ -899,6 +900,8 @@ void MC_dump_stack_liveness(xbt_fifo_t stack) void MC_print_statistics(mc_stats_t stats) { + xbt_mheap_t previous_heap = mmalloc_get_current_heap(); + if (stats->expanded_pairs == 0) { XBT_INFO("Expanded states = %lu", stats->expanded_states); XBT_INFO("Visited states = %lu", stats->visited_states); @@ -920,7 +923,7 @@ void MC_print_statistics(mc_stats_t stats) XBT_INFO("Send-deterministic : %s", !initial_global_state->send_deterministic ? "No" : "Yes"); } - MC_SET_STD_HEAP; + mmalloc_set_current_heap(previous_heap); } void MC_assert(int prop)