[Bug demangler/80513] demangler walks past trailing nul in mangled name in a bunch of cases
richard-gccbugzilla at metafoo dot co.uk
gcc-bugzilla@gcc.gnu.org
Tue Apr 25 20:11:00 GMT 2017
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80513
--- Comment #1 from Richard Smith <richard-gccbugzilla at metafoo dot co.uk> ---
While we're here, this check for overflow in consume_count is nonsense, and any
decent optimising compiler is going to optimise away the overflow check:
https://github.com/gcc-mirror/gcc/blob/master/libiberty/cplus-dem.c#L525
Testcase:
$ echo '_Z4294967297x' | c++filt
x
Oops.
It looks like item 2 in comment#0 was fixed recently
(https://github.com/gcc-mirror/gcc/commit/b2dcfe3da47412480529c8591ba0433cd495fbe3)
but item 1 is still live.
More information about the Gcc-bugs
mailing list