From: Gabriel Corona Date: Mon, 6 Jan 2014 13:58:48 +0000 (+0100) Subject: [mc] Fix bug in recurive call of compare_heap_area_with_type X-Git-Tag: v3_11~199^2~2^2~35^2~33 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/11184aa25b07f65333ded72f28fe0ba54ea6c282 [mc] Fix bug in recurive call of compare_heap_area_with_type When comparing arrays, the number of elements of the array was passed instead of the size of the elements. --- diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index 49c5968780..101b9f4ff5 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -842,9 +842,9 @@ static int compare_heap_area_with_type(void *real_area1, void *real_area2, void } for(i=0; isize; i++){ if(switch_types) - res = compare_heap_area_with_type((char *)real_area1 + (i*elm_size), (char *)real_area2 + (i*elm_size), (char *)area1 + (i*elm_size), (char *)area2 + (i*elm_size), previous, other_types, all_types, type->dw_type_id, type->size, check_ignore, pointer_level); + res = compare_heap_area_with_type((char *)real_area1 + (i*elm_size), (char *)real_area2 + (i*elm_size), (char *)area1 + (i*elm_size), (char *)area2 + (i*elm_size), previous, other_types, all_types, type->dw_type_id, subtype->size, check_ignore, pointer_level); else - res = compare_heap_area_with_type((char *)real_area1 + (i*elm_size), (char *)real_area2 + (i*elm_size), (char *)area1 + (i*elm_size), (char *)area2 + (i*elm_size), previous, all_types, other_types, type->dw_type_id, type->size, check_ignore, pointer_level); + res = compare_heap_area_with_type((char *)real_area1 + (i*elm_size), (char *)real_area2 + (i*elm_size), (char *)area1 + (i*elm_size), (char *)area2 + (i*elm_size), previous, all_types, other_types, type->dw_type_id, subtype->size, check_ignore, pointer_level); if(res == 1) return res; }