public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "adhemerval.zanella at linaro dot org" <sourceware-bugzilla@sourceware.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	[thread overview]
Message-ID: <bug-28366-131-u9JEZDnjup@http.sourceware.org/bugzilla/> (raw)
In-Reply-To: <bug-28366-131@http.sourceware.org/bugzilla/>

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

Adhemerval Zanella <adhemerval.zanella at linaro dot org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |adhemerval.zanella at linaro dot o
                   |                            |rg

--- Comment #4 from Adhemerval Zanella <adhemerval.zanella at linaro dot org> ---
(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.
> 
> 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 where
> 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().
> 
> 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 due
the 'x8' usage:

Program received signal SIGSEGV, Segmentation fault.
std::locale::name[abi:cxx11]() const (this=0xffffffffec60) at
/home/adhemerval.zanella/toolchain/src/gcc/libstdc++-v3/src/c++98/locale.cc:133
133             __ret += _S_categories[0];
(gdb) bt
#0  std::locale::name[abi:cxx11]() const (this=0xffffffffec60) 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=1) at malloc.c:3206
#3  0x0000fffff7c3a4cc in __GI___libc_malloc (bytes=281474838073920) at
malloc.c:3206
#4  0x0000fffff7fb5adc in ?? ()
Backtrace stopped: not enough registers or memory available to unwind further
(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]
=> 0x0000fffff7e48a18 <+40>:    strb    wzr, [x8, #16]

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

  parent reply	other threads:[~2021-10-06 18:29 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-21 21:51 [Bug dynamic-link/28366] New: Calling name() on a locale object (std::locale) with LD_AUDIT library loaded results in SIGSEGV nnye at whitebeamsec dot com
2021-09-22 10:12 ` [Bug dynamic-link/28366] " fweimer at redhat dot com
2021-09-22 20:10 ` nnye at whitebeamsec dot com
2021-09-22 20:13 ` [Bug dynamic-link/28366] Calling name() on a locale object (std::locale) with LD_AUDIT library loaded results in SIGSEGV on aarch64 platforms nnye at whitebeamsec dot com
2021-09-22 20:16 ` nnye at whitebeamsec dot com
2021-10-05 21:24 ` woodard at redhat dot com
2021-10-06 18:29 ` adhemerval.zanella at linaro dot org [this message]
2021-10-07 15:40 ` nnye at whitebeamsec dot com
2021-10-07 19:03 ` adhemerval.zanella at linaro dot org
2021-10-08  1:09 ` nnye at whitebeamsec dot com
2021-10-08  1:11 ` nnye at whitebeamsec dot com
2022-03-25 16:33 ` nsz at gcc dot gnu.org
2022-03-25 16:40 ` nsz at gcc dot gnu.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=bug-28366-131-u9JEZDnjup@http.sourceware.org/bugzilla/ \
    --to=sourceware-bugzilla@sourceware.org \
    --cc=glibc-bugs@sourceware.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: link
Be 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).