From 32c12a6de1eccaea2504e00c29d06f2f5f41a000 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Fri, 20 Dec 2013 12:58:13 +0100 Subject: [PATCH] [mc] Fix bug when parsing /proc/self/maps Sometimes, the heap is not found by the MC : * the MC expects the heap to be anonymous/unlabelled in /proc/self/maps; * the heap may be labelled as as [stack:$tid] in /proc/self/maps at some instants of the execution of the program because the tasks stacks are allocated on the heap. --- src/mc/mc_checkpoint.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mc/mc_checkpoint.c b/src/mc/mc_checkpoint.c index 2b2fe9d033..42c23fd816 100644 --- a/src/mc/mc_checkpoint.c +++ b/src/mc/mc_checkpoint.c @@ -177,7 +177,7 @@ static void MC_get_memory_regions(mc_snapshot_t snapshot){ } tok = strtok(lfields[0], "-"); start_addr1 = (void *)strtoul(tok, NULL, 16); - if(lfields[1][1] == 'w' && lfields[5] == NULL){ + if(lfields[1][1] == 'w'){ if(start_addr1 == std_heap){ /* Std_heap ? */ tok = strtok(NULL, "-"); end_addr = (void *)strtoul(tok, NULL, 16); -- 2.20.1