This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
- From: "jengelh at inai dot de" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Mon, 17 Sep 2012 08:23:44 +0000
- Subject: [Bug libc/14376] glibc-2.16 strdup Illegal Instruction on sparc64
- Auto-submitted: auto-generated
- References: <bug-14376-131@http.sourceware.org/bugzilla/>
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.