[Bug tui/24197] Memory corruption when using tui

cvs-commit at gcc dot gnu.org sourceware-bugzilla@sourceware.org
Sun Feb 17 17:47:00 GMT 2019


https://sourceware.org/bugzilla/show_bug.cgi?id=24197

--- Comment #4 from cvs-commit at gcc dot gnu.org <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Tom Tromey <tromey@sourceware.org>:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=0c820d679358aa1ec7cd9e33c4bc23a7db964ea1

commit 0c820d679358aa1ec7cd9e33c4bc23a7db964ea1
Author: Tom Tromey <tom@tromey.com>
Date:   Mon Jan 28 13:21:35 2019 -0700

    Fix some valgrind errors in the TUI

    The styling series introduced some new errors in the TUI -- the series
    changed how source lines are allocated, without updating
    tui_set_source_content_nil.

    There are several failures but a typical one looks like:

    ==6274== Use of uninitialised value of size 8
    ==6274==    at 0x4E4A095: wclrtoeol (in /usr/lib64/libncursesw.so.6.1)
    ==6274==    by 0x4E47617: waddch (in /usr/lib64/libncursesw.so.6.1)
    ==6274==    by 0x8325CB: tui_puts_internal(_win_st*, char const*, int*)
(tui-io.c:393)
    ==6274==    by 0x82E89D: tui_file::puts(char const*) (tui-file.c:39)
    ==6274==    by 0x84BF5F: vfprintf_unfiltered(ui_file*, char const*,
__va_list_tag*) (utils.c:2026)

    This patch rewrites tui_set_source_content_nil, fixing the bug.

    This was also reported as PR tui/24197.

    Verified by running valgrind before and after on x86-64 Fedora 29.

    gdb/ChangeLog
    2019-02-17  Tom Tromey  <tom@tromey.com>

        PR tui/24197:
        * tui/tui-source.c (tui_set_source_content_nil): Rewrite.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the Gdb-prs mailing list