Skip to content

Tmux 3.3a crashes when copying in copy-mode #3699

@sanjayankur31

Description

@sanjayankur31

Issue description

Tmux reliably crashes when copying text in copy mode.

Required information

Please provide the following information:

  • tmux version (tmux -V). tmux 3.3a
  • Platform (uname -sp). Linux unknown
  • $TERM inside and outside of tmux (echo $TERM). xterm-256color
  • Logs from tmux (tmux kill-server; tmux -vv new).

tmux-out-3920351.log.txt
tmux-server-3920351.log.txt
tmux-client-3920349.log.txt

Steps to reproduce:

  • start tmux
  • enter copy mode: C-b [
  • Make a selection: space
  • copy selection: enter
  • watch segfault

This is on a Fedora 39 install. abrt automatically generated a trace etc in the downstream report here:
https://bugzilla.redhat.com/show_bug.cgi?id=2239333

Truncated backtrace:
Thread no. 1 (19 frames)
 #0 tty_puts at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/tty.c:570
 #1 tty_putcode_ptr2.part.0.constprop.0 at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/tty.c:544
 #2 tty_putcode_ptr2 at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/tty.c:2107
 #3 tty_set_selection at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/tty.c:2104
 #5 tty_write at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/tty.c:1630
 #6 screen_write_setselection at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/screen-write.c:2096
 #7 window_copy_copy_buffer.isra.0 at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/window-copy.c:4573
 #8 window_copy_copy_selection at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/window-copy.c:4628
 #9 window_copy_cmd_copy_selection_no_clear at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/window-copy.c:1176
 #10 window_copy_cmd_copy_selection_and_cancel at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/window-copy.c:1197
 #11 window_copy_command at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/window-copy.c:2916
 #12 cmd_send_keys_exec at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/cmd-send-keys.c:176
 #13 cmdq_fire_command at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/cmd-queue.c:647
 #14 cmdq_next at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/cmd-queue.c:763
 #15 server_loop at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/server.c:270
 #16 proc_loop at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/proc.c:222
 #17 server_start at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/server.c:251
 #18 client_connect at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/client.c:164
 #19 client_main at /usr/src/debug/tmux-3.3a-4.fc39.x86_64/client.c:287

Other package versions:

$ rpm -qa \*tmux\* \*ncurses\*
ncurses-base-6.4-7.20230520.fc39.noarch
ncurses-libs-6.4-7.20230520.fc39.x86_64
ncurses-6.4-7.20230520.fc39.x86_64
ncurses-c++-libs-6.4-7.20230520.fc39.x86_64
ncurses-devel-6.4-7.20230520.fc39.x86_64
tmux-3.3a-4.fc39.x86_64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions