X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/blobdiff_plain/848de43e8b662c557853f4466115937687e8fd63..ef6f2ce6c7e898f90da6f5415d08a0e87c6853ba:/src/mc/mc_compare.cpp?ds=sidebyside diff --git a/src/mc/mc_compare.cpp b/src/mc/mc_compare.cpp index 0067028319..9a573169b1 100644 --- a/src/mc/mc_compare.cpp +++ b/src/mc/mc_compare.cpp @@ -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; @@ -247,8 +249,7 @@ static int compare_global_variables(int region_type, mc_mem_region_t r1, mc_mem_region_t r2, mc_snapshot_t snapshot1, mc_snapshot_t snapshot2) { - xbt_assert(r1 && r2, - "Missing region. Did you enable SMPI privatisation? It is not compatible with state comparison."); + xbt_assert(r1 && r2, "Missing region."); struct mc_compare_state state; xbt_dynar_t variables;