public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "schwab at suse dot de" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug target/21657] New: [4.0 regression] TLS reference miscompiled Date: Wed, 18 May 2005 22:14:00 -0000 [thread overview] Message-ID: <20050518221406.21657.schwab@suse.de> (raw) The patch from PR21412 is causing miscompilation of glibc. Anything that uses libpthread is crashing in __libc_dl_error_tsd. void ** __attribute__ ((const)) __libc_dl_error_tsd (void) { static __thread void *data; return &data; } When compiled without the patch: dl-tsd.os: file format elf64-ia64-little Disassembly of section .text: 0000000000000000 <__libc_dl_error_tsd>: 0: 18 08 15 06 80 05 [MMB] alloc r33=ar.pfs,5,3,0 1: LTOFF_DTPMOD22 data.6704 6: e0 00 04 00 48 00 addl r14=0,r1 c: 00 00 00 20 nop.b 0x0 10: 01 10 01 02 00 21 [MII] mov r34=r1 16: 00 02 00 62 00 80 mov r32=b0 1c: 04 00 00 84 mov r36=r0;; 20: 1d 18 01 1c 18 10 [MFB] ld8 r35=[r14] 22: PCREL21B __tls_get_addr 26: 00 00 00 02 00 00 nop.f 0x0 2c: 08 00 00 50 br.call.sptk.many b0=20 <__libc_dl_error_tsd+0x20>;; 30: 08 08 00 44 00 21 [MMI] mov r1=r34 36: 20 00 20 00 42 00 mov r2=r8 3c: 00 0a 00 07 mov b0=r32 40: 0b 00 00 00 01 00 [MMI] nop.m 0x0;; 41: DTPREL22 data.6704 46: 20 00 08 00 48 00 addl r2=0,r2 4c: 10 02 aa 00 mov.i ar.pfs=r33;; 50: 11 00 00 00 01 00 [MIB] nop.m 0x0 56: 80 00 08 00 42 80 mov r8=r2 5c: 08 00 84 00 br.ret.sptk.many b0;; When compiled with the patch: dl-tsd.os: file format elf64-ia64-little Disassembly of section .text: 0000000000000000 <__libc_dl_error_tsd>: 0: 08 08 15 06 80 05 [MMI] alloc r33=ar.pfs,5,3,0 1: LTOFF_DTPMOD22 data.6704 6: e0 00 04 00 48 00 addl r14=0,r1 c: 04 00 c4 00 mov r32=b0 10: 0b 10 01 02 00 21 [MMI] mov r34=r1;; 16: e0 00 38 30 20 80 ld8 r14=[r14] 1c: 04 00 00 84 mov r36=r0;; 20: 1d 18 01 1c 18 10 [MFB] ld8 r35=[r14] 22: PCREL21B __tls_get_addr 26: 00 00 00 02 00 00 nop.f 0x0 2c: 08 00 00 50 br.call.sptk.many b0=20 <__libc_dl_error_tsd+0x20>;; 30: 09 08 00 44 00 21 [MMI] mov r1=r34 36: 20 00 20 00 42 00 mov r2=r8 3c: 00 0a 00 07 mov b0=r32;; 40: 11 40 00 04 00 24 [MIB] addl r8=0,r2 40: DTPREL22 data.6704 46: 00 08 01 55 00 80 mov.i ar.pfs=r33 4c: 08 00 84 00 br.ret.sptk.many b0;; The bad version has one indirection on r14 too much. -- Summary: [4.0 regression] TLS reference miscompiled Product: gcc Version: 4.0.1 Status: UNCONFIRMED Severity: normal Priority: P2 Component: target AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: schwab at suse dot de CC: gcc-bugs at gcc dot gnu dot org,rth at gcc dot gnu dot org GCC target triplet: ia64-linux OtherBugsDependingO 21412 nThis: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21657
next reply other threads:[~2005-05-18 22:14 UTC|newest] Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top 2005-05-18 22:14 schwab at suse dot de [this message] 2005-05-18 22:49 ` [Bug target/21657] " rth at gcc dot gnu dot org 2005-05-19 9:36 ` cvs-commit at gcc dot gnu dot org 2005-05-19 9:43 ` cvs-commit at gcc dot gnu dot org 2005-05-19 9:45 ` rth at gcc dot gnu dot org 2005-06-05 7:53 ` pinskia at gcc dot gnu dot org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20050518221406.21657.schwab@suse.de \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).