Replace a run-time assertion failure with a warning message when parsing corrupt...
authorNick Clifton <nickc@redhat.com>
Mon, 27 Jun 2022 12:43:02 +0000 (13:43 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 27 Jun 2022 12:43:02 +0000 (13:43 +0100)
PR 29289
* dwarf.c (display_debug_names): Replace assert with a warning
message.

binutils/ChangeLog
binutils/dwarf.c

index 7c547e67eab8ee3e8110643b757c27e9a34fccfc..c543e5b9d1b14428a5a144748bbd3e7c2c1b79fb 100644 (file)
@@ -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
index 37b477b886d17b800d96b50d2fd96c725eb7d4aa..b99c56987da2134bd5384ad8be20437506356180 100644 (file)
@@ -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