Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Xml platform cleaning teshsuite/msg
[simgrid.git] / src / mc / mc_compare.cpp
index 8d0f597..9a57316 100644 (file)
@@ -107,7 +107,7 @@ static int compare_areas_with_type(struct mc_compare_state& state,
     void* data1 =
       mc_snapshot_read_region(real_area1, region1, alloca(type->byte_size), type->byte_size);
     void* data2 =
-      mc_snapshot_read_region(real_area2, region1, alloca(type->byte_size), type->byte_size);
+      mc_snapshot_read_region(real_area2, region2, alloca(type->byte_size), type->byte_size);
     return (memcmp(data1, data2, type->byte_size) != 0);
     break;
   }
@@ -171,6 +171,8 @@ static int compare_areas_with_type(struct mc_compare_state& state,
 
       if (addr_pointed1 == NULL && addr_pointed2 == NULL)
         return 0;
+      if (addr_pointed1 == NULL || addr_pointed2 == NULL)
+        return 1;
       if (!add_compared_pointers(state, addr_pointed1, addr_pointed2))
         return 0;