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

            Bug ID: 105730
           Summary: Issue with commit - Allow std::condition_variable
                    waits to be cancelled
           Product: gcc
           Version: 12.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lancethepants at gmail dot com
  Target Milestone: ---

I noticed that the lld-14 linker (and also lldb) built with gcc-12 was
segfaulting and pointing to libstdc++ in the backtrace.  I've narrowed it down
to commit 9e18a25331fa25c3907249fede65a02c6817b06e.  When I reverse this commit
then lld built by gcc functions again normally.

gcc-12.1 release
uclibc-ng c-standard library
armv7  cpu

I'm not sure if the issue is unique to uclibc-ng, arm, or if it's a general
issue to all platforms.


Here is the gdb log.

Starting program: /mmc/bin/ld.lld -plugin
/mmc/libexec/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/liblto_plugin.so
-plugin-opt=/mmc/libexec/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/lto-wrapper
-plugin-opt=-fresolution=/mmc/tmp/cc1ZwXDr.res -plugin-opt=-pass-through=-lgcc
-plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lc
-plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lgcc_s
--sysroot=/mmc --eh-frame-hdr -dynamic-linker /mmc/lib/ld-uClibc.so.1 -X -m
armelf_linux_eabi -o hello /mmc/usr/lib/crt1.o /mmc/usr/lib/crti.o
/mmc/lib/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/crtbegin.o
-L/mmc/lib/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0
-L/mmc/lib/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/../../../../arm-tomatoware-linux-uclibcgnueabi/lib
-L/mmc/lib/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/../../.. -L/mmc/lib
-L/mmc/usr/lib hello.o -lgcc --push-state --as-needed -lgcc_s --pop-state -lc
-lgcc --push-state --as-needed -lgcc_s --pop-state
/mmc/lib/gcc/arm-tomatoware-linux-uclibcgnueabi/12.1.0/crtend.o
/mmc/usr/lib/crtn.o
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/ld-uClibc.so.1]
Can't read data for section '.debug_info' in file '/mmc/lib/libLLVM-14.so'
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/usr/lib/libstdc++.so.6]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/libgcc_s.so.1]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/libc.so.0]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/libffi.so.8]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/libedit.so.0]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/libxml2.so.2]
Dwarf Error: wrong version in compilation unit header (is 5, should be 2, 3, or
4) [in module /mmc/lib/liblzma.so.5]
[New LWP 27688]
[New LWP 27689]

Thread 2 "ld.lld" received signal SIGSEGV, Segmentation fault.
[Switching to LWP 27688]
0x42deada0 in
std::condition_variable::wait(std::unique_lock<std::mutex>&)@GLIBCXX_3.4.11 ()
from /mmc/usr/lib/libstdc++.so.6

Reply via email to