This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] bfd/i386linux.c, linux_tally_symbols, Check for null return.
- From: Alan Modra <amodra at gmail dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>, "binutils at sourceware dot org" <binutils at sourceware dot org>, rth at redhat dot com
- Date: Mon, 7 Mar 2011 17:36:17 +1030
- Subject: Re: [RFA] bfd/i386linux.c, linux_tally_symbols, Check for null return.
- References: <4D74165C.5090101@vmware.com>
On Sun, Mar 06, 2011 at 03:18:52PM -0800, Michael Snyder wrote:
> Index: i386linux.c
> ===================================================================
> RCS file: /cvs/src/src/bfd/i386linux.c,v
> retrieving revision 1.23
> diff -u -p -r1.23 i386linux.c
> --- i386linux.c 2 Oct 2009 14:40:41 -0000 1.23
> +++ i386linux.c 6 Mar 2011 23:13:55 -0000
> @@ -491,7 +491,7 @@ linux_tally_symbols (h, data)
> use an indirect symbol to get to the real symbol, we add the
> fixup anyway, since there are cases where these symbols come
> from different shared libraries */
> - if (h1 != NULL
> + if (h1 != NULL && h2 != NULL
> && (((h1->root.root.type == bfd_link_hash_defined
> || h1->root.root.type == bfd_link_hash_defweak)
> && ! bfd_is_abs_section (h1->root.root.u.def.section))
h2 can't be NULL without h1 being NULL, so the patch isn't needed.
--
Alan Modra
Australia Development Lab, IBM