This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
linker segfaults after PR ld/15146 fix
- From: Sandra Loosemore <sandra at codesourcery dot com>
- To: <hongjiu dot lu at intel dot com>, "binutils at sourceware dot org" <binutils at sourceware dot org>
- Date: Mon, 18 Feb 2013 20:23:48 -0700
- Subject: linker segfaults after PR ld/15146 fix
After this commit
http://sourceware.org/ml/binutils-cvs/2013-02/msg00128.html
I'm now seeing segfaults in plugin_notice while doing testing of (our
local branch of) GCC 4.7 on arm-none-eabi.... basically all LTO tests
are falling over.
Looks like it needs a null check on h->u.undef.abfd before dereferencing
it, consistently with the change in the same patch to bfd/elflink.c. WDYT?
-Sandra
2013-02-18 Sandra Loosemore <sandra@codesourcery.com>
PR ld/15146
ld/
* plugin.c (plugin_notice): Add null check before dereferencing
pointer.
1000c1000,1001
< && (h->u.undef.abfd->flags & BFD_PLUGIN) != 0)
---
> && (h->u.undef.abfd == NULL
> || (h->u.undef.abfd->flags & BFD_PLUGIN) != 0))