From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 48) id 6395E3858C39; Wed, 6 Oct 2021 18:29:43 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 6395E3858C39 From: "adhemerval.zanella at linaro dot org" To: glibc-bugs@sourceware.org Subject: [Bug dynamic-link/28366] Calling name() on a locale object (std::locale) with LD_AUDIT library loaded results in SIGSEGV on aarch64 platforms Date: Wed, 06 Oct 2021 18:29:43 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: dynamic-link X-Bugzilla-Version: 2.31 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: adhemerval.zanella at linaro dot org X-Bugzilla-Status: WAITING X-Bugzilla-Resolution: X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: unassigned at sourceware dot org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: glibc-bugs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Glibc-bugs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Oct 2021 18:29:43 -0000 https://sourceware.org/bugzilla/show_bug.cgi?id=3D28366 Adhemerval Zanella changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |adhemerval.zanella at lina= ro dot o | |rg --- Comment #4 from Adhemerval Zanella --- (In reply to Nathan Nye from comment #2) > (In reply to Florian Weimer from comment #1) > > Which glibc/GCC version/distribution are you testing? I cannot reproduce > > this. >=20 > Interesting! I also couldn't reproduce it on x86_64, I guessed you may be > using that. I'm using Ubuntu 20.04.3 on aarch64 (virtualized) which is wh= ere > the bug is occuring. So this could be an ARM platform issue? My apologies > for the typo in my original submission, I meant to say int main(). >=20 > gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0 > libc6 2.31-0ubuntu9.2 It seems that it the issue Ben Woordard has noted, although I can't make it fails consistently. But, when it fails on aarch64, it really seems to be d= ue the 'x8' usage: Program received signal SIGSEGV, Segmentation fault. std::locale::name[abi:cxx11]() const (this=3D0xffffffffec60) at /home/adhemerval.zanella/toolchain/src/gcc/libstdc++-v3/src/c++98/locale.cc= :133 133 __ret +=3D _S_categories[0]; (gdb) bt #0 std::locale::name[abi:cxx11]() const (this=3D0xffffffffec60) at /home/adhemerval.zanella/toolchain/src/gcc/libstdc++-v3/src/c++98/locale.cc= :133 #1 0x0000fffff7fb5b20 in ?? () #2 0x0000fffff7c3a4cc in __GI___libc_malloc (bytes=3D1) at malloc.c:3206 #3 0x0000fffff7c3a4cc in __GI___libc_malloc (bytes=3D281474838073920) at malloc.c:3206 #4 0x0000fffff7fb5adc in ?? () Backtrace stopped: not enough registers or memory available to unwind furth= er (gdb) disas Dump of assembler code for function std::locale::name[abi:cxx11]() const: 0x0000fffff7e489f0 <+0>: stp x29, x30, [sp, #-96]! 0x0000fffff7e489f4 <+4>: mov x29, sp 0x0000fffff7e489f8 <+8>: stp x19, x20, [sp, #16] 0x0000fffff7e489fc <+12>: mov x19, x8 0x0000fffff7e48a00 <+16>: stp x21, x22, [sp, #32] 0x0000fffff7e48a04 <+20>: add x21, x8, #0x10 0x0000fffff7e48a08 <+24>: stp x23, x24, [sp, #48] 0x0000fffff7e48a0c <+28>: mov x23, x0 0x0000fffff7e48a10 <+32>: stp x25, x26, [sp, #64] 0x0000fffff7e48a14 <+36>: stp x27, x28, [sp, #80] =3D> 0x0000fffff7e48a18 <+40>: strb wzr, [x8, #16] --=20 You are receiving this mail because: You are on the CC list for the bug.=