From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 8320D3857C40; Wed, 10 Aug 2022 22:41:02 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 8320D3857C40 From: "pinskia at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug target/106581] [Aarch64] libstdc++ segfault at end of execution Date: Wed, 10 Aug 2022 22:41:02 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: target X-Bugzilla-Version: 12.1.0 X-Bugzilla-Keywords: wrong-code X-Bugzilla-Severity: normal X-Bugzilla-Who: pinskia at gcc dot gnu.org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: unassigned at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords component Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: gcc-bugs@gcc.gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Gcc-bugs mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 10 Aug 2022 22:41:02 -0000 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=3D106581 Andrew Pinski changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |wrong-code Component|libstdc++ |target --- Comment #11 from Andrew Pinski --- (In reply to Lance Fredrickson from comment #10) > (gdb) disassemble 0x7fb7eae3b8 > Dump of assembler code for function (anonymous namespace)::get_global(): > 0x0000007fb7eae3b8 <+0>: stp x29, x30, [sp, #-16]! > 0x0000007fb7eae3bc <+4>: mov x29, sp > 0x0000007fb7eae3c0 <+8>: adrp x0, 0x7fb7fe3000 > <_ZNSt15basic_stringbufIcSt11char_traitsIcESaIcEE15_M_update_egptrEv@got.= plt> > 0x0000007fb7eae3c4 <+12>: ldr x1, [x0, #3248] > 0x0000007fb7eae3c8 <+16>: add x0, x0, #0xcb0 > 0x0000007fb7eae3cc <+20>: blr x1 > 0x0000007fb7eae3d0 <+24>: mrs x1, tpidr_el0 > 0x0000007fb7eae3d4 <+28>: add x0, x1, x0 > 0x0000007fb7eae3d8 <+32>: ldp x29, x30, [sp], #16 > 0x0000007fb7eae3dc <+36>: ret > End of assembler dump. That looks correct. It is basically: adrp x0, :tlsdesc:a ldr x1, [x0, #:tlsdesc_lo12:a] add x0, x0, :tlsdesc_lo12:a .tlsdesccall a blr x1 mrs x1, tpidr_el0 add x0, x1, x0 So now this is looking more and more like an uclibc issue rather a GCC/libstdc++ one. Have you reported it to them yet?=