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

Fuzzer details

Fuzzer: set_eval_fuzzer

Call tree

The calltree shows the control flow of the fuzzer. This is overlaid with coverage information to display how much of the potential code a fuzzer can reach is in fact covered at runtime. In the following there is a link to a detailed calltree visualisation as well as a bitmap showing a high-level view of the calltree. For further information about these topics please see the glossary for full calltree and calltree overview

Call tree overview bitmap:

The distribution of callsites in terms of coloring is
Color Runtime hitcount Callsite count Percentage
red 0 9 20.0%
gold [1:9] 0 0.0%
yellow [10:29] 1 2.22%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 35 77.7%
All colors 45 100

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
72 146 4 :

['mu::ParserToken , std::__1::allocator > >::GetVar() const', 'mu::ParserByteCode::AddAssignOp(double*)', 'mu::ParserBase::Error(mu::EErrorCodes, int, std::__1::basic_string , std::__1::allocator > const&) const', '_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B7v180000ILi0EEEPKc']

88 169 mu::ParserBase::ApplyBinOprt(std::__1::stack ,std::__1::allocator >>,std::__1::deque ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >>>>>&,std::__1::stack ,std::__1::allocator >>,std::__1::deque ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >>>>>&)const call site: 00000 /src/muparser/src/muParserBase.cpp:989
67 67 6 :

['__cxa_throw', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', '__cxa_free_exception', 'mu::ParserError::ParserError(char const*, int, std::__1::basic_string , std::__1::allocator > const&)', 'std::__1::basic_string , std::__1::allocator >::basic_string[abi:v180000]()', '__cxa_allocate_exception']

67 67 mu::MathImpl ::Sum(doubleconst*,int) call site: 00000 /src/muparser/include/muParserTemplateMagic.h:145
67 67 6 :

['__cxa_throw', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', '__cxa_free_exception', 'mu::ParserError::ParserError(char const*, int, std::__1::basic_string , std::__1::allocator > const&)', 'std::__1::basic_string , std::__1::allocator >::basic_string[abi:v180000]()', '__cxa_allocate_exception']

67 67 mu::MathImpl ::Avg(doubleconst*,int) call site: 00000 /src/muparser/include/muParserTemplateMagic.h:155
67 67 6 :

['__cxa_allocate_exception', 'mu::ParserError::ParserError(char const*, int, std::__1::basic_string , std::__1::allocator > const&)', '__cxa_free_exception', 'std::__1::basic_string , std::__1::allocator >::basic_string[abi:v180000]()', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', '__cxa_throw']

67 67 mu::MathImpl ::Min(doubleconst*,int) call site: 00000 /src/muparser/include/muParserTemplateMagic.h:165
67 67 6 :

['__cxa_allocate_exception', 'mu::ParserError::ParserError(char const*, int, std::__1::basic_string , std::__1::allocator > const&)', '__cxa_free_exception', 'std::__1::basic_string , std::__1::allocator >::basic_string[abi:v180000]()', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', '__cxa_throw']

67 67 mu::MathImpl ::Max(doubleconst*,int) call site: 00000 /src/muparser/include/muParserTemplateMagic.h:177
6 69 4 :

['__cxa_throw', 'mu::ParserError::ParserError(mu::EErrorCodes)', '__cxa_allocate_exception', '__cxa_free_exception']

6 69 mu::ParserByteCode::GetBase()const call site: 00000 /src/muparser/include/muParserBytecode.h:148
6 69 4 :

['__cxa_throw', 'mu::ParserError::ParserError(mu::EErrorCodes)', '__cxa_allocate_exception', '__cxa_free_exception']

6 69 mu::ParserToken ,std::__1::allocator >>::GetPri()const call site: 00000 /src/muparser/include/muParserToken.h:413
6 69 4 :

['__cxa_throw', 'mu::ParserError::ParserError(mu::EErrorCodes)', '__cxa_free_exception', '__cxa_allocate_exception']

6 69 mu::ParserToken ,std::__1::allocator >>::SetIdx(int) call site: 00000 /src/muparser/include/muParserToken.h:354
2 159 12 :

['std::__1::__map_const_iterator , std::__1::allocator >, double*>, std::__1::__tree_node , std::__1::allocator >, double*>, void*>*, long> >::__map_const_iterator[abi:v180000](std::__1::__map_iterator , std::__1::allocator >, double*>, std::__1::__tree_node , std::__1::allocator >, double*>, void*>*, long> >)', 'mu::ParserBase::ValidNameChars() const', 'std::__1::basic_string , std::__1::allocator >::basic_string[abi:v180000]()', 'std::__1::__map_const_iterator , std::__1::allocator >, double*>, std::__1::__tree_node , std::__1::allocator >, double*>, void*>*, long> >::operator->[abi:v180000]() const', 'std::__1::map , std::__1::allocator >, double*, std::__1::less , std::__1::allocator > >, std::__1::allocator , std::__1::allocator > const, double*> > >::end[abi:v180000]()', 'std::__1::operator==[abi:v180000](std::__1::__map_const_iterator , std::__1::allocator >, double*>, std::__1::__tree_node , std::__1::allocator >, double*>, void*>*, long> > const&, std::__1::__map_const_iterator , std::__1::allocator >, double*>, std::__1::__tree_node , std::__1::allocator >, double*>, void*>*, long> > const&)', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', 'mu::ParserTokenReader::ExtractToken(char const*, std::__1::basic_string , std::__1::allocator >&, unsigned long) const', 'mu::ParserTokenReader::Error(mu::EErrorCodes, int, std::__1::basic_string , std::__1::allocator > const&) const', 'mu::ParserToken , std::__1::allocator > >::SetVar(double*, std::__1::basic_string , std::__1::allocator > const&)', 'std::__1::map , std::__1::allocator >, double*, std::__1::less , std::__1::allocator > >, std::__1::allocator , std::__1::allocator > const, double*> > >::operator[](std::__1::basic_string , std::__1::allocator > const&)', 'std::__1::map , std::__1::allocator >, double*, std::__1::less , std::__1::allocator > >, std::__1::allocator , std::__1::allocator > const, double*> > >::find[abi:v180000](std::__1::basic_string , std::__1::allocator > const&)']

2 159 mu::ParserTokenReader::IsVarTok(mu::ParserToken ,std::__1::allocator >>&) call site: 00000 /src/muparser/src/muParserTokenReader.cpp:818
0 406 1 :

['mu::ParserBase::ApplyFunc(std::__1::stack , std::__1::allocator > >, std::__1::deque , std::__1::allocator > >, std::__1::allocator , std::__1::allocator > > > > >&, std::__1::stack , std::__1::allocator > >, std::__1::deque , std::__1::allocator > >, std::__1::allocator , std::__1::allocator > > > > >&, int) const']

0 406 mu::ParserBase::ApplyBinOprt(std::__1::stack ,std::__1::allocator >>,std::__1::deque ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >>>>>&,std::__1::stack ,std::__1::allocator >>,std::__1::deque ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >>>>>&)const call site: 00000 /src/muparser/src/muParserBase.cpp:965
0 74 1 :

['mu::ParserBase::Error(mu::EErrorCodes, int, std::__1::basic_string , std::__1::allocator > const&) const']

0 74 mu::ParserBase::AddCallback(std::__1::basic_string ,std::__1::allocator >const&,mu::ParserCallbackconst&,std::__1::map ,std::__1::allocator >,mu::ParserCallback,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,mu::ParserCallback>>>&,charconst*) call site: 00000 /src/muparser/src/muParserBase.cpp:390
0 74 3 :

['std::__1::basic_string , std::__1::allocator >::basic_string[abi:v180000]()', 'std::__1::basic_string , std::__1::allocator >::~basic_string()', 'mu::ParserBase::Error(mu::EErrorCodes, int, std::__1::basic_string , std::__1::allocator > const&) const']

0 74 mu::ParserBase::DefineInfixOprt(std::__1::basic_string ,std::__1::allocator >const&,double(*)(double),int,bool) call site: 00000 /src/muparser/src/muParserBase.cpp:557

Runtime coverage analysis

Covered functions
161
Functions that are reachable but not covered
16
Reachable functions
71
Percentage of reachable functions covered
77.46%
NB: The sum of covered functions and functions that are reachable but not covered need not be equal to Reachable functions . This is because the reachability analysis is an approximation and thus at runtime some functions may be covered that are not included in the reachability analysis. This is a limitation of our static analysis capabilities.
Warning: The number of covered functions are larger than the number of reachable functions. This means that there are more functions covered at runtime than are extracted using static analysis. This is likely a result of the static analysis component failing to extract the right call graph or the coverage runtime being compiled with sanitizers in code that the static analysis has not analysed. This can happen if lto/gold is not used in all places that coverage instrumentation is used.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/set_eval_fuzzer.cc 1
/src/muparser/src/muParser.cpp 1
/src/muparser/src/muParserBase.cpp 7
/src/muparser/src/muParserBytecode.cpp 2
/src/muparser/src/muParserTokenReader.cpp 6
/src/muparser/include/muParserToken.h 2
/src/muparser/src/muParserError.cpp 6
/src/muparser/include/muParserError.h 1
/src/muparser/include/muParserBytecode.h 1
/usr/local/include/muParser.h 1

Analyses and suggestions

Optimal target analysis

Remaining optimal interesting functions

The following table shows a list of functions that are optimal targets. Optimal targets are identified by finding the functions that in combination, yield a high code coverage.

Func name Functions filename Arg count Args Function depth hitcount instr count bb count cyclomatic complexity Reachable functions Incoming references total cyclomatic complexity Unreached complexity
mu::ParserBase::Eval(int&)const /src/muparser/src/muParserBase.cpp 2 ['N/A', 'N/A'] 8 0 33 6 3 282 0 1774 1662
mu::Parser::InitFun() /src/muparser/src/muParser.cpp 1 ['N/A'] 6 0 362 59 35 40 0 137 60
mu::MathImpl ::Max(doubleconst*,int) /src/muparser/include/muParserTemplateMagic.h 2 ['N/A', 'int'] 4 0 78 16 17 18 0 78 37
mu::ParserBase::DefineOprt(std::__1::basic_string ,std::__1::allocator >const&,double(*)(double,double),unsignedint,mu::EOprtAssociativity,bool) /src/muparser/src/muParserBase.cpp 6 ['N/A', 'N/A', 'N/A', 'int', 'int', 'bool'] 5 0 477 85 33 33 0 142 35

Implementing fuzzers that target the above functions will improve reachability such that it becomes:

Functions statically reachable by fuzzers
47.0%
161 / 339
Cyclomatic complexity statically reachable by fuzzers
79.0%
1946 / 2471

All functions overview

If you implement fuzzers for these functions, the status of all functions in the project will be:

Func name Functions filename Args Function call depth Reached by Fuzzers Fuzzers runtime hit Func lines hit % I Count BB Count Cyclomatic complexity Functions reached Reached by functions Accumulated cyclomatic complexity Undiscovered complexity

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/set_eval_fuzzer.cc ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/src/muParserCallback.cpp [] []
/src/muparser/src/muParserError.cpp ['set_eval_fuzzer'] ['set_eval_fuzzer']
/usr/local/bin/../include/c++/v1/__fwd/sstream.h [] []
/src/muparser/include/muParserError.h ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/src/muParser.cpp ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/include/muParser.h [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/usr/local/bin/../include/c++/v1/istream [] []
/src/muparser/src/muParserBytecode.cpp ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/include/muParserTemplateMagic.h [] []
/src/muparser/src/muParserTokenReader.cpp ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/include/muParserToken.h ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/include/muParserDef.h [] []
/src/muparser/include/muParserBase.h [] []
/src/muparser/include/muParserBytecode.h ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/src/muParserBase.cpp ['set_eval_fuzzer'] ['set_eval_fuzzer']
/src/muparser/include/muParserTokenReader.h [] []

Directories in report

Directory
/src/muparser/src/
/src/
/usr/local/bin/../include/c++/v1/__fwd/
/src/muparser/include/
/usr/local/bin/../include/c++/v1/