This is the mail archive of the
gdb-testers@sourceware.org
mailing list for the GDB project.
[binutils-gdb] tui-disasm: Fix window content buffer overrun
- From: sergiodj+buildbot at sergiodj dot net
- To: gdb-testers at sourceware dot org
- Date: Thu, 10 Nov 2016 03:06:25 -0500
- Subject: [binutils-gdb] tui-disasm: Fix window content buffer overrun
- Authentication-results: sourceware.org; auth=none
*** TEST RESULTS FOR COMMIT 0bb65f1e7c9eed7338ef2e4a2f5b42d010409c39 ***
Author: Andreas Arnez <arnez@linux.vnet.ibm.com>
Branch: master
Commit: 0bb65f1e7c9eed7338ef2e4a2f5b42d010409c39
tui-disasm: Fix window content buffer overrun
A user reported a GDB crash with TUI when trying to debug a function
with a long demangled C++ method name. It turned out that the logic for
displaying the TUI disassembly window has a bug that can cause a buffer
overrun, possibly overwriting GDB-internal data structures. In
particular, the logic performs an unguarded strcpy.
Another (harmless) bug in tui_alloc_source_buffer causes the buffer to
be two lines longer than needed. This may have made the crash appear
less frequently.
gdb/ChangeLog:
* tui/tui-disasm.c (tui_set_disassem_content): Fix line buffer
overrun due to unchecked strcpy.
gdb/testsuite/ChangeLog:
* gdb.base/tui-layout.c: New file.
* gdb.base/tui-layout.exp: Use tui-layout.c, to ensure that the
disassembly window contains very long lines.
- Follow-Ups:
- Failures on Debian-s390x-native-gdbserver-m64, branch master
- Failures on Debian-s390x-native-extended-gdbserver-m64, branch master
- Failures on Debian-s390x-m64, branch master
- Failures on Fedora-s390x-m64, branch master
- Failures on Debian-i686-native-extended-gdbserver, branch master
- Failures on Debian-i686, branch master
- Failures on Debian-x86_64-m64, branch master
- Failures on Debian-x86_64-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-gdbserver-m64, branch master
- Failures on Fedora-ppc64be-native-extended-gdbserver-m64, branch master
- Failures on Fedora-ppc64le-native-extended-gdbserver-m64, branch master