Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
model-checker : fix comparison of local variables
[simgrid.git] / src / mc / mc_compare.c
index 5d8ac72..1037bf8 100644 (file)
@@ -221,7 +221,7 @@ static int compare_global_variables(int region_type, mc_mem_region_t r1, mc_mem_
 
   if(!compared_pointers){
     compared_pointers = xbt_dynar_new(sizeof(pointers_pair_t), NULL);
-    MC_ignore_global_variable("compared_pointers", 1);
+    MC_ignore_global_variable("compared_pointers");
   }else{
     xbt_dynar_reset(compared_pointers);
   }
@@ -270,7 +270,7 @@ static int compare_local_variables(mc_snapshot_stack_t stack1, mc_snapshot_stack
 
   if(!compared_pointers){
     compared_pointers = xbt_dynar_new(sizeof(pointers_pair_t), NULL);
-    MC_ignore_global_variable("compared_pointers", 1);
+    MC_ignore_global_variable("compared_pointers");
   }else{
     xbt_dynar_reset(compared_pointers);
   }
@@ -293,8 +293,8 @@ static int compare_local_variables(mc_snapshot_stack_t stack1, mc_snapshot_stack
         res = compare_areas_with_type( (char *)heap1 + offset1, (char *)heap2 + offset2, mc_variables_type_libsimgrid, mc_variables_type_binary, current_var1->type, 0, 1, start_data_libsimgrid, 0l);
       else
         res = compare_areas_with_type( (char *)heap1 + offset1, (char *)heap2 + offset2, mc_variables_type_binary, mc_variables_type_libsimgrid, current_var1->type, 0, 2, start_data_binary, 0l);
-      if(res != 0){
-        XBT_VERB("Local variable %s in frame %s  is different between snapshots", current_var1->name, current_var1->frame);
+      if(res == 1){
+        XBT_VERB("Local variable %s (%p - %p)  in frame %s  is different between snapshots", current_var1->name, (char *)heap1 + offset1, (char *)heap2 + offset2, current_var1->frame);
         return res;
       }
       cursor++;
@@ -621,7 +621,7 @@ int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2){
 
 int MC_compare_snapshots(void *s1, void *s2){
   
-  MC_ignore_local_variable("self", "simcall_BODY_mc_snapshot", 1);
+  MC_ignore_local_variable("self", "simcall_BODY_mc_snapshot");
  
   return simcall_mc_compare_snapshots(s1, s2);