From 6992bd8145f706de66cefa592135dcb0629593d4 Mon Sep 17 00:00:00 2001 From: Gabriel Corona Date: Wed, 10 Feb 2016 17:45:30 +0100 Subject: [PATCH] [mc] Hack to workaround weird/unexpected DWARF MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/mc/mc_diff.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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); -- 2.20.1