From: Martin Quinson Date: Thu, 30 May 2019 10:45:55 +0000 (+0200) Subject: MC: cosmetics (fight the mc_model_checker singleton) X-Git-Tag: v3.22.4~44 X-Git-Url: http://bilbo.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/a75f0026f40bb64ebf43eecd6010406e5b7bcad1 MC: cosmetics (fight the mc_model_checker singleton) --- diff --git a/src/mc/sosp/RegionSnapshot.cpp b/src/mc/sosp/RegionSnapshot.cpp index 055b5826b1..3e1e1aabf3 100644 --- a/src/mc/sosp/RegionSnapshot.cpp +++ b/src/mc/sosp/RegionSnapshot.cpp @@ -39,7 +39,6 @@ RegionSparse::RegionSparse(RegionType region_type, void* start_addr, void* perma : RegionSnapshot(region_type, start_addr, permanent_addr, size) { simgrid::mc::RemoteClient* process = &mc_model_checker->process(); - assert(process != nullptr); xbt_assert((((uintptr_t)start_addr) & (xbt_pagesize - 1)) == 0, "Start address not at the beginning of a page"); xbt_assert((((uintptr_t)permanent_addr) & (xbt_pagesize - 1)) == 0, diff --git a/src/mc/sosp/mc_snapshot.cpp b/src/mc/sosp/mc_snapshot.cpp index 757c46a3b5..fbe1a4297d 100644 --- a/src/mc/sosp/mc_snapshot.cpp +++ b/src/mc/sosp/mc_snapshot.cpp @@ -233,9 +233,9 @@ void simgrid::mc::Snapshot::snapshot_stacks(simgrid::mc::RemoteClient* process) // Read the context from remote process: unw_context_t context; - mc_model_checker->process().read_bytes(&context, sizeof(context), remote(stack.context)); + process->read_bytes(&context, sizeof(context), remote(stack.context)); - st.context.initialize(&mc_model_checker->process(), &context); + st.context.initialize(process, &context); st.stack_frames = unwind_stack_frames(&st.context); st.local_variables = get_local_variables_values(st.stack_frames); @@ -254,7 +254,7 @@ static void snapshot_handle_ignore(simgrid::mc::Snapshot* snapshot) xbt_assert(snapshot->process()); // Copy the memory: - for (auto const& region : mc_model_checker->process().ignored_regions()) { + for (auto const& region : snapshot->process()->ignored_regions()) { s_mc_snapshot_ignored_data_t ignored_data; ignored_data.start = (void*)region.addr; ignored_data.data.resize(region.size); @@ -264,7 +264,7 @@ static void snapshot_handle_ignore(simgrid::mc::Snapshot* snapshot) } // Zero the memory: - for (auto const& region : mc_model_checker->process().ignored_regions()) + for (auto const& region : snapshot->process()->ignored_regions()) snapshot->process()->clear_bytes(remote(region.addr), region.size); } static void snapshot_ignore_restore(simgrid::mc::Snapshot* snapshot)