Results for ysh-proc.test.sh

statusoshosh-cpp
pass 2827
FAIL 01
total2828
caseoshosh-cppdescription
0pass pass Open proc (any number of args)
1pass pass Closed proc with no args, passed too many
2pass pass Open proc has ARGV
3pass pass Closed proc has empty "$@" or ARGV
4pass pass Proc with default args
5pass pass Proc with word params
6pass pass Proc with ... "rest" word params
7pass pass word rest params 2
8pass pass proc with typed args
9pass pass Proc name-with-hyphen
10pass pass Proc with block arg
11pass pass proc returning wrong type
12pass pass proc returning invalid string
13pass pass 'return' doesn't accept expressions
14pass pass declare -F prints procs and shell-funcs
15pass pass procs are in same namespace as variables
16pass pass Nested proc is disallowed at parse time
17pass pass Procs defined inside compound statements (with redefine_proc)
18pass pass Block can be passed literally, or as expression in third arg group
19pass pass Pass through all 4 kinds of args
20pass pass Global and local ARGV, like "$@"
21pass pass Mutating global ARGV
22pass pass Mutating local ARGV
23pass pass typed proc allows all kinds of args
24pass FAIL can unset procs without -f
details
25pass pass procs shadow sh-funcs
26pass pass first word skips non-proc variables
27pass pass proc resolution changes with the local scope
55 passed, 0 OK, 0 not implemented, 0 BUG, 0 failed, 0 timeouts, 0 cases skipped

Details on runs that didn't PASS

osh-cpp24 can unset procs without -f

[osh-cpp stdout] Expected 'bar\nstatus=0\ndeclare -f foo\nstatus=127\n', got 'bar\n'
[osh-cpp status] Expected 0, got 1

stdout:
bar
stderr:
AddressSanitizer:DEADLYSIGNAL
=================================================================
==31487==ERROR: AddressSanitizer: SEGV on unknown address 0x000000000010 (pc 0x556636ab55dd bp 0x7ffc9218a530 sp 0x7ffc9218a510 T0)
==31487==The signal is caused by a READ memory access.
==31487==Hint: address points to the zero page.
    #0 0x556636ab55dc in Dict<BigStr*, value_asdl::value_t*>::find_kv_index(BigStr*) const /home/uke/oil/mycpp/gc_dict.h:367
    #1 0x5566369c4fdc in Dict<BigStr*, value_asdl::value_t*>::get(BigStr*) const (/home/uke/oil/_bin/cxx-asan/oils-for-unix+0x437fdc)
    #2 0x556636955419 in expr_eval::ExprEvaluator::_EvalDot(syntax_asdl::Attribute*, value_asdl::value_t*) _gen/bin/oils_for_unix.mycpp.cc:51352
    #3 0x5566369566dd in expr_eval::ExprEvaluator::_EvalAttribute(syntax_asdl::Attribute*) _gen/bin/oils_for_unix.mycpp.cc:51435
    #4 0x556636959544 in expr_eval::ExprEvaluator::_EvalExpr(syntax_asdl::expr_t*) _gen/bin/oils_for_unix.mycpp.cc:51698
    #5 0x556636949e2d in expr_eval::ExprEvaluator::EvalExpr(syntax_asdl::expr_t*, syntax_asdl::loc_t*) _gen/bin/oils_for_unix.mycpp.cc:50494
    #6 0x55663694a682 in expr_eval::ExprEvaluator::EvalExprSub(syntax_asdl::word_part__ExprSub*) _gen/bin/oils_for_unix.mycpp.cc:50521
    #7 0x55663690f4da in word_eval::AbstractWordEvaluator::_EvalWordPart(syntax_asdl::word_part_t*, List<runtime_asdl::part_value_t*>*, int) _gen/bin/oils_for_unix.mycpp.cc:45998
    #8 0x55663691047c in word_eval::AbstractWordEvaluator::_EvalWordToParts(syntax_asdl::CompoundWord*, List<runtime_asdl::part_value_t*>*, int) _gen/bin/oils_for_unix.mycpp.cc:46064
    #9 0x556636918ea4 in word_eval::AbstractWordEvaluator::SimpleEvalWordSequence2(List<syntax_asdl::CompoundWord*>*, bool, bool) _gen/bin/oils_for_unix.mycpp.cc:46608
    #10 0x556636919c51 in word_eval::AbstractWordEvaluator::EvalWordSequence2(List<syntax_asdl::CompoundWord*>*, bool, bool) _gen/bin/oils_for_unix.mycpp.cc:46647
    #11 0x5566368918cc in cmd_eval::CommandEvaluator::_DoSimple(syntax_asdl::command__Simple*, runtime_asdl::CommandStatus*) _gen/bin/oils_for_unix.mycpp.cc:35695
    #12 0x55663689d36b in cmd_eval::CommandEvaluator::_Dispatch(syntax_asdl::command_t*, runtime_asdl::CommandStatus*) _gen/bin/oils_for_unix.mycpp.cc:36574
    #13 0x5566368a01a6 in cmd_eval::CommandEvaluator::_Execute(syntax_asdl::command_t*) _gen/bin/oils_for_unix.mycpp.cc:36853
    #14 0x5566368a1f0e in cmd_eval::CommandEvaluator::ExecuteAndCatch(syntax_asdl::command_t*, int) _gen/bin/oils_for_unix.mycpp.cc:37024
    #15 0x5566367ffdb9 in main_loop::Batch(cmd_eval::CommandEvaluator*, cmd_parse::CommandParser*, ui::ErrorFormatter*, int) _gen/bin/oils_for_unix.mycpp.cc:24417
    #16 0x5566369ab3cd in shell::Main(BigStr*, args::Reader*, Dict<BigStr*, BigStr*>*, bool, pyutil::_ResourceLoader*, py_readline::Readline*) _gen/bin/oils_for_unix.mycpp.cc:57393
    #17 0x55663675153f in oils_for_unix::AppBundleMain(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:12381
    #18 0x556636751a8b in oils_for_unix::main(List<BigStr*>*) _gen/bin/oils_for_unix.mycpp.cc:12413
    #19 0x5566369ad522 in main _gen/bin/oils_for_unix.mycpp.cc:57415
    #20 0x7f76e558009a in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x2409a)
    #21 0x55663672afc9 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
==31487==ABORTING