Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

read -m abc crashes Fish. #7659

Closed
acomagu opened this issue Jan 26, 2021 · 1 comment
Closed

read -m abc crashes Fish. #7659

acomagu opened this issue Jan 26, 2021 · 1 comment
Labels
bug Something that's not working as intended
Milestone

Comments

@acomagu
Copy link

acomagu commented Jan 26, 2021

read -m abc crashes Fish with SIGABRT

Reproduction:

$ sh -c 'env -i TERM=$TERM HOME=$(mktemp -d) fish'
yuki@acm-envy2-win-wsl /t/tmp.Q2NFvUkKpg> read -m abc
error: /build/fish/src/fish-3.1.2/src/builtin_read.cpp:188: failed assertion: unexpected retval from wgetopt_long
<E> fish: Backtrace:
0   fish(+0x62b73) [0x557cec2dbb73]
1   builtin_read(parser_t&, io_streams_t&, wchar_t**) + 354
2   builtin_run(parser_t&, int, wchar_t**, io_streams_t&) + 310
3   fish(+0xbb039) [0x557cec334039]
4   exec_job(parser_t&, std::shared_ptr<job_t> const&, job_lineage_t const&) + 816
5   parse_execution_context_t::run_1_job(tnode_t<grammar::job>, block_t const*) + 2620
6   parse_execution_context_t::run_job_conjunction(tnode_t<grammar::job_conjunction>, block_t const*) + 424
7   eval_result_t parse_execution_context_t::run_job_list<grammar::job_list>(tnode_t<grammar::job_list>, block_t const*) + 201
8   parse_execution_context_t::eval_node(tnode_t<grammar::job_list>, block_t const*) + 232
9   eval_result_t parser_t::eval_node<grammar::job_list>(std::shared_ptr<parsed_source_t const> const&, tnode_t<grammar::job_list>, job_lineage_t, block_type_
t) + 430
10  fish(+0x104393) [0x557cec37d393]
11  parser_t::eval(std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&, io_chain_t const&, block_type_t, maybe_t<i
nt>) + 249
12  reader_run_command(parser_t&, std::__cxx11::basic_string<wchar_t, std::char_traits<wchar_t>, std::allocator<wchar_t> > const&) + 405
13  reader_read(parser_t&, int, io_chain_t const&) + 1781
14  main + 5964
15  __libc_start_main + 242
16  _start + 46

fish: “sh -c 'env -i TERM=$TERM HOME=$…” terminated by signal SIGABRT (Abort)

Environment:

$ fish --version
fish, version 3.1.2
$ uname -a
Linux acm-envy2-win-wsl 5.4.72-microsoft-standard-WSL2 #1 SMP Wed Oct 28 23:40:43 UTC 2020 x86_64 GNU/Linux
$ echo $TERM
xterm-256color
@krobelus krobelus added the bug Something that's not working as intended label Jan 26, 2021
@krobelus krobelus added this to the fish 3.2.0 milestone Jan 26, 2021
@faho faho closed this as completed in 275534b Jan 26, 2021
@zanchey
Copy link
Member

zanchey commented Feb 7, 2021

Heh. Looks like -B got added by accident in bd8c8ce.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 6, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something that's not working as intended
Projects
None yet
Development

No branches or pull requests

3 participants