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: "mark 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:46:53 +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 #9 from Mark Wielaard <mark at gcc dot gnu.org> ---
(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.
A smaller, valid, reproducer would be nice to have. Clearly some of the inputs
that crash the demangler because it creates a cycle in the parse graph are
bogus and should be rejected.
It isn't immediately clear to me whether the bug is that a cyclic graph is
created for this input string, or that the bug is that such a cycle is printed
out naively.