From 11184aa25b07f65333ded72f28fe0ba54ea6c282 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Mon, 6 Jan 2014 14:58:48 +0100 Subject: [PATCH] [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. --- src/xbt/mmalloc/mm_diff.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } -- 2.20.1