#include "src/mc/mc_safety.h"
#include "src/mc/mc_liveness.h"
#include "src/mc/mc_private.h"
#include "src/mc/mc_safety.h"
#include "src/mc/mc_liveness.h"
#include "src/mc/mc_private.h"
return 1;
if (!state.compared_pointers.insert(
std::make_pair(addr_pointed1, addr_pointed2)).second)
return 1;
if (!state.compared_pointers.insert(
std::make_pair(addr_pointed1, addr_pointed2)).second)
return 1;
// The pointers are both in the heap:
return compare_heap_area(process_index, addr_pointed1, addr_pointed2, snapshot1,
return 1;
// The pointers are both in the heap:
return compare_heap_area(process_index, addr_pointed1, addr_pointed2, snapshot1,
- snapshot2, NULL, type->subtype, pointer_level);
+ snapshot2, nullptr, type->subtype, pointer_level);
(char *) current_var.address, snapshot2, r2,
bvariable_type, 0);
if (res == 1) {
(char *) current_var.address, snapshot2, r2,
bvariable_type, 0);
if (res == 1) {
XBT_VERB("Global variable %s (%p) is different between snapshots",
current_var.name.c_str(),
(char *) current_var.address);
XBT_VERB("Global variable %s (%p) is different between snapshots",
current_var.name.c_str(),
(char *) current_var.address);
current_var1 = &stack1->local_variables[cursor];
current_var2 = &stack1->local_variables[cursor];
if (current_var1->name != current_var2->name
current_var1 = &stack1->local_variables[cursor];
current_var2 = &stack1->local_variables[cursor];
if (current_var1->name != current_var2->name
|| current_var1->ip != current_var2->ip) {
// TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
XBT_VERB
|| current_var1->ip != current_var2->ip) {
// TODO, fix current_varX->subprogram->name to include name if DW_TAG_inlined_subprogram
XBT_VERB
XBT_VERB
("Local variable %s (%p - %p) in frame %s "
"is different between snapshots",
XBT_VERB
("Local variable %s (%p - %p) in frame %s "
"is different between snapshots",
XBT_VERB("(%d - %d) Different hash : 0x%" PRIx64 "--0x%" PRIx64, num1,
num2, s1->hash, s2->hash);
#ifndef MC_DEBUG
XBT_VERB("(%d - %d) Different hash : 0x%" PRIx64 "--0x%" PRIx64, num1,
num2, s1->hash, s2->hash);
#ifndef MC_DEBUG
XBT_VERB("(%d - %d) Different size used in stacks : %zu - %zu", num1,
num2, size_used1, size_used2);
#endif
XBT_VERB("(%d - %d) Different size used in stacks : %zu - %zu", num1,
num2, size_used1, size_used2);
#endif
xbt_mheap_t heap1 = (xbt_mheap_t)s1->read_bytes(
alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
remote(process->heap_address),
xbt_mheap_t heap1 = (xbt_mheap_t)s1->read_bytes(
alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
remote(process->heap_address),
xbt_mheap_t heap2 = (xbt_mheap_t)s2->read_bytes(
alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
remote(process->heap_address),
xbt_mheap_t heap2 = (xbt_mheap_t)s2->read_bytes(
alloca(sizeof(struct mdesc)), sizeof(struct mdesc),
remote(process->heap_address),
res_init = init_heap_information(heap1, heap2, &s1->to_ignore, &s2->to_ignore);
if (res_init == -1) {
#ifdef MC_DEBUG
res_init = init_heap_information(heap1, heap2, &s1->to_ignore, &s2->to_ignore);
if (res_init == -1) {
#ifdef MC_DEBUG
mc_snapshot_stack_t stack1, stack2;
while (cursor < s1->stacks.size()) {
stack1 = &s1->stacks[cursor];
mc_snapshot_stack_t stack1, stack2;
while (cursor < s1->stacks.size()) {
stack1 = &s1->stacks[cursor];
else diff_local =
compare_local_variables(stack1->process_index, s1, s2, stack1, stack2);
if (diff_local > 0) {
else diff_local =
compare_local_variables(stack1->process_index, s1, s2, stack1, stack2);
if (diff_local > 0) {
- compare_global_variables(region1->object_info( ), simgrid::mc::AddressSpace::Normal,
+ compare_global_variables(region1->object_info(),
+ simgrid::mc::ProcessIndexDisabled,
#ifdef MC_DEBUG
XBT_DEBUG("(%d - %d) Different global variables in %s",
num1, num2, name.c_str());
#ifdef MC_DEBUG
XBT_DEBUG("(%d - %d) Different global variables in %s",
num1, num2, name.c_str());