From 3c05a7cdb90b7f5d0628daa4d430edf1f79e5132 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Mon, 3 Mar 2014 15:59:15 +0100 Subject: [PATCH] [mc] Add support for DW_TAG_unspecified_type (nullptr_t in C++11) --- src/mc/mc_compare.c | 6 ++++++ src/mc/mc_hash.c | 5 +++++ src/xbt/mmalloc/mm_diff.c | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/src/mc/mc_compare.c b/src/mc/mc_compare.c index 3b0cd331d0..ca2d81a020 100644 --- a/src/mc/mc_compare.c +++ b/src/mc/mc_compare.c @@ -107,6 +107,9 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in void *addr_pointed1, *addr_pointed2; switch(type->type){ + case DW_TAG_unspecified_type: + return 1; + case DW_TAG_base_type: case DW_TAG_enumeration_type: case DW_TAG_union_type: @@ -120,6 +123,9 @@ static int compare_areas_with_type(void *area1, void *area2, mc_object_info_t in case DW_TAG_array_type: subtype = type->subtype; switch(subtype->type){ + case DW_TAG_unspecified_type: + return 1; + case DW_TAG_base_type: case DW_TAG_enumeration_type: case DW_TAG_pointer_type: diff --git a/src/mc/mc_hash.c b/src/mc/mc_hash.c index 533548bff4..627e708a91 100644 --- a/src/mc/mc_hash.c +++ b/src/mc/mc_hash.c @@ -77,6 +77,11 @@ static void mc_hash_value(mc_hash_t* hash, mc_hashing_state* state, mc_object_in top: switch(type->type){ + + // Not relevant, do nothing: + case DW_TAG_unspecified_type: + return; + // Simple case, hash this has binary: case DW_TAG_base_type: case DW_TAG_enumeration_type: diff --git a/src/xbt/mmalloc/mm_diff.c b/src/xbt/mmalloc/mm_diff.c index 241568874b..c681d8b728 100644 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@ -781,6 +781,9 @@ static int compare_heap_area_with_type(struct s_mm_diff *state, void *real_area1 void *addr_pointed1, *addr_pointed2;; switch(type->type){ + case DW_TAG_unspecified_type: + return 1; + case DW_TAG_base_type: if(type->name!=NULL && strcmp(type->name, "char") == 0){ /* String, hence random (arbitrary ?) size */ if(real_area1 == real_area2) @@ -809,6 +812,9 @@ static int compare_heap_area_with_type(struct s_mm_diff *state, void *real_area1 case DW_TAG_array_type: subtype = xbt_dict_get_or_null(info->types, type->dw_type_id); switch(subtype->type){ + case DW_TAG_unspecified_type: + return 1; + case DW_TAG_base_type: case DW_TAG_enumeration_type: case DW_TAG_pointer_type: -- 2.20.1