Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : abort if popen failed
[simgrid.git] / src / mc / mc_checkpoint.c
index df6c9c4..7959f8a 100644 (file)
@@ -245,7 +245,8 @@ mc_snapshot_t MC_take_snapshot()
     }
   }
 
-  snapshot->stacks = take_snapshot_stacks(heap);
+  if(_surf_mc_stateful > 0 || _surf_mc_property_file)
+    snapshot->stacks = take_snapshot_stacks(heap);
   
   free_memory_map(maps);
 
@@ -296,8 +297,10 @@ void get_libsimgrid_plt_section(){
 
   fp = popen(command, "r");
 
-  if(fp == NULL)
+  if(fp == NULL){
     perror("popen failed");
+    xbt_abort();
+  }
 
   while ((read = getline(&line, &n, fp)) != -1 && plt_not_found == 1) {
 
@@ -352,8 +355,10 @@ void get_binary_plt_section(){
 
   fp = popen(command, "r");
 
-  if(fp == NULL)
+  if(fp == NULL){
     perror("popen failed");
+    xbt_abort();
+  }
 
   while ((read = getline(&line, &n, fp)) != -1 && plt_not_found == 1) {