Bug 571551 - SIGBUS in reloc code on SPARC
Summary: SIGBUS in reloc code on SPARC
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: glibc
Version: 12
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Andreas Schwab
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2010-03-08 20:12 UTC by Dennis Gilmore
Modified: 2010-03-14 13:44 UTC (History)
4 users (show)

Fixed In Version: glibc-2.11.90-15
Clone Of:
Environment:
Last Closed: 2010-03-14 13:44:35 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
Patch to fix sparc64 TLS relocation handling in glibc. (1.66 KB, patch)
2010-03-09 11:48 UTC, David Miller
no flags Details | Diff

Description Dennis Gilmore 2010-03-08 20:12:53 UTC
Description of problem:

running a failed prelink test in gdb i get 
[mockbuild@daedalus testsuite]$ LD_LIBRARY_PATH=. gdb ./tls3
GNU gdb (GDB) Fedora (7.0-3.fc12)
Copyright (C) 2009 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.  Type "show copying"
and "show warranty" for details.
This GDB was configured as "sparc64-redhat-linux-gnu".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from /builddir/build/BUILD/prelink/testsuite/tls3...(no debugging symbols found)...done.
(gdb) run
Starting program: /builddir/build/BUILD/prelink/testsuite/tls3 

Program received signal SIGBUS, Bus error.
elf_machine_rela (sym=0xfffff80100128228, reloc_addr_arg=<value optimized out>, version=<value optimized out>, reloc=<value optimized out>, map=<value optimized out>)
    at ../sysdeps/sparc/sparc64/dl-machine.h:629
629                 *reloc_addr = (*reloc_addr & 0xffffe000) | (value & 0x3ff)



Version-Release number of selected component (if applicable):

glibc-2.11.1-2.sparc64.rpm

How reproducible:
always

Steps to Reproduce:
1. run testsuite fro prelink
2.
3.
  
Actual results:
SIGBUS

Expected results:
completion or process 


Additional info:

Comment 1 David Miller 2010-03-09 11:35:43 UTC
I can't believe this has never been triggered before :-)

It's relocating an instruction, but it's using 64-bit loads and stores to
do so, which won't work since instructions are 4 bytes in size and 4 byte
aligned.

I'll attach a fix against GLIBC mainline after I do a build test, it should
apply to just about anything with perhaps some minor fuzz.

Comment 2 David Miller 2010-03-09 11:45:11 UTC
BTW, reloc8.sh and reloc9.sh are also going to fail on 64-bit sparc.

"sparc*" needs to be added to the list of platforms those two tests
check to avoid using the no-copy-relocs option.

Comment 3 David Miller 2010-03-09 11:48:47 UTC
Created attachment 398770 [details]
Patch to fix sparc64 TLS relocation handling in glibc.

Comment 4 Fedora Update System 2010-03-09 16:35:10 UTC
glibc-2.11.90-15 has been submitted as an update for Fedora 13.
http://admin.fedoraproject.org/updates/glibc-2.11.90-15

Comment 5 Fedora Update System 2010-03-11 07:17:06 UTC
glibc-2.11.90-15 has been pushed to the Fedora 13 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update glibc'.  You can provide feedback for this update here: http://admin.fedoraproject.org/updates/glibc-2.11.90-15

Comment 6 Fedora Update System 2010-03-14 13:43:59 UTC
glibc-2.11.90-15 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


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