Bug 61805 - Demangler crash (GDB PR 17157)
Summary: Demangler crash (GDB PR 17157)
Alias: None
Product: gcc
Classification: Unclassified
Component: demangler (show other bugs)
Version: unknown
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2014-07-15 08:38 UTC by Gary Benson
Modified: 2017-03-09 08:50 UTC (History)
1 user (show)

See Also:
Known to work:
Known to fail:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Gary Benson 2014-07-15 08:38:21 UTC
The demangler crashes when given this symbol:


See https://sourceware.org/bugzilla/show_bug.cgi?id=17157
Comment 1 gcc-bugzilla 2015-02-08 20:08:05 UTC
Some more comments, copied from the GDB bug report:

Ok, this problem is a bit more complicated. First, a newer GCC (4.9.1) and Clang 3.5 doesn't produce the symbol any more. Running a more recent c++filt on it now crashes c++filt -- if you look closely, the originally demangled type was also incorrect, as: decltype (((float)()*(float)())) does not make sense -- should have been decltype (float ()*float ()) which is simply float.

I'm debugging a new crash now where the demangler/libiberty starts producing a symbol name with decltype in it, which I strongly suspect is similar to the original issue. Am I right to assume that decltype is never part of a mangled symbol name?
Comment 2 Mark Wielaard 2016-12-04 22:38:48 UTC
GNU c++filt (GNU Binutils) doesn't crash and demangles it to:

std::enable_if<std::is_arithmetic<float>::value, niven::Color<decltype (((float)())*((float)())), 4> const>::type niven::Color<float, 4>::operator/<float>(float) const
Comment 3 Markus Trippelsdorf 2017-03-09 08:50:58 UTC