cd panics inside user declared fn
What happens
Function builtin_cd panics
and crashes ion.
How to reproduce
Declare function:
fn panic_cd name
cd $name
end
And simply use it on existing directory:
panic_cd /etc/
Backtrace
thread 'main' panicked at 'internal error: entered unreachable code', src/lib/shell/directory_stack.rs:244:21
stack backtrace:
0: 0x5631c01c7fb3 - std::sys::unix::backtrace::tracing::imp::unwind_backtrace::headdb40944432803
at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39
1: 0x5631c01c64bb - std::panicking::default_hook::{{closure}}::h5d35079c45240518
at src/libstd/sys_common/backtrace.rs:71
at src/libstd/sys_common/backtrace.rs:59
at src/libstd/panicking.rs:197
2: 0x5631c01c54e0 - std::panicking::rust_panic_with_hook::h7a721f63a163d404
at src/libstd/panicking.rs:211
at src/libstd/panicking.rs:474
3: 0x5631c001cab3 - std::panicking::begin_panic::h1ad27cb578f7eb9c
4: 0x5631c00e9c8d - ion_shell::builtins::builtin_cd::h82f16379669ef877
5: 0x5631c00c2de2 - ion_shell::shell::Shell::run_pipeline::h471982589f6df2f4
6: 0x5631c00be461 - <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::execute_statement::he4eb3cbcb68e7bfd
7: 0x5631c0089275 - <core::iter::adapters::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h13785fe303ca1810
8: 0x5631c00c6633 - <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::execute_statements::h659952c7251c30cf
9: 0x5631c0048a7a - ion_shell::shell::flow_control::Function::execute::h88da4c4bbd68b46a
10: 0x5631c00c2b78 - ion_shell::shell::Shell::run_pipeline::h471982589f6df2f4
11: 0x5631c00be461 - <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::execute_statement::he4eb3cbcb68e7bfd
12: 0x5631c00bbe89 - <ion_shell::shell::Shell as ion_shell::shell::flow::FlowLogic>::on_command::hde139f9e9101e868
13: 0x5631c00ba7c2 - <ion_shell::shell::Shell as ion_shell::shell::binary::Binary>::execute_interactive::ha3a98915b45028ca
14: 0x5631c01e41e2 - ion::main::hb006e309ff3cbfcf
15: 0x5631c01e4b62 - std::rt::lang_start::{{closure}}::hc6e922937af3ec9c
16: 0x5631c01e3460 - main
17: 0x7fe9ad581222 - __libc_start_main
18: 0x5631c000a15d - _start
19: 0x0 - <unknown>
ion: process (28709) had a core dump