Discussion:
[Bug tui/21599] New: gdb crashes when in TUI mode and terminal window is made small
sergiodj at redhat dot com
2017-06-14 21:00:20 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21599

Bug ID: 21599
Summary: gdb crashes when in TUI mode and terminal window is
made small
Product: gdb
Version: HEAD
Status: NEW
Severity: normal
Priority: P2
Component: tui
Assignee: sergiodj at redhat dot com
Reporter: sergiodj at redhat dot com
CC: jlebon at redhat dot com
Target Milestone: ---

[ Clone of https://bugzilla.redhat.com/show_bug.cgi?id=1459334 ]

Description of problem:

gdb will crash in TUI mode if the terminal window gets too small.

Version-Release number of selected component (if applicable):

$ rpm -q gdb
gdb-7.12.1-48.fc25.x86_64

How reproducible:

Always

Steps to Reproduce:
1. Start gdb
2. Enter TUI mode
3. Make the terminal window (or tmux pane) very small

Actual results:

gdb crashes

Expected results:

gdb doesn't crash

Additional info:
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2017-06-14 21:09:52 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21599

Sergio Durigan Junior <sergiodj at redhat dot com> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED

--- Comment #1 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
More instructions on how to reproduce.

1) Enter tmux. I am assuming that the modifier sequence for your tmux is C-b
(the default).

2) Split the pane horizontally (C-b ").

3) Start GDB in TUI mode (gdb -tui) on the upper pane.

4) Resize the upper pane, making it as small as possible (C-b <upper-arrow>,
repeatedly).

You should see a segmentation fault.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-02 17:29:47 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21599

Tom Tromey <tromey at sourceware dot org> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at sourceware dot org

--- Comment #2 from Tom Tromey <tromey at sourceware dot org> ---
#0 0x00007fad3f9759fb in raise () at /lib64/libc.so.6
#1 0x00007fad3f977800 in abort () at /lib64/libc.so.6
#2 0x00007fad3f9bbbb1 in __libc_message () at /lib64/libc.so.6
#3 0x00007fad3f9c6a59 in _int_free () at /lib64/libc.so.6
#4 0x00007fad3f9cc3be in free () at /lib64/libc.so.6
#5 0x000000000062255d in xfree<tui_win_element>(tui_win_element*)
(ptr=0x7fad3fd0eb48 <main_arena+104>) at
../../binutils-gdb/gdb/common/common-utils.h:60
#6 0x00000000006223f9 in free_content_elements(tui_win_content, int,
tui_win_type) (content=0x32f14e0, content_size=0, type=EXEC_INFO_WIN) at
../../binutils-gdb/gdb/tui/tui-data.c:901
#7 0x00000000006222d4 in free_content(tui_win_content, int, tui_win_type)
(content=0x32f14e0, content_size=0, win_type=EXEC_INFO_WIN) at
../../binutils-gdb/gdb/tui/tui-data.c:845
#8 0x0000000000622192 in tui_free_win_content(tui_gen_win_info*)
(win_info=0x1fdc4c0 <exec_info>) at ../../binutils-gdb/gdb/tui/tui-data.c:773
#9 0x0000000000634493 in make_visible_with_new_height(tui_win_info*)
(win_info=0x33f39a0) at ../../binutils-gdb/gdb/tui/tui-win.c:1474
#10 0x000000000063325c in tui_resize_all() () at
../../binutils-gdb/gdb/tui/tui-win.c:816
#11 0x00000000006335fe in tui_async_resize_screen(gdb_client_data) (arg=0x0) at
../../binutils-gdb/gdb/tui/tui-win.c:938
#12 0x0000000000875605 in invoke_async_signal_handlers() () at
../../binutils-gdb/gdb/event-loop.c:975
#13 0x00000000008741c3 in gdb_do_one_event() () at
../../binutils-gdb/gdb/event-loop.c:304
#14 0x00000000008742bb in start_event_loop() () at
../../binutils-gdb/gdb/event-loop.c:371
#15 0x0000000000907d3e in captured_command_loop() () at
../../binutils-gdb/gdb/main.c:330
#16 0x0000000000909126 in captured_main(void*) (data=0x7ffe860119e0) at
../../binutils-gdb/gdb/main.c:1173
#17 0x00000000009091e2 in gdb_main(captured_main_args*) (args=0x7ffe860119e0)
at ../../binutils-gdb/gdb/main.c:1189
#18 0x0000000000418a6e in main(int, char**) (argc=4, argv=0x7ffe86011ae8) at
../../binutils-gdb/gdb/gdb.c:32
--
You are receiving this mail because:
You are on the CC list for the bug.
sergiodj at redhat dot com
2018-09-03 00:50:57 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21599

--- Comment #3 from Sergio Durigan Junior <sergiodj at redhat dot com> ---
FWIW, I sent a tentative patch fixing the problem here:

https://sourceware.org/ml/gdb-patches/2017-06/msg00441.html

Simon asked a few questions, found that the patch doesn't really fix the
problem, and I promised to go back, understand the code, and submit a new
patch. I never did that :-/.
--
You are receiving this mail because:
You are on the CC list for the bug.
tromey at sourceware dot org
2018-09-02 20:19:03 UTC
Permalink
https://sourceware.org/bugzilla/show_bug.cgi?id=21599

--- Comment #4 from Tom Tromey <tromey at sourceware dot org> ---
I wish we had a robot that would read gdb-patches and then link
from bugzilla to the patch.
--
You are receiving this mail because:
You are on the CC list for the bug.
Loading...