Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge branch 'mc-fix' into mc-fastsnapshot
[simgrid.git] / src / mc / mc_compare.cpp
index ada39e6..bf0a7ec 100644 (file)
@@ -106,7 +106,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;
   }
@@ -160,9 +160,8 @@ static int compare_areas_with_type(struct mc_compare_state& state,
   case DW_TAG_reference_type:
   case DW_TAG_rvalue_reference_type:
   {
-    void* temp;
-    void* addr_pointed1 = *(void**) mc_snapshot_read_region(real_area1, region1, &temp, sizeof(void**));
-    void* addr_pointed2 = *(void**) mc_snapshot_read_region(real_area2, region2, &temp, sizeof(void**));
+    void* addr_pointed1 = mc_snapshot_read_pointer_region(real_area1, region1);
+    void* addr_pointed2 = mc_snapshot_read_pointer_region(real_area2, region2);
 
     if (type->subtype && type->subtype->type == DW_TAG_subroutine_type) {
       return (addr_pointed1 != addr_pointed2);