From: Gabriel Corona Date: Fri, 12 Feb 2016 13:20:53 +0000 (+0100) Subject: [mc] Fix testall X-Git-Tag: v3_13~856 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/12bb2ab8248bff29a4305780636a4c859693340d [mc] Fix testall --- diff --git a/src/mc/ModelChecker.cpp b/src/mc/ModelChecker.cpp index 5c947d25a6..be6f39b164 100644 --- a/src/mc/ModelChecker.cpp +++ b/src/mc/ModelChecker.cpp @@ -54,6 +54,7 @@ ModelChecker::ModelChecker(pid_t pid, int socket) : page_store_(500), parent_snapshot_(nullptr) { + process_ = std::unique_ptr(new Process(pid_, socket_)); } ModelChecker::~ModelChecker() @@ -109,8 +110,7 @@ void ModelChecker::start() if (res < 0 || !WIFSTOPPED(status) || WSTOPSIG(status) != SIGSTOP) xbt_die("Could not wait model-checked process"); - assert(process_ == nullptr); - process_ = std::unique_ptr(new Process(pid_, socket_)); + // TODO, avoid direct dependency on sg_cfg process_->privatized(sg_cfg_get_boolean("smpi/privatize_global_variables")); diff --git a/src/mc/RegionSnapshot.cpp b/src/mc/RegionSnapshot.cpp index d3f49de652..53a34f4a42 100644 --- a/src/mc/RegionSnapshot.cpp +++ b/src/mc/RegionSnapshot.cpp @@ -104,6 +104,7 @@ RegionSnapshot sparse_region(RegionType region_type, RegionSnapshot const* ref_region) { simgrid::mc::Process* process = &mc_model_checker->process(); + assert(process != NULL); bool use_soft_dirty = _sg_mc_sparse_checkpoint && _sg_mc_soft_dirty && ref_region != nullptr