From efbda81c4d794ef571a347d2f9e1fc22529929f8 Mon Sep 17 00:00:00 2001 From: cristianrosa Date: Thu, 16 Dec 2010 16:16:09 +0000 Subject: [PATCH 1/1] Bugfix: correctly set/unset the raw memory when taking/restoring snapshots git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@9275 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- src/mc/mc_global.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/mc/mc_global.c b/src/mc/mc_global.c index 42d17656b2..9fa095a3e3 100644 --- a/src/mc/mc_global.c +++ b/src/mc/mc_global.c @@ -49,9 +49,11 @@ void MC_init(void) xbt_swag_foreach(process, simix_global->process_list){ xbt_setset_elm_add(mc_setset, process); } - + MC_UNSET_RAW_MEM; + MC_dpor_init(); + MC_SET_RAW_MEM; /* Save the initial state */ initial_snapshot = xbt_new0(s_mc_snapshot_t, 1); MC_take_snapshot(initial_snapshot); @@ -92,6 +94,9 @@ void MC_replay(xbt_fifo_t stack) /* Restore the initial state */ MC_restore_snapshot(initial_snapshot); + /* At the moment of taking the snapshot the raw heap was set, so restoring + * it will set it back again, we have to unset it to continue */ + MC_UNSET_RAW_MEM; /* Traverse the stack from the initial state and re-execute the transitions */ for (item = xbt_fifo_get_last_item(stack); @@ -109,7 +114,7 @@ void MC_replay(xbt_fifo_t stack) /* Debug information */ if(XBT_LOG_ISENABLED(mc_global, xbt_log_priority_debug)){ req_str = MC_request_to_string(req); - DEBUG1("Replay: %s", req_str); + DEBUG2("Replay: %s (%p)", req_str, state); xbt_free(req_str); } } -- 2.20.1