Fuzz introspector: terminal_parser_fuzzer
For issues and ideas: https://github.com/ossf/fuzz-introspector/issues

Fuzz blockers

The followings are the branches where fuzzer fails to bypass.

Unique non-covered Complexity Unique Reachable Complexities Unique Reachable Functions All non-covered Complexity All Reachable Complexity Function Name Function Callsite Blocked Branch
74 74 3 :

['std::shared_ptr ::shared_ptr (std::shared_ptr &&)', 'std::shared_ptr std::make_shared ()', 'std::shared_ptr ::~shared_ptr()']

140 170 Parser::Ground::input_state_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:99
0 30 1 :

['Parser::Transition::Transition(Parser::State*, std::shared_ptr )']

140 170 Parser::DCS_Passthrough::input_state_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:344
0 30 1 :

['Parser::Transition::Transition(Parser::State*, std::shared_ptr )']

140 170 Parser::DCS_Ignore::input_state_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:353
0 30 1 :

['Parser::Transition::Transition(Parser::State*, std::shared_ptr )']

140 170 Parser::SOS_PM_APC_String::input_state_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:385
0 0 None 140 170 Parser::State::anywhere_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:46
0 0 None 140 170 Parser::State::anywhere_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:50
0 0 None 140 170 Parser::State::anywhere_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:52
0 0 None 140 170 Parser::State::anywhere_rule(wchar_t)const call site: 00000 /src/mosh/src/terminal/parserstate.cc:54
0 0 None 4 172 Parser::UTF8Parser::input(char,std::vector ,std::allocator >>&) call site: 00000 /src/mosh/src/terminal/parser.cc:105
0 0 None 4 172 Parser::UTF8Parser::input(char,std::vector ,std::allocator >>&) call site: 00000 /src/mosh/src/terminal/parser.cc:114
0 0 None 4 172 Parser::UTF8Parser::input(char,std::vector ,std::allocator >>&) call site: 00000 /src/mosh/src/terminal/parser.cc:139

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 Parser::UTF8Parser::UTF8Parser() [function] [call site] 00001
2 Parser::Parser::Parser() [function] [call site] 00002
2 __ctype_get_mb_cur_max [call site] 00003
1 std::vector , std::allocator > >::vector() [function] [call site] 00004
2 std::_Vector_base , std::allocator > >::_Vector_base() [function] [call site] 00005
3 std::_Vector_base , std::allocator > >::_Vector_impl::_Vector_impl() [function] [call site] 00006
4 std::allocator >::allocator() [function] [call site] 00007
5 __gnu_cxx::new_allocator >::new_allocator() [function] [call site] 00008
4 std::_Vector_base , std::allocator > >::_Vector_impl_data::_Vector_impl_data() [function] [call site] 00009
1 Parser::UTF8Parser::input(char, std::vector , std::allocator > >&) [function] [call site] 00010
2 __assert_fail [call site] 00011
2 Parser::Parser::input(wchar_t, std::vector , std::allocator > >&) [function] [call site] 00012
3 Parser::State::input(wchar_t) const [function] [call site] 00013
4 Parser::State::anywhere_rule(wchar_t) const [function] [call site] 00014
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00015
6 std::__shared_ptr ::__shared_ptr (std::__shared_ptr &&) [function] [call site] 00016
7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count() [function] [call site] 00017
7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::_M_swap(std::__shared_count<(__gnu_cxx::_Lock_policy)2>&) [function] [call site] 00018
5 Parser::Transition::Transition(std::shared_ptr , Parser::State*) [function] [call site] 00019
6 std::shared_ptr ::shared_ptr(std::shared_ptr const&) [function] [call site] 00020
7 std::__shared_ptr ::__shared_ptr(std::__shared_ptr const&) [function] [call site] 00021
8 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count(std::__shared_count<(__gnu_cxx::_Lock_policy)2> const&) [function] [call site] 00022
9 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_add_ref_copy() [function] [call site] 00023
10 __gnu_cxx::__atomic_add_dispatch(int*, int) [function] [call site] 00024
11 __gthread_active_p() [function] [call site] 00025
11 __gnu_cxx::__atomic_add(int volatile*, int) [function] [call site] 00026
11 __gnu_cxx::__atomic_add_single(int*, int) [function] [call site] 00027
9 __clang_call_terminate [call site] 00028
10 __cxa_begin_catch [call site] 00029
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00030
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00031
6 std::shared_ptr ::shared_ptr(std::shared_ptr const&) [function] [call site] 00032
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00033
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00034
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00035
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00036
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00037
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00038
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00039
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00040
5 std::shared_ptr ::shared_ptr (std::shared_ptr &&) [function] [call site] 00041
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00042
5 std::shared_ptr ::shared_ptr() [function] [call site] 00043
6 std::__shared_ptr ::__shared_ptr() [function] [call site] 00044
7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::__shared_count() [function] [call site] 00045
5 Parser::Transition::Transition(Parser::State*, std::shared_ptr ) [function] [call site] 00046
4 Parser::Transition::Transition(Parser::Transition const&) [function] [call site] 00047
5 std::shared_ptr ::shared_ptr(std::shared_ptr const&) [function] [call site] 00048
4 Parser::Transition::Transition(Parser::Transition const&) [function] [call site] 00049
4 Parser::Transition::~Transition() [function] [call site] 00050
5 std::shared_ptr ::~shared_ptr() [function] [call site] 00051
6 std::__shared_ptr ::~__shared_ptr() [function] [call site] 00052
7 std::__shared_count<(__gnu_cxx::_Lock_policy)2>::~__shared_count() [function] [call site] 00053
8 std::_Sp_counted_base<(__gnu_cxx::_Lock_policy)2>::_M_release() [function] [call site] 00054
9 __gnu_cxx::__exchange_and_add_dispatch(int*, int) [function] [call site] 00055
10 __gthread_active_p() [function] [call site] 00056
10 __gnu_cxx::__exchange_and_add(int volatile*, int) [function] [call site] 00057
10 __gnu_cxx::__exchange_and_add_single(int*, int) [function] [call site] 00058
9 __gnu_cxx::__exchange_and_add_dispatch(int*, int) [function] [call site] 00059
9 __clang_call_terminate [call site] 00060
3 append_or_delete(std::shared_ptr , std::vector , std::allocator > >&) [function] [call site] 00061
4 __assert_fail [call site] 00062
4 std::vector , std::allocator > >::push_back(std::shared_ptr const&) [function] [call site] 00063
5 void std::allocator_traits > >::construct , std::shared_ptr const&>(std::allocator >&, std::shared_ptr *, std::shared_ptr const&) [function] [call site] 00064
6 void __gnu_cxx::new_allocator >::construct , std::shared_ptr const&>(std::shared_ptr *, std::shared_ptr const&) [function] [call site] 00065
7 std::shared_ptr ::shared_ptr(std::shared_ptr const&) [function] [call site] 00066
5 std::vector , std::allocator > >::end() [function] [call site] 00067
6 __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >::__normal_iterator(std::shared_ptr * const&) [function] [call site] 00068
5 void std::vector , std::allocator > >::_M_realloc_insert const&>(__gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >, std::shared_ptr const&) [function] [call site] 00069
6 std::vector , std::allocator > >::begin() [function] [call site] 00070
7 __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >::__normal_iterator(std::shared_ptr * const&) [function] [call site] 00071
6 __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >::difference_type __gnu_cxx::operator- *, std::vector , std::allocator > > >(__gnu_cxx::__normal_iterator *, std::vector , std::allocator > > > const&, __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > > const&) [function] [call site] 00072
7 __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >::base() const [function] [call site] 00073
6 std::_Vector_base , std::allocator > >::_M_allocate(unsigned long) [function] [call site] 00074
7 std::allocator_traits > >::allocate(std::allocator >&, unsigned long) [function] [call site] 00075
8 __gnu_cxx::new_allocator >::allocate(unsigned long, void const*) [function] [call site] 00076
9 __gnu_cxx::new_allocator >::max_size() const [function] [call site] 00077
6 void std::allocator_traits > >::construct , std::shared_ptr const&>(std::allocator >&, std::shared_ptr *, std::shared_ptr const&) [function] [call site] 00078
6 __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >::base() const [function] [call site] 00079
6 std::_Vector_base , std::allocator > >::_M_get_Tp_allocator() [function] [call site] 00080
6 std::vector , std::allocator > >::_S_relocate(std::shared_ptr *, std::shared_ptr *, std::shared_ptr *, std::allocator >&) [function] [call site] 00081
7 std::vector , std::allocator > >::_S_do_relocate(std::shared_ptr *, std::shared_ptr *, std::shared_ptr *, std::allocator >&, std::integral_constant ) [function] [call site] 00082
6 __gnu_cxx::__normal_iterator *, std::vector , std::allocator > > >::base() const [function] [call site] 00083
6 std::_Vector_base , std::allocator > >::_M_get_Tp_allocator() [function] [call site] 00084
6 std::_Vector_base , std::allocator > >::_M_deallocate(std::shared_ptr *, unsigned long) [function] [call site] 00085
7 std::allocator_traits > >::deallocate(std::allocator >&, std::shared_ptr *, unsigned long) [function] [call site] 00086
8 __gnu_cxx::new_allocator >::deallocate(std::shared_ptr *, unsigned long) [function] [call site] 00087
3 std::shared_ptr ::~shared_ptr() [function] [call site] 00088
3 std::shared_ptr ::shared_ptr(std::shared_ptr const&) [function] [call site] 00089
3 append_or_delete(std::shared_ptr , std::vector , std::allocator > >&) [function] [call site] 00090
3 append_or_delete(std::shared_ptr , std::vector , std::allocator > >&) [function] [call site] 00091
3 std::shared_ptr ::~shared_ptr() [function] [call site] 00092
3 Parser::Transition::~Transition() [function] [call site] 00093
2 __assert_fail [call site] 00094
2 __assert_fail [call site] 00095
2 mbrtowc [call site] 00096
2 __assert_fail [call site] 00097
2 __errno_location [call site] 00098
2 __assert_fail [call site] 00099
2 Parser::Parser::input(wchar_t, std::vector , std::allocator > >&) [function] [call site] 00100
1 std::vector , std::allocator > >::~vector() [function] [call site] 00101
2 std::_Vector_base , std::allocator > >::_M_get_Tp_allocator() [function] [call site] 00102
2 std::_Vector_base , std::allocator > >::~_Vector_base() [function] [call site] 00103
3 std::_Vector_base , std::allocator > >::_M_deallocate(std::shared_ptr *, unsigned long) [function] [call site] 00104
3 std::_Vector_base , std::allocator > >::_Vector_impl::~_Vector_impl() [function] [call site] 00105
4 std::allocator >::~allocator() [function] [call site] 00106
5 __gnu_cxx::new_allocator >::~new_allocator() [function] [call site] 00107
3 __clang_call_terminate [call site] 00108
2 __clang_call_terminate [call site] 00109
1 Parser::UTF8Parser::~UTF8Parser() [function] [call site] 00110
2 Parser::Parser::~Parser() [function] [call site] 00111