public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
* [PATCH users/roland/osabi-assert] Do not crash on unrecognized GNU .note.ABI-tag values
@ 2015-05-29  0:21 Roland McGrath
  2015-05-29 10:07 ` Pedro Alves
  0 siblings, 1 reply; 10+ messages in thread
From: Roland McGrath @ 2015-05-29  0:21 UTC (permalink / raw)
  To: GDB

Diagnosis of unexpected input (in this case, in an executable file)
should not crash as if it were a bug in GDB.  This one is especially
harmless, since the "osabi" has so little effect on anything.

OK for trunk and 7.9 branch?


Thanks,
Roland


gdb/
2015-05-28  Roland McGrath  <mcgrathr@google.com>

	* osabi.c (generic_elf_osabi_sniff_abi_tag_sections): Use warning
	rather than internal_error for an unrecognized value.

diff --git a/gdb/osabi.c b/gdb/osabi.c
index 9d90c55..abf4bd4 100644
--- a/gdb/osabi.c
+++ b/gdb/osabi.c
@@ -493,10 +493,9 @@ generic_elf_osabi_sniff_abi_tag_sections (bfd
*abfd, asection *sect, void *obj)
 	      break;

 	    default:
-	      internal_error (__FILE__, __LINE__,
-			      _("generic_elf_osabi_sniff_abi_tag_sections: "
-				"unknown OS number %d"),
-			      abi_tag);
+              warning ("GNU ABI tag value %u unrecognized.\n", abi_tag);
+              *osabi = GDB_OSABI_UNKNOWN;
+              break;
 	    }
 	  return;
 	}

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2015-05-29 18:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-05-29  0:21 [PATCH users/roland/osabi-assert] Do not crash on unrecognized GNU .note.ABI-tag values Roland McGrath
2015-05-29 10:07 ` Pedro Alves
2015-05-29 16:26   ` Doug Evans
2015-05-29 16:29     ` Pedro Alves
2015-05-29 16:32   ` Roland McGrath
2015-05-29 17:00     ` Pedro Alves
2015-05-29 17:34       ` Roland McGrath
2015-05-29 17:36         ` Pedro Alves
2015-05-29 18:21           ` Roland McGrath
2015-05-29 18:24             ` Pedro Alves

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