Results for ysh-func.test.sh

statusyshysh-cpp
pass 3029
FAIL 01
total3030
caseyshysh-cppdescription
0pass pass Identity function
1pass pass Too many args
2pass pass Too few args
3pass pass Positional args
4pass pass named args
5pass pass Named args with ...rest
6pass pass Spread/splat of named args: f(...more)
7pass pass Multiple spreads
8pass pass Proc-style return in a func is error
9pass pass Typed return in a proc is error
10pass pass Redefining functions is not allowed (with shopt -u redefine_proc_func)
11pass pass Redefining functions is allowed (with shopt -s redefine_proc_func)
12pass pass Functions cannot redefine readonly vars (even with shopt -s redefine_proc_func)
13pass pass Functions can redefine non-readonly vars
14pass pass Vars cannot redefine functions (even with shopt -s redefine_proc_func)
15pass pass Multiple func calls
16pass pass Undefined var in function
17pass pass Param binding semantics
18pass pass Recursive functions
19pass pass Recursive functions with LRU Cache
20pass pass Varadic arguments, no other args
21pass pass Varadic arguments, other args
22pass pass Varadic arguments, too few args
23pass pass Userland max
24pass pass Functions share a namespace with variables
25pass FAIL We can store funcs in dictionaries
details
26pass pass Functions cannot be nested
27pass pass Functions can be shadowed
28pass pass Function names cannot be redeclared
29pass pass Functions cannot be mutated
59 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

ysh-cpp25 We can store funcs in dictionaries

[ysh-cpp stdout] Expected 'This is a DOG\nWoof\nThis is a CAT\nMeow\n', got ''
[ysh-cpp status] Expected 0, got 1

stdout:
stderr: 
AddressSanitizer:DEADLYSIGNAL
=================================================================
==29120==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000000 (pc 0x5653867db5ca bp 0x7ffd830d12c0 sp 0x7ffd830d12a0 T0)
==29120==The signal is caused by a READ memory access.
==29120==Hint: address points to the zero page.
    #0 0x5653867db5c9 in Dict<BigStr*, value_asdl::value_t*>::find_kv_index(BigStr*) const /home/uke/oil/mycpp/gc_dict.h:367
    #1 0x5653866eafdc in Dict<BigStr*, value_asdl::value_t*>::get(BigStr*) const (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x437fdc)
    #2 0x56538667b419 in expr_eval::ExprEvaluator::_EvalDot(syntax_asdl::Attribute*, value_asdl::value_t*) _gen/bin/oils_for_unix.mycpp.cc:51352
    #3 0x56538667c6dd in expr_eval::ExprEvaluator::_EvalAttribute(syntax_asdl::Attribute*) _gen/bin/oils_for_unix.mycpp.cc:51435
    #4 0x56538667f544 in expr_eval::ExprEvaluator::_EvalExpr(syntax_asdl::expr_t*) _gen/bin/oils_for_unix.mycpp.cc:51698
    #5 0x565386678fc2 in expr_eval::ExprEvaluator::_EvalFuncCall(syntax_asdl::expr__FuncCall*) _gen/bin/oils_for_unix.mycpp.cc:51193
    #6 0x56538667f38d in expr_eval::ExprEvaluator::_EvalExpr(syntax_asdl::expr_t*) _gen/bin/oils_for_unix.mycpp.cc:51686
    #7 0x56538666fe2d in expr_eval::ExprEvaluator::EvalExpr(syntax_asdl::expr_t*, syntax_asdl::loc_t*) _gen/bin/oils_for_unix.mycpp.cc:50494
    #8 0x5653865b4a4e in cmd_eval::CommandEvaluator::_DoVarDecl(syntax_asdl::command__VarDecl*) _gen/bin/oils_for_unix.mycpp.cc:35523
    #9 0x5653865c3f42 in cmd_eval::CommandEvaluator::_Dispatch(syntax_asdl::command_t*, runtime_asdl::CommandStatus*) _gen/bin/oils_for_unix.mycpp.cc:36646
    #10 0x5653865c61a6 in cmd_eval::CommandEvaluator::_Execute(syntax_asdl::command_t*) _gen/bin/oils_for_unix.mycpp.cc:36853
    #11 0x5653865c6f78 in cmd_eval::CommandEvaluator::_ExecuteList(List<syntax_asdl::command_t*>*) _gen/bin/oils_for_unix.mycpp.cc:36918
    #12 0x5653865c4527 in cmd_eval::CommandEvaluator::_Dispatch(syntax_asdl::command_t*, runtime_asdl::CommandStatus*) _gen/bin/oils_for_unix.mycpp.cc:36688
    #13 0x5653865c61a6 in cmd_eval::CommandEvaluator::_Execute(syntax_asdl::command_t*) _gen/bin/oils_for_unix.mycpp.cc:36853
    #14 0x5653865bdd3a in cmd_eval::CommandEvaluator::_DoForEach(syntax_asdl::command__ForEach*) _gen/bin/oils_for_unix.mycpp.cc:36196
    #15 0x5653865c4705 in cmd_eval::CommandEvaluator::_Dispatch(syntax_asdl::command_t*, runtime_asdl::CommandStatus*) _gen/bin/oils_for_unix.mycpp.cc:36705
    #16 0x5653865c61a6 in cmd_eval::CommandEvaluator::_Execute(syntax_asdl::command_t*) _gen/bin/oils_for_unix.mycpp.cc:36853
    #17 0x5653865c7f0e in cmd_eval::CommandEvaluator::ExecuteAndCatch(syntax_asdl::command_t*, int) _gen/bin/oils_for_unix.mycpp.cc:37024
    #18 0x565386525db9 in main_loop::Batch(cmd_eval::CommandEvaluator*, cmd_parse::CommandParser*, ui::ErrorFormatter*, int) _gen/bin/oils_for_unix.mycpp.cc:24417
    #19 0x5653866d13cd in shell::Main(BigStr*, args::Reader*, Dict<BigStr*, BigStr*>*, bool, pyutil::_ResourceLoader*, py_readline::Readline*) _gen/bin/oils_for_unix.mycpp.cc:57393
    #20 0x565386477429 in oils_for_unix::AppBundleMain(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:12377
    #21 0x565386477a8b in oils_for_unix::main(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:12413
    #22 0x5653866d3522 in main _gen/bin/oils_for_unix.mycpp.cc:57415
    #23 0x7f1867f5c09a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #24 0x565386450fc9 in _start (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x19dfc9)

AddressSanitizer can not provide additional info.
SUMMARY: AddressSanitizer: SEGV /home/uke/oil/mycpp/gc_dict.h:367 in Dict<BigStr*, value_asdl::value_t*>::find_kv_index(BigStr*) const
==29120==ABORTING