Re: GDB Segfault
Morten Hustveit <[email protected]>
| Newsgroups | gmane.comp.lib.capnproto.general,gmane.comp.gdb.devel |
|---|---|
| Message-ID | <CAL3abtX0dTTD-dBWMrYAzmdhGzNrjRbArj66_8wcy2CJLZf7bg@mail.gmail.com> |
-cc+bcc:capnproto, +cc:gdb
Moving discussion about _Z8functionIiE5ClassIDTcvT_Li0EEEv, which
crashes both GDB and c++filt, to the GDB mailing list, where it's more
likely that we can get some help.
On Friday, September 19, 2014 1:50:21 PM UTC-3, Morten Hustveit wrote:
>> I've created a reduced test case here:
>>
>> template <typename T>
>> struct Class { };
>>
>> template <typename T0>
>> Class<decltype(T0(0))> function() {
>> return Class<decltype(T0(0))>();
>> }
>>
>> int main() { function<int>(); }
>>
>> GCC and LLVM both produce the following symbol for this function:
>> _Z8functionIiE5ClassIDTcvT_Li0EEEv
>>
>> Even c++filt crashes on this symbol:
>>
>> $ echo _Z8functionIiE5ClassIDTcvT_Li0EEEv | c++filt
>> Segmentation fault
On Fri, Sep 19, 2014 at 1:14 PM, <[email protected]> wrote:
> Would
> upgrading to a more recent version prevent this problem from occurring? Or
> is the problem entirely within GDB? I'm already running the latest weekly
> snapshot of GDB.
The bug is in libiberty, including the version currently at
git://sourceware.org/git/binutils-gdb.git. It ends up recursing
infinitely at these lines:
#1 d_print_cast at ./cp-demangle.c:5754
#2 d_print_comp_inner at ./cp-demangle.c:5046
#3 d_print_comp at ./cp-demangle.c:5368
#4 d_print_comp_inner at ./cp-demangle.c:5276
#5 d_print_comp at ./cp-demangle.c:5368
#6 d_print_comp_inner at ./cp-demangle.c:4537
#7 d_print_comp at ./cp-demangle.c:5368
--
You received this message because you are subscribed to the Google Groups "Cap'n Proto" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
Visit this group at http://groups.google.com/group/capnproto.