Bug 712166 - [abrt] binutils-2.20.51.0.7-8.fc14: __mempcpy_sse2: Process /usr/bin/ld.bfd was killed by signal 11 (SIGSEGV)
Summary: [abrt] binutils-2.20.51.0.7-8.fc14: __mempcpy_sse2: Process /usr/bin/ld.bfd w...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: binutils
Version: 14
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Nick Clifton
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:bc23071d75689594d3c87abb508...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-06-09 16:52 UTC by John Reiser
Modified: 2011-06-10 14:58 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-10 14:58:31 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (18.79 KB, text/plain)
2011-06-09 16:53 UTC, John Reiser
no flags Details
custom loader script "foo.lds" (8.20 KB, text/plain)
2011-06-09 16:56 UTC, John Reiser
no flags Details

Description John Reiser 2011-06-09 16:52:59 UTC
abrt version: 1.1.18
architecture: x86_64
Attached file: backtrace, 19242 bytes
cmdline: ld -m elf_i386 --script foo.lds hello.o -lc
component: binutils
Attached file: coredump, 2838528 bytes
crash_function: __mempcpy_sse2
executable: /usr/bin/ld.bfd
kernel: 2.6.35.13-91.fc14.x86_64
package: binutils-2.20.51.0.7-8.fc14
rating: 4
reason: Process /usr/bin/ld.bfd was killed by signal 11 (SIGSEGV)
release: Fedora release 14 (Laughlin)
time: 1307638218
uid: 500

How to reproduce
-----
1. Custom loader script, based on default script; will attach to BZ report if I can.
2.
3.

Comment 1 John Reiser 2011-06-09 16:53:01 UTC
Created attachment 503941 [details]
File: backtrace

Comment 2 John Reiser 2011-06-09 16:56:21 UTC
Created attachment 503942 [details]
custom loader script "foo.lds"

Customer linker script foo.lds was created by modifying the default script that was generated by "ld -m elf_i386 --verbose".

Comment 3 John Reiser 2011-06-10 03:14:47 UTC
Package: binutils-2.20.51.0.7-8.fc14
Architecture: x86_64
OS Release: Fedora release 14 (Laughlin)


How to reproduce
-----
1. custom linker script
2.
3.

Comment 4 John Reiser 2011-06-10 03:28:41 UTC
One of the instances of this crash is associated with statement order in SECTIONS.

The order:
  .note.gnu.build-id : { *(.note.gnu.build-id) } :note :text
  .interp         : { *(.interp) } :interp :text
works.

The reverse order:
  .interp         : { *(.interp) } :interp :text
  .note.gnu.build-id : { *(.note.gnu.build-id) } :note :text
crashes.

Comment 5 John Reiser 2011-06-10 03:32:39 UTC
(In reply to comment #4)
> The order:
>   .note.gnu.build-id : { *(.note.gnu.build-id) } :note :text
>   .interp         : { *(.interp) } :interp :text
> works.
> 
> The reverse order:
>   .interp         : { *(.interp) } :interp :text
>   .note.gnu.build-id : { *(.note.gnu.build-id) } :note :text
> crashes.

Both orders work when the _next_ statement is
  .hash           : { *(.hash) } :text
instead of
  .hash           : { *(.hash) }
with no ":text" on the end.

Comment 6 Nick Clifton 2011-06-10 14:58:31 UTC
Hi John,

  The underlying problem here is that your custom linker script is broken - it is using the ":note" syntax to assign the .note.gnu.build-id section to the "note" segment, but then it is not resetting the segment assignment for the sections that follow.  So they are all also put into the "note" segment as well, which changes their behaviour and generally breaks things.  As you noted adding ":text" to the .hash section assignment fixes this.

  The linker itself should not seg-fault upon such occurrence however, so I have applied a patch to the F14 and F15 binutils releases to fix this:

  binutils-2.20.51.0.7-9.fc14
  binutils-2.21.51.0.6-4.fc15

The patch is a slimmed down version of a larger patch that I have applied to the FSF binutils sources: http://sources.redhat.com/ml/binutils/2011-06/msg00142.html
I have not applied a patch to the rawhide version of binutils since the FSF version will appear in the next release of H.J.'s binutils tarball.

Cheers
  Nick


Note You need to log in before you can comment on or make changes to this bug.