This is the mail archive of the binutils@sourceware.org mailing list for the binutils project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]