Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Fix VisitedState constructor
authorGabriel Corona <gabriel.corona@loria.fr>
Fri, 18 Mar 2016 08:18:12 +0000 (09:18 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Fri, 18 Mar 2016 13:13:44 +0000 (14:13 +0100)
The snapshot was not taken anymore.

src/mc/mc_safety.h
src/mc/mc_visited.cpp

index 689d93a..3969319 100644 (file)
@@ -31,11 +31,11 @@ extern XBT_PRIVATE simgrid::mc::ReductionMode reduction_mode;
 int modelcheck_safety(void);
 
 struct XBT_PRIVATE VisitedState {
-  simgrid::mc::Snapshot* system_state;
-  size_t heap_bytes_used;
-  int nb_processes;
-  int num;
-  int other_num; // dot_output for
+  simgrid::mc::Snapshot* system_state = nullptr;
+  size_t heap_bytes_used = 0;
+  int nb_processes = 0;
+  int num = 0;
+  int other_num = 0; // dot_output for
 
   VisitedState();
   ~VisitedState();
index e87f274..7844d4e 100644 (file)
@@ -55,6 +55,7 @@ VisitedState::VisitedState()
   this->nb_processes =
     mc_model_checker->process().simix_processes().size();
 
+  this->system_state = simgrid::mc::take_snapshot(mc_stats->expanded_states);
   this->num = mc_stats->expanded_states;
   this->other_num = -1;
 }