continue;
}else{
if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose)){
- XBT_VERB("Different global variable in libsimgrid : %s", current_var->name);
+ XBT_VERB("Different global variable in libsimgrid : %s at addresses %p - %p (size = %zu)", current_var->name, (char *)d1+offset, (char *)d2+offset, current_var->size);
}
return 1;
}
return snapshot_compare(s1, s2, NULL, NULL);
}
+int get_heap_region_index(mc_snapshot_t s){
+ int i =0;
+ while(i < s->num_reg){
+ switch(s->regions[i]->type){
+ case 0:
+ return i;
+ break;
+ default:
+ i++;
+ break;
+ }
+ }
+ return -1;
+}
+
int snapshot_compare(mc_snapshot_t s1, mc_snapshot_t s2, mc_comparison_times_t ct1, mc_comparison_times_t ct2){
int raw_mem = (mmalloc_get_current_heap() == raw_heap);
s_tokens2 = xbt_str_split(xbt_dynar_get_as(tokens2, cursor, char *), "=");
if(xbt_dynar_length(s_tokens1) > 1 && xbt_dynar_length(s_tokens2) > 1){
if((strcmp(xbt_dynar_get_as(s_tokens1, 0, char *), "ip") == 0) && (strcmp(xbt_dynar_get_as(s_tokens2, 0, char *), "ip") == 0)){
- ip1 = strdup(xbt_dynar_get_as(s_tokens1, 1, char *));
- ip2 = strdup(xbt_dynar_get_as(s_tokens2, 1, char *));
- /*if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
- XBT_VERB("Instruction pointer : %s, Instruction pointer : %s", ip1, ip2);*/
+ ip1 = xbt_dynar_get_as(s_tokens1, 1, char *);
+ ip2 = xbt_dynar_get_as(s_tokens2, 1, char *);
}
if(strcmp(xbt_dynar_get_as(s_tokens1, 1, char *), xbt_dynar_get_as(s_tokens2, 1, char *)) != 0){
/* Ignore this variable ? */
addr2 = (void *) strtoul(xbt_dynar_get_as(s_tokens2, 1, char *), NULL, 16);
if(is_heap_equality(heap_equals, addr1, addr2) == 0){
if(XBT_LOG_ISENABLED(mc_compare, xbt_log_priority_verbose))
- XBT_VERB("Variable %s is different between stacks : %s - %s", xbt_dynar_get_as(s_tokens1, 0, char *), xbt_dynar_get_as(s_tokens1, 1, char *), xbt_dynar_get_as(s_tokens2, 1, char *));
+ XBT_VERB("Variable %s is different between stacks in %s : %s - %s", xbt_dynar_get_as(s_tokens1, 0, char *), ip1, xbt_dynar_get_as(s_tokens1, 1, char *), xbt_dynar_get_as(s_tokens2, 1, char *));
xbt_dynar_free(&s_tokens1);
xbt_dynar_free(&s_tokens2);
+ xbt_dynar_free(&tokens1);
+ xbt_dynar_free(&tokens2);
return 1;
}
}
}
int MC_compare_snapshots(void *s1, void *s2){
+
+ MC_ignore_stack("self", "simcall_BODY_mc_snapshot");
return simcall_mc_compare_snapshots(s1, s2);