/* This program is free software; you can redistribute it and/or modify it
* under the terms of the license (GNU LGPL) which comes with this package. */
+#define __STDC_FORMAT_MACROS
#include <inttypes.h>
#include <boost/unordered_set.hpp>
namespace boost {
template<>
struct hash<s_pointers_pair> {
- typedef uint64_t result_type;
+ typedef uintptr_t result_type;
result_type operator()(s_pointers_pair const& x) const {
- return (result_type) x.p1 ^ (result_type) x.p2 << 8;
+ return (result_type) x.p1 ^
+ ((result_type) x.p2 << 8 | (result_type) x.p2 >> (8*sizeof(uintptr_t) - 8));
}
};
}
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;
}
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;
mc_mem_region_t r2, mc_snapshot_t snapshot1,
mc_snapshot_t snapshot2)
{
+ xbt_assert(r1 && r2, "Missing region.");
struct mc_compare_state state;
xbt_dynar_t variables;