tui_expand_tabs writes past the end of the buffers it allocates because we forget to zero out col. This results in us adding more spaces than we need to get aligned, and we write past the end of the allocated buffer. This was noticed on Ubuntu Vivid ppc64le, where gdb would SEGV when using the TUI. Reported by Anton Blanchard <anton@samba.org>.
Created attachment 8263 [details] patch used to fix the bug
Fixed with the attached patch.
URL to discussion on gdb-patches: https://www.sourceware.org/ml/gdb-patches/2015-03/msg00472.html