public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64
@ 2012-07-20 10:25 jengelh at medozas dot de
  2012-07-20 10:26 ` [Bug libc/14376] " jengelh at medozas dot de
                   ` (14 more replies)
  0 siblings, 15 replies; 16+ messages in thread
From: jengelh at medozas dot de @ 2012-07-20 10:25 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

             Bug #: 14376
           Summary: glibc-2.16 strdup Illegal Instruction on sparc64
           Product: glibc
           Version: 2.16
            Status: NEW
          Severity: normal
          Priority: P2
         Component: libc
        AssignedTo: unassigned@sourceware.org
        ReportedBy: jengelh@medozas.de
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


With glibc-2.16-75f0d3040a2c.tar.xz (openSUSE provided copy in
openSUSE:Factory:Staging:Glibc/glibc), strdup has a problem. (This did not
exist in glibc-2.16-75f0d3040a2c.tar.xz.

Mini-case:

ares:~/rpmbuild/BUILD/glibc-2.16/cc-base> cat strdup.c 
#include <string.h>

int main(void)
{
        strdup("foo");
        return 0;
}
ares:~/rpmbuild/BUILD/glibc-2.16/cc-base> gcc-4.7 strdup.c -o strdup -Wall
ares:~/rpmbuild/BUILD/glibc-2.16/cc-base> ./strdup
ares:~/rpmbuild/BUILD/glibc-2.16/cc-base> LC_ALL=C LANGUAGE=C
/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/elf/ld.so --library-path
/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/math:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/elf:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/dlfcn:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/nss:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/nis:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/rt:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/resolv:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/crypt:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/nptl
./strdup
Illegal instruction (core dumped)

I currently have no means to run gdb either when ld-2.16.so is use as interp
because of some weirdo error.


ares:~/rpmbuild/BUILD/glibc-2.16/cc-base> gdb elf/ld.so
seCould not find platform independent libraries <prefix>
Could not find platform dependent libraries <exec_prefix>
Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>]
'import site' failed; use -v for traceback
Traceback (most recent call last):
  File "<string>", line 27, in <module>
ImportError: No module named os.path
GNU gdb (GDB) SUSE (7.1-4.1)
Copyright (C) 2010 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-suse-linux".
For bug reporting instructions, please see:
<http://www.gnu.org/software/gdb/bugs/>...
Reading symbols from
/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/elf/ld.so...done.
(gdb) set environment LD_LIBRARY_PATH
/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/math:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/elf:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/dlfcn:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/nss:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/nis:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/rt:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/resolv:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/crypt:/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/nptl
(gdb) r
Starting program: /home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/elf/ld.so
/bin/bash: error while loading shared libraries:
/home/abuild/rpmbuild/BUILD/glibc-2.16/cc-base/libc.so.6: unexpected reloc type
0xf8
During startup program exited with code 127.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
@ 2012-07-20 10:26 ` jengelh at medozas dot de
  2012-07-20 10:35 ` aj at suse dot de
                   ` (13 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jengelh at medozas dot de @ 2012-07-20 10:26 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

Jan Engelhardt <jengelh at medozas dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |aj at suse dot de

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
  2012-07-20 10:26 ` [Bug libc/14376] " jengelh at medozas dot de
@ 2012-07-20 10:35 ` aj at suse dot de
  2012-07-20 10:43 ` aj at suse dot de
                   ` (12 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: aj at suse dot de @ 2012-07-20 10:35 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

Andreas Jaeger <aj at suse dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at sourceware    |davem at davemloft dot net
                   |dot org                     |

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
  2012-07-20 10:26 ` [Bug libc/14376] " jengelh at medozas dot de
  2012-07-20 10:35 ` aj at suse dot de
@ 2012-07-20 10:43 ` aj at suse dot de
  2012-07-24  1:38 ` davem at davemloft dot net
                   ` (11 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: aj at suse dot de @ 2012-07-20 10:43 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #1 from Andreas Jaeger <aj at suse dot de> 2012-07-20 10:43:17 UTC ---
Btw. strdup uses memcpy internally, and there are quite some changes between
2.15 and 2.16 in the memcpy implementation for SPARC64.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (2 preceding siblings ...)
  2012-07-20 10:43 ` aj at suse dot de
@ 2012-07-24  1:38 ` davem at davemloft dot net
  2012-07-24  1:43 ` carlos_odonell at mentor dot com
                   ` (10 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: davem at davemloft dot net @ 2012-07-24  1:38 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #2 from David S. Miller <davem at davemloft dot net> 2012-07-24 01:38:06 UTC ---
This obviously do not occur on my systems, otherwise I would have hit such a
simple failure already.

I definitely need more debugging information before I can figure out what the
problem is, and that means you need to sort out your inability to gdb this test
case before we can move further.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (3 preceding siblings ...)
  2012-07-24  1:38 ` davem at davemloft dot net
@ 2012-07-24  1:43 ` carlos_odonell at mentor dot com
  2012-09-17  8:15 ` jengelh at inai dot de
                   ` (9 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: carlos_odonell at mentor dot com @ 2012-07-24  1:43 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

Carlos O'Donell <carlos_odonell at mentor dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |WAITING
                 CC|                            |carlos_odonell at mentor
                   |                            |dot com

--- Comment #3 from Carlos O'Donell <carlos_odonell at mentor dot com> 2012-07-24 01:42:43 UTC ---
Waiting for user to provide more information regarding the failure.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (4 preceding siblings ...)
  2012-07-24  1:43 ` carlos_odonell at mentor dot com
@ 2012-09-17  8:15 ` jengelh at inai dot de
  2012-09-17  8:24 ` jengelh at inai dot de
                   ` (8 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jengelh at inai dot de @ 2012-09-17  8:15 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

Jan Engelhardt <jengelh at inai dot de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |ASSIGNED

--- Comment #4 from Jan Engelhardt <jengelh at inai dot de> 2012-09-17 08:15:17 UTC ---
__strdup (s=0x1008e0 "") at strdup.c:40
40      {
(gdb) 
41        size_t len = strlen (s) + 1;
(gdb) n
42        void *new = malloc (len);
(gdb) p len
$3 = 1
(gdb) n
44        if (new == NULL)
(gdb) 
47        return (char *) memcpy (new, s, len);
(gdb) si
0xfffff80100099f08      47        return (char *) memcpy (new, s, len);
(gdb) 
0xfffff8010026f4a0 in _Qp_xtoq@plt () from ./libc.so.6
(gdb) disas
Dump of assembler code for function _Qp_xtoq@plt:
   0xfffff8010026f460 <+0>:     b,a   0xfffff8010013a840 <_Qp_xtoq>
   0xfffff8010026f464 <+4>:     b,a   %xcc, 0xfffff8010026f320
   0xfffff8010026f468 <+8>:     nop 
   0xfffff8010026f46c <+12>:    nop 
   0xfffff8010026f470 <+16>:    nop 
   0xfffff8010026f474 <+20>:    nop 
   0xfffff8010026f478 <+24>:    nop 
   0xfffff8010026f47c <+28>:    nop 
   0xfffff8010026f480 <+32>:    illtrap  0
   0xfffff8010026f484 <+36>:    illtrap  0x45804
   0xfffff8010026f488 <+40>:    nop 
   0xfffff8010026f48c <+44>:    nop 
   0xfffff8010026f490 <+48>:    nop 
   0xfffff8010026f494 <+52>:    nop 
   0xfffff8010026f498 <+56>:    nop 
   0xfffff8010026f49c <+60>:    nop 
=> 0xfffff8010026f4a0 <+64>:    illtrap  0
   0xfffff8010026f4a4 <+68>:    illtrap  0xa0b20
   0xfffff8010026f4a8 <+72>:    nop 
   0xfffff8010026f4ac <+76>:    nop 
   0xfffff8010026f4b0 <+80>:    nop 
   0xfffff8010026f4b4 <+84>:    nop 
   0xfffff8010026f4b8 <+88>:    nop 
---Type <return> to continue, or q <return> to quit---q
Quit
(gdb) si

Program received signal SIGILL, Illegal instruction.
0xfffff8010026f4a0 in _Qp_xtoq@plt () from ./libc.so.6
(gdb)

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (5 preceding siblings ...)
  2012-09-17  8:15 ` jengelh at inai dot de
@ 2012-09-17  8:24 ` jengelh at inai dot de
  2012-09-17  9:58 ` jengelh at inai dot de
                   ` (7 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jengelh at inai dot de @ 2012-09-17  8:24 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #5 from Jan Engelhardt <jengelh at inai dot de> 2012-09-17 08:23:44 UTC ---
(gdb) p strdup
$8 = {<text variable, no debug info>} 0xfffff80100099ee0 <__strdup>
(gdb) disas __strdup
Dump of assembler code for function __strdup:
=> 0xfffff80100099ee0 <+0>:     save  %sp, -176, %sp
   0xfffff80100099ee4 <+4>:     mov  %i0, %o0
   0xfffff80100099ee8 <+8>:     call  0xfffff8010009a1a0 <strlen>
   0xfffff80100099eec <+12>:    mov  %i0, %i1
   0xfffff80100099ef0 <+16>:    add  %o0, 1, %i2
   0xfffff80100099ef4 <+20>:    call  0xfffff8010026f3c0 <malloc@plt>
   0xfffff80100099ef8 <+24>:    mov  %i2, %o0
   0xfffff80100099efc <+28>:    brz,pn   %o0, 0xfffff80100099f0c <__strdup+44>
   0xfffff80100099f00 <+32>:    nop
   0xfffff80100099f04 <+36>:    call  0xfffff8010026f4a0 <_Qp_xtoq@plt+64>
   0xfffff80100099f08 <+40>:    restore  %g0, %o0, %o0
   0xfffff80100099f0c <+44>:    rett  %i7 + 8
   0xfffff80100099f10 <+48>:    clr  %o0

(gdb) p memcpy
$9 = {void *(void *, const void *, size_t)} 0x1000001f3c0 <memcpy>

Now that is odd..

/proc/XX/maps contains:

00100000-00102000 r-xp 00000000 103:40000 10387606                      
/tmp/glibc-N2.16/glibc-2.16/obj/strdup
00200000-00202000 r--p 00000000 103:40000 10387606                      
/tmp/glibc-N2.16/glibc-2.16/obj/strdup
00202000-00204000 rwxp 00002000 103:40000 10387606                      
/tmp/glibc-N2.16/glibc-2.16/obj/strdup
10000000000-10000024000 r-xp 00000000 103:40000 10381206                
/tmp/glibc-N2.16/glibc-2.16/obj/elf/ld.so
10000124000-10000126000 r--p 00024000 103:40000 10381206                
/tmp/glibc-N2.16/glibc-2.16/obj/elf/ld.so
10000126000-10000128000 rwxp 00026000 103:40000 10381206                
/tmp/glibc-N2.16/glibc-2.16/obj/elf/ld.so
7fefffde000-7ff00000000 rw-p 00000000 00:00 0                           
[stack]
fffff80100000000-fffff80100002000 rw-p 00000000 00:00 0 
fffff80100004000-fffff80100168000 r-xp 00000000 103:40000 10381208      
/tmp/glibc-N2.16/glibc-2.16/obj/libc.so
fffff80100168000-fffff80100266000 ---p 00164000 103:40000 10381208      
/tmp/glibc-N2.16/glibc-2.16/obj/libc.so
fffff80100266000-fffff8010026a000 r--p 00162000 103:40000 10381208      
/tmp/glibc-N2.16/glibc-2.16/obj/libc.so
fffff8010026a000-fffff80100272000 rwxp 00166000 103:40000 10381208      
/tmp/glibc-N2.16/glibc-2.16/obj/libc.so
fffff80100272000-fffff80100276000 rwxp 00000000 00:00 0

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (6 preceding siblings ...)
  2012-09-17  8:24 ` jengelh at inai dot de
@ 2012-09-17  9:58 ` jengelh at inai dot de
  2012-09-17 16:18 ` davem at davemloft dot net
                   ` (6 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jengelh at inai dot de @ 2012-09-17  9:58 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #6 from Jan Engelhardt <jengelh at inai dot de> 2012-09-17 09:58:22 UTC ---
When linking the test program with the new libc statically (it entails a long
command line), it runs. strdup.o, strdup.os themselves check out, but libc.so
does not. objdump has this to say - *ABS*...:

0000000000095ee0 <__strdup>:
   95ee0:       9d e3 bf 50     save  %sp, -176, %sp
   95ee4:       90 10 00 18     mov  %i0, %o0
   95ee8:       40 00 00 ae     call  961a0 <strlen>
   95eec:       b2 10 00 18     mov  %i0, %i1
   95ef0:       b4 02 20 01     add  %o0, 1, %i2
   95ef4:       40 07 55 33     call  26b3c0 <malloc@plt>
   95ef8:       90 10 00 1a     mov  %i2, %o0
   95efc:       02 c2 00 04     brz,pn   %o0, 95f0c <__strdup+0x2c>
   95f00:       01 00 00 00     nop 
   95f04:       40 07 55 67     call  26b4a0 <*ABS*+0x99600@plt>
   95f08:       91 e8 00 08     restore  %g0, %o0, %o0
   95f0c:       81 cf e0 08     rett  %i7 + 8
   95f10:       90 10 20 00     clr  %o0
   95f14:       30 68 00 03     b,a   %xcc, 95f20 <__strndup>
   95f18:       01 00 00 00     nop 
   95f1c:       01 00 00 00     nop 

That does not seem right at all.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (7 preceding siblings ...)
  2012-09-17  9:58 ` jengelh at inai dot de
@ 2012-09-17 16:18 ` davem at davemloft dot net
  2012-09-17 16:29 ` davem at davemloft dot net
                   ` (5 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: davem at davemloft dot net @ 2012-09-17 16:18 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #7 from David S. Miller <davem at davemloft dot net> 2012-09-17 16:18:11 UTC ---
What does not look right at all?

The memcpy call is giving an absolute address to the
memcpy plt slot because that's how IFUNC symbols
end up looking in this case.

If you disassemble 0x99600 you'll see the unresolved PLT
entry for memcpy which, once resolved, will have an
invocation of the correct memcpy implementation for your
processor.

I see nothing wrong nor out of place in any of your
assembler dumps.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (8 preceding siblings ...)
  2012-09-17 16:18 ` davem at davemloft dot net
@ 2012-09-17 16:29 ` davem at davemloft dot net
  2012-09-17 21:15 ` jengelh at inai dot de
                   ` (4 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: davem at davemloft dot net @ 2012-09-17 16:29 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #8 from David S. Miller <davem at davemloft dot net> 2012-09-17 16:29:23 UTC ---
BTW, it could be that simply the binutils you're using is way
out date.

GDB can't even recognize one of the IFUNC relocations (0xf8
which is R_SPARC_JMP_IREL).

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (9 preceding siblings ...)
  2012-09-17 16:29 ` davem at davemloft dot net
@ 2012-09-17 21:15 ` jengelh at inai dot de
  2012-09-28  4:25 ` davem at davemloft dot net
                   ` (3 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: jengelh at inai dot de @ 2012-09-17 21:15 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #9 from Jan Engelhardt <jengelh at inai dot de> 2012-09-17 21:15:24 UTC ---
binutils is 2.22, so objdump output should be accurate. I upgraded to
gdb-7.4.50.20120603 now so that it has also used the 2.22 tools during build.
(Previously gdb-7.1 was used.)

This changes things only minimally. __strdup has become __GI___strdup in gdb
printouts, but it still shows a call to _Qp_xtoq@plt+64 rather than memcpy in
the disassembly of (__GI___)strdup.
But I do not think gdb is at fault here - since the SIGILL also happens without
it. It seems as if the resolver is botched.

Calling memcpy() from in main() properly executes the memcpy function, i.e.
will call __memcpy_niagara1. The problem really only seems to affect references
to IFUNCs from within libc.so itself.


Login account could be provided, if you would want to have a peek at this.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (10 preceding siblings ...)
  2012-09-17 21:15 ` jengelh at inai dot de
@ 2012-09-28  4:25 ` davem at davemloft dot net
  2012-09-28  7:01 ` jengelh at inai dot de
                   ` (2 subsequent siblings)
  14 siblings, 0 replies; 16+ messages in thread
From: davem at davemloft dot net @ 2012-09-28  4:25 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #10 from David S. Miller <davem at davemloft dot net> 2012-09-28 04:25:29 UTC ---
Ok I've been able to analyze this.

The problem stems from SUSE building glibc with --enable-bind-now

That's why I've never seen this.

The bug is specific to sparc64's ELF support in glibc.  We
mis-handle resolving JMP_IREL plt entries in dl-machine.h,
specifically we should not pass reloc->r_addend in as the
'high' argument to sparc64_fixup_plt().  Instead it should
always be passed as zero, exactly how we do it in dl-irel.h

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (11 preceding siblings ...)
  2012-09-28  4:25 ` davem at davemloft dot net
@ 2012-09-28  7:01 ` jengelh at inai dot de
  2012-09-28  7:20 ` davem at davemloft dot net
  2014-06-17 18:57 ` fweimer at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: jengelh at inai dot de @ 2012-09-28  7:01 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14376

--- Comment #11 from Jan Engelhardt <jengelh at inai dot de> 2012-09-28 07:01:11 UTC ---
--(openSUSE:Factory/glibc/glibc.changes)---------------------------
Wed May 25 15:28:37 UTC 2011 - aj@suse.de

- Run on kernel 2.6.32 or newer only - and optimize thus.
- Enable malloc implementation that is be less memory efficient
  but higher performing in multi-threaded programs.
- Use --enable-bind-now to avoid lazy binding in ld.so
  and libc.so
-------------------------------------------------------------------

aj, what is the _real_ reason enable-bind-now was added?

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (12 preceding siblings ...)
  2012-09-28  7:01 ` jengelh at inai dot de
@ 2012-09-28  7:20 ` davem at davemloft dot net
  2014-06-17 18:57 ` fweimer at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: davem at davemloft dot net @ 2012-09-28  7:20 UTC (permalink / raw)
  To: glibc-bugs


http://sourceware.org/bugzilla/show_bug.cgi?id=14376

David S. Miller <davem at davemloft dot net> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED

--- Comment #12 from David S. Miller <davem at davemloft dot net> 2012-09-28 07:19:48 UTC ---
Fixed in glibc-2.17

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

* [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
  2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
                   ` (13 preceding siblings ...)
  2012-09-28  7:20 ` davem at davemloft dot net
@ 2014-06-17 18:57 ` fweimer at redhat dot com
  14 siblings, 0 replies; 16+ messages in thread
From: fweimer at redhat dot com @ 2014-06-17 18:57 UTC (permalink / raw)
  To: glibc-bugs

https://sourceware.org/bugzilla/show_bug.cgi?id=14376

Florian Weimer <fweimer at redhat dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
              Flags|                            |security-

-- 
You are receiving this mail because:
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2014-06-17 18:57 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-07-20 10:25 [Bug libc/14376] New: glibc-2.16 strdup Illegal Instruction on sparc64 jengelh at medozas dot de
2012-07-20 10:26 ` [Bug libc/14376] " jengelh at medozas dot de
2012-07-20 10:35 ` aj at suse dot de
2012-07-20 10:43 ` aj at suse dot de
2012-07-24  1:38 ` davem at davemloft dot net
2012-07-24  1:43 ` carlos_odonell at mentor dot com
2012-09-17  8:15 ` jengelh at inai dot de
2012-09-17  8:24 ` jengelh at inai dot de
2012-09-17  9:58 ` jengelh at inai dot de
2012-09-17 16:18 ` davem at davemloft dot net
2012-09-17 16:29 ` davem at davemloft dot net
2012-09-17 21:15 ` jengelh at inai dot de
2012-09-28  4:25 ` davem at davemloft dot net
2012-09-28  7:01 ` jengelh at inai dot de
2012-09-28  7:20 ` davem at davemloft dot net
2014-06-17 18:57 ` fweimer at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).