This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 1/4] tui-disasm: Fix window content buffer overrun
On Tue, Nov 08 2016, Pedro Alves wrote:
[...]
> Missing copyright header.
Added.
> Funny, I was just playing with throwing a large
> function name at the compiler last week, after seeing:
>
> https://sourceware.org/ml/binutils/2016-11/msg00027.html
Wow, "mangled name of some 590K characters"... that's impressive. The
TUI crash already occurs with much shorter names. On the other hand,
IIRC, I had a version of my test with more than that (I think it was
over 1MB), and it worked. So I'm not sure why I didn't hit the problem
above.
[...]
>> + fail "compile"
>
> Shouldn't this be "untested" ?
Yeah, probably more appropriate. Changed.
[...]
> This is OK.
Thanks. I pushed the whole patch series with the changes above.
> This could probably all be greatly simplified with std::string
> and getting rid of the alloca...
Also note that the current implementation has a usability issue. With
long mangled names, the instructions are no longer visible on the
screen, and a lot of scrolling may be required. See also
https://sourceware.org/bugzilla/show_bug.cgi?id=15580
Of course, fixing that would be a different topic.
--
Andreas