public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/108188] New: Segfault in compatibility-condvar.cc
@ 2022-12-20 14:47 glex.spb at gmail dot com
  2022-12-20 15:50 ` [Bug libstdc++/108188] " pinskia at gcc dot gnu.org
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: glex.spb at gmail dot com @ 2022-12-20 14:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108188

            Bug ID: 108188
           Summary: Segfault in compatibility-condvar.cc
           Product: gcc
           Version: 12.2.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glex.spb at gmail dot com
  Target Milestone: ---

I'd like to report a regression in the libstdc++ that comes with GCC 12 series
(GCC 11 was OK).

On mips32r2 with uClibc simply running `gdb` with no arguments segfaults (even
`gdb --help` segfaults). I was able to obtain a stack trace by connecting to
`gdb-server` from my desktop.

On the device:
$ gdbserver 10.1.1.1:8001 gdb

On my desktop:

$ bin/mipsel-linux-gdb -ix
mipsel-gcw0-linux-uclibc/sysroot/usr/share/buildroot/gdbinit -ex="set sysroot
${PWD}/mipsel-gcw0-linux-uclibc/sysroot" -ex='target remote 10.1.1.2:8001'
../target/bin/gdb

Remote debugging using 10.1.1.2:8001
Reading symbols from
/home/gleb/repos/glebm/od_buildroot/output/gcw0/host/mipsel-gcw0-linux-uclibc/sysroot/lib/ld-uClibc.so.0...
0x77e28ed0 in _start () from
/home/gleb/repos/glebm/od_buildroot/output/gcw0/host/mipsel-gcw0-linux-uclibc/sysroot/lib/ld-uClibc.so.0
(gdb) bt
#0  0x77e28ed0 in _start () from
/home/gleb/repos/glebm/od_buildroot/output/gcw0/host/mipsel-gcw0-linux-uclibc/sysroot/lib/ld-uClibc.so.0
#1  0x00000000 in ?? ()
Backtrace stopped: frame did not save the PC
(gdb) c
Continuing.
[Detaching after vfork from child process 618]
[New Thread 608.619]

Thread 2 "gdb worker" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 608.619]
#0  0x77b17ee0 in __gnu_cxx::__nothrow_wait_cv::wait (this=0xb5fd18, lock=...)
at ../../../../libstdc++-v3/src/c++11/compatibility-condvar.cc:74
#1  0x77b17ef0 in __gnu_cxx::__nothrow_wait_cv::wait (this=<optimized out>,
lock=...) at ../../../../libstdc++-v3/src/c++11/compatibility-condvar.cc:75
#2  0x77b17ef0 in __gnu_cxx::__nothrow_wait_cv::wait (this=<optimized out>,
lock=...) at ../../../../libstdc++-v3/src/c++11/compatibility-condvar.cc:75
... 60k more identical lines ...
#65232 0x77b44ef0 in __gnu_cxx::__nothrow_wait_cv::wait (this=<optimized out>,
lock=...) at ../../../../libstdc++-v3/src/c++11/compatibility-condvar.cc:75
#65233 0x77b44ef0 in __gnu_cxx::__nothrow_wait_cv::wait (this=<optimized out>,
lock=...) at ../../../../libstdc++-v3/src/c++11/compatibility-condvar.cc:75
#65234 0x008f1e00 in ?? ()
#65235 0x77b7b9a8 in std::execute_native_thread_routine (__p=0xb9dba0) at
../../../../../libstdc++-v3/src/c++11/thread.cc:82
#65236 0x77a3f3d8 in start_thread (arg=0x779700f0) at
libpthread/nptl/pthread_create.c:285
#65237 0x77980478 in __thread_start () at libc/sysdeps/linux/mips/clone.S:121
Backtrace stopped: frame did not save the PC


Possible culprit: 9e18a25331fa25c3907249fede65a02c6817b06e
(the function at compatibility-condvar.cc:75 was introduced in this commit).

---

gcc version information:

output/gcw0/host/bin/mipsel-linux-gcc -v
Using built-in specs.
COLLECT_GCC=/home/gleb/repos/glebm/od_buildroot/output/gcw0/host/bin/mipsel-linux-gcc.br_real
COLLECT_LTO_WRAPPER=/home/gleb/repos/glebm/od_buildroot/output/gcw0/host/bin/../libexec/gcc/mipsel-gcw0-linux-uclibc/12.2.0/lto-wrapper
Target: mipsel-gcw0-linux-uclibc
Configured with: ./configure
--prefix=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host
--sysconfdir=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host/etc
--enable-static --target=mipsel-gcw0-linux-uclibc
--with-sysroot=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host/mipsel-gcw0-linux-uclibc/sysroot
--enable-__cxa_atexit --with-gnu-ld --disable-libssp --disable-multilib
--disable-decimal-float --enable-plugins --enable-lto
--with-gmp=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host
--with-mpc=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host
--with-mpfr=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host
--with-pkgversion='Buildroot 2022.08-1514-g9c33974d6c-dirty'
--with-bugurl=http://bugs.buildroot.net/ --without-zstd --disable-libquadmath
--disable-libquadmath-support --disable-libsanitizer --disable-libsanitizer
--enable-tls --enable-threads --without-isl --without-cloog
--with-arch=mips32r2 --with-abi=32 --with-nan=legacy --with-fp-32=xx
--enable-languages=c,c++
--with-build-time-tools=/home/gleb/repos/glebm/od_buildroot/output/gcw0/per-package/host-gcc-final/host/mipsel-gcw0-linux-uclibc/bin
--enable-shared --disable-libgomp --with-mips-plt
Thread model: posix
Supported LTO compression algorithms: zlib
gcc version 12.2.0 (Buildroot 2022.08-1514-g9c33974d6c-dirty)

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/108188] Segfault in compatibility-condvar.cc
  2022-12-20 14:47 [Bug libstdc++/108188] New: Segfault in compatibility-condvar.cc glex.spb at gmail dot com
@ 2022-12-20 15:50 ` pinskia at gcc dot gnu.org
  2022-12-21 11:54 ` redi at gcc dot gnu.org
  2022-12-21 11:56 ` glex.spb at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: pinskia at gcc dot gnu.org @ 2022-12-20 15:50 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108188

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |DUPLICATE

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
This is a uclibc specific issue. Maybe related to how unwinding is done.

*** This bug has been marked as a duplicate of bug 105730 ***

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/108188] Segfault in compatibility-condvar.cc
  2022-12-20 14:47 [Bug libstdc++/108188] New: Segfault in compatibility-condvar.cc glex.spb at gmail dot com
  2022-12-20 15:50 ` [Bug libstdc++/108188] " pinskia at gcc dot gnu.org
@ 2022-12-21 11:54 ` redi at gcc dot gnu.org
  2022-12-21 11:56 ` glex.spb at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: redi at gcc dot gnu.org @ 2022-12-21 11:54 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108188

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Are you using lld to link or binutils' ld?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Bug libstdc++/108188] Segfault in compatibility-condvar.cc
  2022-12-20 14:47 [Bug libstdc++/108188] New: Segfault in compatibility-condvar.cc glex.spb at gmail dot com
  2022-12-20 15:50 ` [Bug libstdc++/108188] " pinskia at gcc dot gnu.org
  2022-12-21 11:54 ` redi at gcc dot gnu.org
@ 2022-12-21 11:56 ` glex.spb at gmail dot com
  2 siblings, 0 replies; 4+ messages in thread
From: glex.spb at gmail dot com @ 2022-12-21 11:56 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108188

--- Comment #3 from Gleb Mazovetskiy <glex.spb at gmail dot com> ---
I am simply using buildroot to build everything, including gdb. binutils v2.38
ld.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-21 11:56 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-20 14:47 [Bug libstdc++/108188] New: Segfault in compatibility-condvar.cc glex.spb at gmail dot com
2022-12-20 15:50 ` [Bug libstdc++/108188] " pinskia at gcc dot gnu.org
2022-12-21 11:54 ` redi at gcc dot gnu.org
2022-12-21 11:56 ` glex.spb at gmail dot com

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).