[applied] dwarf-reader: compare_dies sometimes compares empty formal parms
Commit Message
Hello,
compare_dies sometimes compares uninitialized DIE structs, which leads
to junk down the road. Fixed thus.
* src/abg-dwarf-reader.cc (compare_dies): Don't try to compare
formal parameters if there is none.
Signed-off-by: Dodji Seketeli <dodji@redhat.com>
Applied to master.
---
src/abg-dwarf-reader.cc | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
@@ -10634,9 +10634,10 @@ compare_dies(const read_context& ctxt,
bool l_type_is_void = !die_die_attribute(l, DW_AT_type, l_type);
bool r_type_is_void = !die_die_attribute(r, DW_AT_type, r_type);
if ((l_type_is_void != r_type_is_void)
- || !compare_dies(ctxt, &l_type, &r_type,
- aggregates_being_compared,
- update_canonical_dies_on_the_fly))
+ || (!l_type_is_void
+ && !compare_dies(ctxt, &l_type, &r_type,
+ aggregates_being_compared,
+ update_canonical_dies_on_the_fly)))
result = false;
}
break;