Bug 26973 - gdb crashes when not including the status window in a new layout
Summary: gdb crashes when not including the status window in a new layout
Status: RESOLVED FIXED
Alias: None
Product: gdb
Classification: Unclassified
Component: tui (show other bugs)
Version: 10.1
: P2 normal
Target Milestone: 10.2
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-29 17:40 UTC by Hannes Domani
Modified: 2021-11-22 06:48 UTC (History)
14 users (show)

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Hannes Domani 2020-11-29 17:40:27 UTC
If you create a new TUI layout, don't include the status window, and then change from a layout with the status window to the new one, gdb crashes.

(gdb) layout src
(gdb) tui new-layout test src 2 cmd 1
(gdb) layout test

On Windows I get a STATUS_HEAP_CORRUPTION exception (0xc0000374).
It happens because tui_apply_current_layout() deletes all windows that are no longer needed, but the status (locator) window is never allocated dynamically.
Comment 1 cvs-commit@gcc.gnu.org 2020-11-29 17:49:41 UTC
The master branch has been updated by Hannes Domani <ssbssa@sourceware.org>:

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

commit 96fb90861a4ebd78358ade2426d533f09bee129a
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Thu Nov 19 16:49:53 2020 +0100

    Don't delete the locator win info
    
    The locator win info is special because it is static, all the others are
    created dynamically.
    
    gdb/ChangeLog:
    
    2020-11-29  Hannes Domani  <ssbssa@yahoo.de>
    
            PR tui/26973
            * tui/tui-layout.c (tui_apply_current_layout): Don't delete the
            static locator win info.
Comment 2 cvs-commit@gcc.gnu.org 2020-11-29 17:54:48 UTC
The gdb-10-branch branch has been updated by Hannes Domani <ssbssa@sourceware.org>:

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

commit b03dac541f8b2b01c4a562dd4a602f2b5c121aa4
Author: Hannes Domani <ssbssa@yahoo.de>
Date:   Thu Nov 19 16:49:53 2020 +0100

    Don't delete the locator win info
    
    The locator win info is special because it is static, all the others are
    created dynamically.
    
    gdb/ChangeLog:
    
    2020-11-29  Hannes Domani  <ssbssa@yahoo.de>
    
            PR tui/26973
            * tui/tui-layout.c (tui_apply_current_layout): Don't delete the
            static locator win info.
Comment 3 Hannes Domani 2020-11-29 17:55:54 UTC
Fixed.
Comment 4 Ahmed Sayeed 2021-06-27 17:48:53 UTC Comment hidden (spam)
Comment 5 james rohan 2021-09-02 11:06:07 UTC Comment hidden (spam)
Comment 6 Kim Olsun 2021-09-05 07:36:14 UTC Comment hidden (spam)
Comment 7 james robin 2021-09-06 09:08:21 UTC Comment hidden (spam)
Comment 9 Mehmet gelisin 2021-09-10 19:36:58 UTC Comment hidden (spam)
Comment 10 Jari Littlenen 2021-09-14 12:54:24 UTC Comment hidden (spam)
Comment 11 Kylan 2021-09-26 13:31:24 UTC Comment hidden (spam)
Comment 12 Gulsen Engin 2021-10-09 11:00:41 UTC Comment hidden (spam)
Comment 13 studiaviktor 2021-10-09 16:09:09 UTC Comment hidden (spam)
Comment 14 progonsaytu 2021-10-19 07:14:44 UTC Comment hidden (spam)
Comment 15 glassmtech 2021-10-24 10:02:44 UTC Comment hidden (spam)
Comment 16 tesaso8237@funboxcn.com 2021-11-13 19:34:24 UTC Comment hidden (spam)
Comment 17 gexed96894 2021-11-22 06:48:27 UTC Comment hidden (spam)