public inbox for binutils-cvs@sourceware.org
help / color / mirror / Atom feed
* [binutils-gdb] Replace a run-time assertion failure with a warning message when parsing corrupt DWARF data.
@ 2022-06-27 12:43 Nick Clifton
  0 siblings, 0 replies; only message in thread
From: Nick Clifton @ 2022-06-27 12:43 UTC (permalink / raw)
  To: bfd-cvs

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=e3e5ae049371a27fd1737aba946fe26d06e029b5

commit e3e5ae049371a27fd1737aba946fe26d06e029b5
Author: Nick Clifton <nickc@redhat.com>
Date:   Mon Jun 27 13:43:02 2022 +0100

    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.

Diff:
---
 binutils/ChangeLog | 6 ++++++
 binutils/dwarf.c   | 7 ++++++-
 2 files changed, 12 insertions(+), 1 deletion(-)

diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index 7c547e67eab..c543e5b9d1b 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2022-06-27  Nick Clifton  <nickc@redhat.com>
+
+	PR 29289
+	* dwarf.c (display_debug_names): Replace assert with a warning
+	message.
+
 2022-06-27  Nick Clifton  <nickc@redhat.com>
 
 	PR 29290
diff --git a/binutils/dwarf.c b/binutils/dwarf.c
index 37b477b886d..b99c56987da 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


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-06-27 12:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-27 12:43 [binutils-gdb] Replace a run-time assertion failure with a warning message when parsing corrupt DWARF data Nick Clifton

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).