* [PATCH, applied] dwarf-reader: compare_dies sometimes compares empty formal parms
@ 2022-06-20 15:23 Dodji Seketeli
0 siblings, 0 replies; only message in thread
From: Dodji Seketeli @ 2022-06-20 15:23 UTC (permalink / raw)
To: libabigail
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(-)
diff --git a/src/abg-dwarf-reader.cc b/src/abg-dwarf-reader.cc
index d43364f1..5cbf3e44 100644
--- a/src/abg-dwarf-reader.cc
+++ b/src/abg-dwarf-reader.cc
@@ -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;
--
2.36.1
--
Dodji
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-06-20 15:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-20 15:23 [PATCH, applied] dwarf-reader: compare_dies sometimes compares empty formal parms Dodji Seketeli
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).