Tig crashes when searching if used as git pager

Bug #1851235 reported by Marco Trevisan (Treviño)
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tig (Debian)
Fix Released
Unknown
tig (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

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

So it looks like more a readline issue

#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
--Type <RET> for more, q to quit, c to continue without paging-- eof = <optimized out>
#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>
A debugging session is active.

ProblemType: Bug
DistroRelease: Ubuntu 19.10
Package: tig 2.4.1-1build1
ProcVersionSignature: Ubuntu 4.18.0-21.22~18.04.1-generic 4.18.20
Uname: Linux 4.18.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu8
Architecture: amd64
CurrentDesktop: ubuntu:GNOME
Date: Mon Nov 4 13:37:48 2019
SourcePackage: tig
UpgradeStatus: No upgrade log present (probably fresh install)

Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :
Changed in readline (Ubuntu):
status: New → Invalid
Revision history for this message
Marco Trevisan (Treviño) (3v1n0) wrote :

---
Ubuntu Bug Squad volunteer triager
http://wiki.ubuntu.com/BugSquad

Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "tig-2.4.1-segfault-fix.debdiff" seems to be a debdiff. The ubuntu-sponsors team has been subscribed to the bug report so that they can review and hopefully sponsor the debdiff. If the attachment isn't a patch, please remove the "patch" flag from the attachment, remove the "patch" tag, and if you are member of the ~ubuntu-sponsors, unsubscribe the team.

[This is an automated message performed by a Launchpad user owned by ~brian-murray, for any issue please contact him.]

tags: added: patch
Mathew Hodson (mhodson)
no longer affects: readline (Ubuntu)
Changed in tig (Ubuntu):
importance: Undecided → Medium
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package tig - 2.4.1-1ubuntu1

---------------
tig (2.4.1-1ubuntu1) focal; 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) <email address hidden> Mon, 04 Nov 2019 16:37:49 +0100

Changed in tig (Ubuntu):
status: New → Fix Released
Changed in tig (Debian):
status: Unknown → New
Changed in tig (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.