This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Question: BFD_FAIL
- From: msnyder at sonic dot net
- To: binutils at sourceware dot org
- Date: Wed, 25 Jul 2007 11:25:37 -0700 (PDT)
- Subject: Question: BFD_FAIL
Hi all,
Are we meant to assume that BFD_FAIL does not return?
It calls bfd_assert, which calls (*_bfd_error_handler), which is
overrideable -- but the default error handler in bfd.c does return.
Existing code seems inconsistant, even within the same module.
Some invocations are followed by a break or a return, others aren't.
I'm looking at a case in bfd.c where, if it does return, we will
immediately dereference a null pointer:
void
_bfd_set_gp_value (bfd *abfd, bfd_vma v)
{
if (! abfd)
BFD_FAIL ();
if (abfd->format != bfd_object)
return;