diff options
author | Nick Clifton <nickc@redhat.com> | 2022-06-27 13:43:02 +0100 |
---|---|---|
committer | Nick Clifton <nickc@redhat.com> | 2022-06-27 13:43:02 +0100 |
commit | e3e5ae049371a27fd1737aba946fe26d06e029b5 (patch) | |
tree | 5fec20e7e1078463e9e42cdf91b2334a1d388423 /binutils/dwarf.c | |
parent | e98e7d9a70dcc987bff0e925f20b78cd4a2979ed (diff) | |
download | binutils-e3e5ae049371a27fd1737aba946fe26d06e029b5.zip binutils-e3e5ae049371a27fd1737aba946fe26d06e029b5.tar.gz binutils-e3e5ae049371a27fd1737aba946fe26d06e029b5.tar.bz2 |
Replace a run-time assertion failure with a warning message when parsing corrupt DWARF data.
PR 29289
* dwarf.c (display_debug_names): Replace assert with a warning
message.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 37b477b..b99c569 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -10194,7 +10194,12 @@ display_debug_names (struct dwarf_section *section, void *file) printf (_("Out of %lu items there are %zu bucket clashes" " (longest of %zu entries).\n"), (unsigned long) name_count, hash_clash_count, longest_clash); - assert (name_count == buckets_filled + hash_clash_count); + + if (name_count != buckets_filled + hash_clash_count) + warn (_("The name_count (%lu) is not the same as the used bucket_count (%lu) + the hash clash count (%lu)"), + (unsigned long) name_count, + (unsigned long) buckets_filled, + (unsigned long) hash_clash_count); } struct abbrev_lookup_entry |