Skip to content

Shell crashes with core dump on certain tab completions #9137

@torkelrogstad

Description

@torkelrogstad

I'm getting a very unexpected crash when trying to tab complete a specific string. This is the minimum example I've been able to create:

$ echo "/?$

When hitting <TAB> while the cursor is at the end of the line (right next to the $) I get a crash:

❯ echo "/?$error: /build/fish-6NpQP7/fish-3.5.1/src/fallback.cpp:209: failed assertion: width > 0 && "Unexpectedly nonpositive width"
<E> fish: Backtrace:
0   fish(+0x61972) [0x55e6ac675972]
1   fish(+0xcc592) [0x55e6ac6e0592]
2   fish(+0xc25cd) [0x55e6ac6d65cd]
3   fish(+0xacffb) [0x55e6ac6c0ffb]
4   fish(+0xbd70f) [0x55e6ac6d170f]
5   fish(+0xba347) [0x55e6ac6ce347]
6   fish(+0xbad40) [0x55e6ac6ced40]
7   fish(+0x1613a) [0x55e6ac62a13a]
8   /lib/x86_64-linux-gnu/libc.so.6(+0x29d90) [0x7f7a40b2fd90]
9   __libc_start_main + 128
10  fish(+0x17aee) [0x55e6ac62baee]

Aborted (core dumped)

System info:

❯ fish --version
fish, version 3.5.1

❯ echo $version
3.5.1

❯ echo $TERM
xterm-256color

❯ uname -a
Linux torkel 5.15.0-43-generic #46-Ubuntu SMP Tue Jul 12 10:30:17 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intendedregressionSomething that used to work, but was broken, especially between releases

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions