Bug 12364 - Segmentation fault in get_symbols
Summary: Segmentation fault in get_symbols
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: ld (show other bugs)
Version: 2.22
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-05 00:34 UTC by Dmitry Gorbachev
Modified: 2012-12-07 20:09 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments
testcase (63 bytes, text/plain)
2011-01-05 00:34 UTC, Dmitry Gorbachev
Details
backtrace (392 bytes, text/plain)
2011-01-05 00:35 UTC, Dmitry Gorbachev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dmitry Gorbachev 2011-01-05 00:34:34 UTC
Created attachment 5179 [details]
testcase

Compile with `gcc -flto -fuse-linker-plugin 1.c'
Comment 1 Dmitry Gorbachev 2011-01-05 00:35:38 UTC
Created attachment 5180 [details]
backtrace
Comment 2 Sourceware Commits 2011-01-05 14:25:29 UTC
CVSROOT:	/cvs/src
Module name:	src
Changes by:	hjl@sourceware.org	2011-01-05 14:25:26

Modified files:
	ld             : ChangeLog plugin.c 

Log message:
	Check if a bfd is NULL before accessing its flags field.
	
	2011-01-05  H.J. Lu  <hongjiu.lu@intel.com>
	
	PR ld/12364
	* plugin.c (get_symbols): Check if owner_sec->owner is NULL
	before accessing its flags field.

Patches:
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/ChangeLog.diff?cvsroot=src&r1=1.2264&r2=1.2265
http://sourceware.org/cgi-bin/cvsweb.cgi/src/ld/plugin.c.diff?cvsroot=src&r1=1.19&r2=1.20
Comment 3 H.J. Lu 2011-01-05 14:27:13 UTC
Fixed.
Comment 4 H.J. Lu 2012-12-07 20:09:19 UTC
Tracked by "LTO 6" test.