Bug 872 - strip segv
Summary: strip segv
Status: RESOLVED FIXED
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.16
: P2 normal
Target Milestone: ---
Assignee: unassigned
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-25 07:31 UTC by Pawel Sikora
Modified: 2005-04-25 14:50 UTC (History)
2 users (show)

See Also:
Host: i686-pld-linux
Target: i686-pld-linux
Build: i686-pld-linux
Last reconfirmed:


Attachments
testcase (87.00 KB, application/octet-stream)
2005-04-25 07:34 UTC, Pawel Sikora
Details
Initialise obfd field of name_list structure. (287 bytes, patch)
2005-04-25 14:20 UTC, Nick Clifton
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pawel Sikora 2005-04-25 07:31:22 UTC
(gdb) set args --strip-debug -R.note -R.comment libsasl2.a
(gdb) r
Starting program: /usr/bin/strip --strip-debug -R.note -R.comment libsasl2.a
/usr/bin/strip: st8CY7QL/libpgsql.la: Invalid operation

Program received signal SIGSEGV, Segmentation fault.
0x40039561 in bfd_close () from /usr/lib/libbfd-2.16.90.0.1.so
Comment 1 Pawel Sikora 2005-04-25 07:34:00 UTC
Created attachment 463 [details]
testcase
Comment 2 Nick Clifton 2005-04-25 14:20:43 UTC
Created attachment 464 [details]
Initialise obfd field of name_list structure.
Comment 3 Nick Clifton 2005-04-25 14:26:25 UTC
Hi  Pawe³,

  The seg fault was caused by a silly fault in the name_list handling code
inside the copy_archive() function.  The 'obfd' field was not being initialised
to a proper value.  The attached patch fixes this problem and allows your test
case to run, although it still generates the "Invalid operation" message.

Do you have any problems with this patch or shall I close this PR ?

Cheers
  Nick

binutils/ChangeLog
2005-04-25  Nick Clifton  <nickc@redhat.com>

	PR872
	* objcopy.c (copy_archive): Initialise 'obfd' field of new
	name_list structure.
	
Comment 4 Pawel Sikora 2005-04-25 14:44:18 UTC
patch works. problem solved.
Comment 5 Nick Clifton 2005-04-25 14:50:47 UTC
Patch applied - case closed