From: Gabriel Corona Date: Tue, 25 Feb 2014 11:49:58 +0000 (+0100) Subject: Merge bugfix from branch mc-refactor X-Git-Tag: v3_11~199^2~2^2~19^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6399b037de5d22e37584d156b87f293dbfa16df7?hp=--cc Merge bugfix from branch mc-refactor Conflicts: src/xbt/mmalloc/mm_diff.c --- 6399b037de5d22e37584d156b87f293dbfa16df7 diff --cc src/xbt/mmalloc/mm_diff.c index ee02c18b49,58f2f75933..ec4c90cbb8 --- a/src/xbt/mmalloc/mm_diff.c +++ b/src/xbt/mmalloc/mm_diff.c @@@ -1014,26 -1023,26 +1014,26 @@@ int compare_heap_area(void *area1, void return 1; } - addr_block1 = ((void*) (((ADDR2UINT(block1)) - 1) * BLOCKSIZE + (char*)heapbase1)); - addr_block2 = ((void*) (((ADDR2UINT(block2)) - 1) * BLOCKSIZE + (char*)heapbase2)); + addr_block1 = ((void*) (((ADDR2UINT(block1)) - 1) * BLOCKSIZE + (char*)state->heapbase1)); + addr_block2 = ((void*) (((ADDR2UINT(block2)) - 1) * BLOCKSIZE + (char*)state->heapbase2)); - real_addr_block1 = ((void*) (((ADDR2UINT(block1)) - 1) * BLOCKSIZE + (char*)((xbt_mheap_t)s_heap)->heapbase)); - real_addr_block2 = ((void*) (((ADDR2UINT(block2)) - 1) * BLOCKSIZE + (char*)((xbt_mheap_t)s_heap)->heapbase)); + real_addr_block1 = ((void*) (((ADDR2UINT(block1)) - 1) * BLOCKSIZE + (char*)((xbt_mheap_t)state->s_heap)->heapbase)); + real_addr_block2 = ((void*) (((ADDR2UINT(block2)) - 1) * BLOCKSIZE + (char*)((xbt_mheap_t)state->s_heap)->heapbase)); if(type_id){ - type = xbt_dict_get_or_null(all_types, type_id); + type = xbt_dict_get_or_null(info->types, type_id); if(type->byte_size == 0){ - if(type->dw_type_id == NULL){ - type_desc = get_type_description(all_types, type->name); - if(type_desc) - type = xbt_dict_get_or_null(all_types, type_desc); + if(type->subtype == NULL){ + dw_type_t full_type = xbt_dict_get_or_null(info->types_by_name, type->name); + if(full_type) + type = full_type; else - type = xbt_dict_get_or_null(other_types, get_type_description(other_types, type->name)); + type = xbt_dict_get_or_null(other_info->types_by_name, type->name); }else{ - type = xbt_dict_get_or_null(all_types, type->dw_type_id); + type = type->subtype; } } - if((type->byte_size == DW_TAG_pointer_type) || ((type->type == DW_TAG_base_type) && type->name!=NULL && (!strcmp(type->name, "char")))) - if((type->type == e_dw_pointer_type) || ((type->type == e_dw_base_type) && (!strcmp(type->name, "char")))) ++ if((type->type == DW_TAG_pointer_type) || ((type->type == DW_TAG_base_type) && type->name!=NULL && (!strcmp(type->name, "char")))) type_size = -1; else type_size = type->byte_size;