bug-binutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Infinite recursion in binutils 2.27 (ld, gdb, c++filt)


From: Nick Clifton
Subject: Re: Infinite recursion in binutils 2.27 (ld, gdb, c++filt)
Date: Thu, 6 Oct 2016 11:54:02 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.3.0

Hi Matthieu,

> We are hitting an infinite recursion in "ld", eventually leading to a 
> stackoverflow 

Please could you file a bug report at:

  https://gcc.gnu.org/bugzilla/enter_bug.cgi?product=gcc

(Note - this is the GCC bug reporting system not the binutils bug reporting
system.  This is because the bug is in the C++ demangling functions provided
by libiberty.  The libiberty library is used by both GCC and binutils, but it
is officially maintained as part of the GCC package).

> $ /opt/imc/gcc-6.2.0/bin/g++ -fPIC -std=c++14 -O3 -ggdb -o main.cpp.o -c 
> main.cpp

When you file the report it would be helpful if you could skip this step, and
instead upload the main.cpp.o file.  Anyone attempting to reproduce the problem
may not have exactly the same version of g++ available as the one you used, and 
so eliminating the compiler makes things simpler.

> $ /opt/imc/gcc-6.2.0/bin/g++ -fPIC -std=c++14 -shared -o libCrash.so 
> main.cpp.o -Wl,--version-script=simple.map
> collect2: fatal error: ld terminated with signal 11 [Segmentation fault]
> compilation terminated.

Please do include this command line however, and the simple.map script.

It would also be worth noting in the report that the problem is an infinite
loop between the libiberty/cp-demangle.c:d_print_comp() and d_comp_print_inner()
functions.


> $ c++filt --version
> GNU c++filt version 2.23.52.0.1-55.el7 20130226
> 
> $ /opt/imc/gcc-6.2.0/bin/ld --version
> GNU ld (GNU Binutils) 2.27

> However the symbol reported in this one does crash c++filt (although not ld):
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909

That is almost certainly because the version of c++filt that you are using is
based upon an older binutils release (2.23), whereas the linker is based upon
a newer release (2.27).

Cheers
  Nick




reply via email to

[Prev in Thread] Current Thread [Next in Thread]