From fde40a59529ab6874966a07ce928dc0897731678 Mon Sep 17 00:00:00 2001 From: Marion Guthmuller Date: Wed, 7 Nov 2012 15:47:43 +0100 Subject: [PATCH] model-checker : initialize global variable ignore_done and set its value to 0 at the end of heap comparison --- src/xbt/mmalloc/mm_diff.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index ab71565b07..4b4982367d 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -121,7 +121,7 @@ void *s_heap, *heapbase1, *heapbase2; malloc_info *heapinfo1, *heapinfo2; size_t heaplimit, heapsize1, heapsize2; -int ignore_done; +int ignore_done = 0; int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stack1, xbt_dynar_t *stack2, xbt_dynar_t *equals){ @@ -160,8 +160,6 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac int equal, res_compare; - ignore_done = 0; - /* Init equal information */ i1 = 1; @@ -548,6 +546,7 @@ int mmalloc_compare_heap(xbt_mheap_t heap1, xbt_mheap_t heap2, xbt_dynar_t *stac XBT_DEBUG("Different blocks or fragments in heap2 : %d", nb_diff2); xbt_dynar_free(&previous); + ignore_done = 0; return ((nb_diff1 > 0) || (nb_diff2 > 0)); -- 2.20.1