You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
#00x00007ffff79cfe5c in __pthread_kill_implementation () from /lib64/libc.so.6
#10x00007ffff797fa76 in raise () from /lib64/libc.so.6
#20x00007ffff79697fc in abort () from /lib64/libc.so.6
#30x000055555557907b in __fish_assert (msg=0x5555556ac790"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
#40x00005555555dc4e9in (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
#7reader_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
#80x00005555555deb6c 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
#90x00005555555e4788 in read_i (parser=...) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:3201
#10reader_read (parser=..., fd=<optimized out>, io=...) at /usr/src/debug/fish-3.6.0-1.fc37.x86_64/src/reader.cpp:4749
#110x000055555556924c 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:
Run sh -c 'env HOME=$(mktemp -d) fish';
Enter command echo Тест and hit Enter (notice capital Т);
Type тест and press up arrow key;
Crash.
Looks like it's something wrong when searching history case insensitive.
The text was updated successfully, but these errors were encountered:
Okay, let's remove the ridiculous assert for now. If we do that, it won't match case-insensitively (it appears either std::upper is borked, or how we use it is wrong), but it'll match case-sensitively and won't crash.
Honestly I would prefer if we didn't use asserts in the reader like that.
It doesn't really pay to invest too much effort into the C++ code right now because it'll be gone next release, and locale-stuff is really quite awkward in C++.
This isn't a great use of `assert` because it turns a benign "oh I
need to search again" bug into a crash.
Fixes#9628
(cherry picked from commit 7c91d00)
Steps to reproduce:
тест
, press up arrow;Error displayed after crash:
Backtrace from gdb after installing debug symbols:
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:sh -c 'env HOME=$(mktemp -d) fish'
;echo Тест
and hit Enter (notice capitalТ
);тест
and press up arrow key;Looks like it's something wrong when searching history case insensitive.
The text was updated successfully, but these errors were encountered: