This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/70909] Libiberty Demangler segfaults (4)
- From: "trippels at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Sat, 19 Nov 2016 16:56:33 +0000
- Subject: [Bug c++/70909] Libiberty Demangler segfaults (4)
- Auto-submitted: auto-generated
- References: <bug-70909-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70909
--- Comment #10 from Markus Trippelsdorf <trippels at gcc dot gnu.org> ---
(In reply to Mark Wielaard from comment #9)
> (In reply to Markus Trippelsdorf from comment #8)
> > This is what it should look like: [...]
>
> How did you demangle that input string?
> With the proposed patch the mangled string is rejected by the libiberty
> demangler.
>
> I assume since you were able to demangle it is a valid input string, but
> that the demangler creates a cyclic graph for it that then blows up the
> stack when trying to print out.
There a three demanglers that I know of.
libiberty
Ian's demangler (written in Go) https://github.com/ianlancetaylor/demangle
and LLVM's libc++abi demangler http://libcxxabi.llvm.org/
The symbol was demangled with libcxxabi's demangler.
The other two demanglers reject it.