Package: tig Version: 2.4.1-1build1 Severity: normal Dear Maintainer,
export GIT_PAGER="tig" git log or just git log | tig Then, write '/' and hit enter, tig will crash. This is the backtrace when launching it as git log | gdb -ex r -ex "set logging on" -ex "bt full" -ex quit --args tig #0 0x00007ffff7f84a20 in _rl_update_final () at ./display.c:2972 full_lines = 0 woff = 0 botline_length = <optimized out> #1 0x00007ffff7f8b695 in rl_newline (count=<optimized out>, key=<optimized out>) at ./text.c:1105 No locals. #2 0x00007ffff7f6d707 in _rl_dispatch_subseq (key=13, map=<optimized out>, got_subseq=<optimized out>) at ./readline.c:852 r = 0 newkey = <optimized out> macro = <optimized out> func = 0x7ffff7f8b5d0 <rl_newline> cxt = <optimized out> #3 0x00007ffff7f6dbf5 in _rl_dispatch (key=<optimized out>, map=<optimized out>) at ./readline.c:798 No locals. #4 0x00007ffff7f6dcc5 in readline_internal_char () at ./readline.c:632 lastc = 13 eof_found = <optimized out> c = <optimized out> code = <optimized out> lk = 0 r = <optimized out> #5 0x00007ffff7f6e4ed in readline_internal_charloop () at ./readline.c:659 eof = 1 #6 readline_internal () at ./readline.c:671 No locals. #7 readline (prompt=prompt@entry=0x5555555928da "/") at ./readline.c:377 value = <optimized out> #8 0x000055555557200d in read_prompt (prompt=prompt@entry=0x5555555928da "/") at src/prompt.c:499 line = 0x0 last_entry = <optimized out> #9 0x000055555557a2f6 in search_view (view=0x5555555ea9e0 <pager_view>, request=REQ_SEARCH) at src/search.c:240 prompt = 0x5555555928da "/" search = <optimized out> #10 0x000055555556134d in view_driver (request=REQ_SEARCH, view=0x5555555ea9e0 <pager_view>) at src/tig.c:296 i = <optimized out> i = <optimized out> line = <optimized out> nviews = <optimized out> next_view = <optimized out> #11 main (argc=<optimized out>, argv=<optimized out>) at src/tig.c:840 codeset = <optimized out> pager_mode = true request = <optimized out> view = <optimized out> Attaching the debdiff that fixes the issue -- System Information: Debian Release: buster/sid APT prefers eoan-updates APT policy: (500, 'eoan-updates'), (500, 'eoan-security'), (500, 'eoan-proposed'), (500, 'eoan') Architecture: amd64 (x86_64) Kernel: Linux 4.18.0-21-generic (SMP w/8 CPU cores) Kernel taint flags: TAINT_WARN, TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=it_IT.UTF-8, LC_CTYPE=it_IT.UTF-8 (charmap=UTF-8), LANGUAGE=it_IT.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) Versions of packages tig depends on: ii git [git-core] 1:2.20.1-2ubuntu1 ii libc6 2.30-0ubuntu2 ii libncursesw6 6.1+20190803-1ubuntu1 ii libreadline8 8.0-3 ii libtinfo6 6.1+20190803-1ubuntu1 tig recommends no packages. tig suggests no packages. -- no debconf information
diff -Nru tig-2.4.1/debian/changelog tig-2.4.1/debian/changelog --- tig-2.4.1/debian/changelog 2018-11-08 23:08:23.000000000 +0100 +++ tig-2.4.1/debian/changelog 2019-11-04 16:59:51.000000000 +0100 @@ -1,3 +1,10 @@ +tig (2.4.1-2) UNRELEASED; urgency=medium + + * debian/patches/0001-Fix-segfaults-with-readline-8.0.patch: + - Fix a crash when using readline 8.0 (LP: #1851235) + + -- Marco Trevisan (TreviƱo) <ma...@ubuntu.com> Mon, 04 Nov 2019 16:59:51 +0100 + tig (2.4.1-1) unstable; urgency=medium * New upstream version. diff -Nru tig-2.4.1/debian/patches/0001-Fix-segfaults-with-readline-8.0.patch tig-2.4.1/debian/patches/0001-Fix-segfaults-with-readline-8.0.patch --- tig-2.4.1/debian/patches/0001-Fix-segfaults-with-readline-8.0.patch 1970-01-01 01:00:00.000000000 +0100 +++ tig-2.4.1/debian/patches/0001-Fix-segfaults-with-readline-8.0.patch 2019-11-04 16:59:51.000000000 +0100 @@ -0,0 +1,53 @@ +From ea43f8be22c7b985c7c752d938579fe14d8e9f08 Mon Sep 17 00:00:00 2001 +From: Thomas Koutcher <thomas.koutc...@online.fr> +Date: Mon, 22 Apr 2019 18:37:34 +0200 +Subject: [PATCH] Fix segfaults with readline 8.0 + +Closes #893 + +Origin: https://github.com/jonas/tig/commit/ea43f8be22c7b985c7c752d938579fe14d8e9f08 +Applied-Upstream: 2.4.2 +--- + src/prompt.c | 6 ++++++ + 1 file changed, 6 insertions(+) + +diff --git a/src/prompt.c b/src/prompt.c +index c85bc5d..831e4c9 100644 +--- a/src/prompt.c ++++ b/src/prompt.c +@@ -475,11 +475,14 @@ readline_init(void) + /* Let ncurses deal with the LINES and COLUMNS environment variables */ + rl_change_environment = 0; + rl_catch_sigwinch = 0; ++ rl_deprep_term_function = NULL; ++ rl_prep_term_function = NULL; + } + + static void sigint_absorb_handler(int sig) { + signal(SIGINT, SIG_DFL); + prompt_interrupted = true; ++ rl_done = 1; + } + + char * +@@ -496,7 +499,9 @@ read_prompt(const char *prompt) + curs_set(1); + if (signal(SIGINT, sigint_absorb_handler) == SIG_ERR) + die("Failed to setup sigint handler"); ++ cbreak(); + line = readline(prompt); ++ raw(); + if (signal(SIGINT, SIG_DFL) == SIG_ERR) + die("Failed to remove sigint handler"); + curs_set(0); +@@ -507,6 +512,7 @@ read_prompt(const char *prompt) + if (prompt_interrupted) { + free(line); + line = NULL; ++ report_clear(); + } + + prompt_interrupted = false; +-- +2.20.1 + diff -Nru tig-2.4.1/debian/patches/series tig-2.4.1/debian/patches/series --- tig-2.4.1/debian/patches/series 1970-01-01 01:00:00.000000000 +0100 +++ tig-2.4.1/debian/patches/series 2019-11-04 16:59:51.000000000 +0100 @@ -0,0 +1 @@ +0001-Fix-segfaults-with-readline-8.0.patch