From: Gabriel Corona Date: Wed, 10 Feb 2016 16:45:30 +0000 (+0100) Subject: [mc] Hack to workaround weird/unexpected DWARF X-Git-Tag: v3_13~872^2~2 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/6992bd8145f706de66cefa592135dcb0629593d4?ds=sidebyside [mc] Hack to workaround weird/unexpected DWARF For some reason, there is some DW_TAG_typedef without DW_AT_type: <1><538832>: Numéro d'abréviation : 111 (DW_TAG_typedef) <538833> DW_AT_name : (chaîne indirecte, décalage: 0x2292f3): gregset_t <538837> DW_AT_decl_file : 98 <538838> DW_AT_decl_line : 37 --- diff --git a/src/mc/mc_diff.cpp b/src/mc/mc_diff.cpp index 93fd25433e..89b5b544eb 100644 --- a/src/mc/mc_diff.cpp +++ b/src/mc/mc_diff.cpp @@ -758,9 +758,13 @@ static int compare_heap_area_with_type(struct s_mc_diff *state, int process_inde int pointer_level) { top: - if (is_stack(real_area1) && is_stack(real_area2)) + // HACK: This should not happen but in pratice, there is some + // DW_TAG_typedef without DW_AT_type. We should fix this somehow. + if (type == nullptr) return 0; + if (is_stack(real_area1) && is_stack(real_area2)) + return 0; ssize_t ignore1, ignore2; if ((check_ignore > 0) @@ -925,7 +929,7 @@ top: void *real_member2 = simgrid::dwarf::resolve_member( real_area2, type, &member, (simgrid::mc::AddressSpace*) snapshot2, process_index); res = - compare_heap_area_with_type(state, process_index, real_member1, real_member2, + compare_heap_area_with_type(state, process_index, real_member1, real_member2, snapshot1, snapshot2, previous, member.type, -1, check_ignore, 0);