From: Gabriel Corona Date: Fri, 20 Dec 2013 11:58:13 +0000 (+0100) Subject: [mc] Fix bug when parsing /proc/self/maps X-Git-Tag: v3_11~199^2~2^2~35^2~34 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/32c12a6de1eccaea2504e00c29d06f2f5f41a000 [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. --- 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);