8000 Fish 3.6.0 crashes every time when trying to search cyrillic text in history · Issue #9628 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Fish 3.6.0 crashes every time when trying to search cyrillic text in history #9628

@ZaWertun

Description

@ZaWertun

Steps to reproduce:

  1. Start fish shell;
  2. Type тест, press up arrow;
  3. Crash.

Error displayed after crash:

error: /builddir/build/BUILD/fish-3.6.0/src/reader.cpp:431: failed assertion: offset != wcstring::npos && "Should have found a match in the search result"

Backtrace from gdb after installing debug symbols:

#0  0x00007ffff79cfe5c in __pthread_kill_implementation () from /lib64/libc.so.6
#1  0x00007ffff797fa76 in raise () from /lib64/libc.so.6
#2  0x00007ffff79697fc in abort () from /lib64/libc.so.6
#3  0x000055555557907b in __fish_assert (msg=0x5555556ac79
7DC9
0 "offset != wcstring::npos && \"Should have found a match in the search result\"", file=0x5555556a9e18 "/builddir/build/BUILD/fish-3.6.0/src/reader.cpp", line=431, error=<optimized out>)
    at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/common.cpp:1860
#4  0x00005555555dc4e9 in (anonymous namespace)::reader_history_search_t::append_matches_from_search (this=0x5555557b2750) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:431
#5  (anonymous namespace)::reader_history_search_t::move_backwards (this=0x5555557b2750) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:472
#6  (anonymous namespace)::reader_history_search_t::move_in_direction (dir=history_search_direction_t::backward, this=0x5555557b2750) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:497
#7  reader_data_t::handle_readline_command (this=0x5555557b2070, c=<optimized out>, rls=...) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:3715
#8  0x00005555555deb6c in reader_data_t::readline[abi:cxx11](int) (this=0x5555557b2070, nchars_or_0=<optimized out>) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:4484
#9  0x00005555555e4788 in read_i (parser=...) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:3201
#10 reader_read (parser=..., fd=<optimized out>, io=...) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:4749
#11 0x000055555556924c in main (argc=<optimized out>, argv=<optimized out>) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/fish.cpp:576

Reproducable: always.

Fish version: 3.6.0, from Fedora package fish-3.6.0-1.fc37.x86_64.

When testing in clean environment using command sh -c 'env HOME=$(mktemp -d) fish' it could be reproduced as follows:

  1. Run sh -c 'env HOME=$(mktemp -d) fish';
  2. Enter command echo Тест and hit Enter (notice capital Т);
  3. Type тест and press up arrow key;
  4. Crash.

Looks like it's something wrong when searching history case insensitive.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething that's not working as intended

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0