Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix testall
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 12 Feb 2016 13:20:53 +0000 (14:20 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 12 Feb 2016 13:20:53 +0000 (14:20 +0100)
src/mc/ModelChecker.cpp
src/mc/RegionSnapshot.cpp

index 5c947d2..be6f39b 100644 (file)
@@ -54,6 +54,7 @@ ModelChecker::ModelChecker(pid_t pid, int socket) :
   page_store_(500),
   parent_snapshot_(nullptr)
 {
+  process_ = std::unique_ptr<Process>(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<Process>(new Process(pid_, socket_));
+
   // TODO, avoid direct dependency on sg_cfg
   process_->privatized(sg_cfg_get_boolean("smpi/privatize_global_variables"));
 
index d3f49de..53a34f4 100644 (file)
@@ -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