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

Project functions overview

The following table shows data about each function in the project. The functions included in this table correspond to all functions that exist in the executables of the fuzzers. As such, there may be functions that are from third-party libraries.

For further technical details on the meaning of columns in the below table, please see the Glossary .

Func name Functions filename Args Function call depth Reached by Fuzzers Runtime reached by Fuzzers Combined 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

Fuzzer details

Fuzzer: 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 13 16.0%
gold [1:9] 1 1.23%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 67 82.7%
All colors 81 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
8 8 10 :

['std::__1::vector , std::__1::allocator >, std::__1::allocator , std::__1::allocator > > >::end[abi:ne180100]()', 'std::__1::basic_string , std::__1::allocator > std::__1::operator+ , std::__1::allocator >(char const*, std::__1::basic_string , std::__1::allocator > const&)', 'std::__1::basic_string , std::__1::allocator > std::__1::operator+[abi:ne180100] , std::__1::allocator >(std::__1::basic_string , std::__1::allocator > const&, char const*)', 'std::__1::basic_string , std::__1::allocator >::append[abi:ne180100](std::__1::basic_string , std::__1::allocator > const&)', 'bool std::__1::operator!=[abi:ne180100] , std::__1::allocator >*>(std::__1::__wrap_iter , std::__1::allocator >*> const&, std::__1::__wrap_iter , std::__1::allocator >*> const&)', 'std::__1::basic_string , std::__1::allocator >::c_str[abi:ne180100]() const', 'Fatal(char const*, ...)', 'std::__1::__wrap_iter , std::__1::allocator >*>::operator*[abi:ne180100]() const', 'std::__1::basic_string , std::__1::allocator >::basic_string[abi:ne180100]()', 'std::__1::__wrap_iter , std::__1::allocator >*>::operator++[abi:ne180100]()']

8 8 EdgeEnv::LookupVariable(std::__1::basic_string ,std::__1::allocator >const&) call site: 00000 /src/ninja/src/graph.cc:457
2 2 3 :

['Edge::~Edge()', 'operator delete(void*)', 'std::__1::vector >::pop_back()']

2 2 ManifestParser::ParseEdge(std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:348
0 12 2 :

['_ZNSt3__112basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEC2B8ne180100ILi0EEEPKc', 'Lexer::Error(std::__1::basic_string , std::__1::allocator > const&, std::__1::basic_string , std::__1::allocator >*)']

0 12 ManifestParser::ParsePool(std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:128
0 4 1 :

['BindingEnv::LookupRule(std::__1::basic_string , std::__1::allocator > const&)']

0 4 BindingEnv::LookupRule(std::__1::basic_string ,std::__1::allocator >const&) call site: 00000 /src/ninja/src/eval_env.cc:50
0 0 None 28 28 ReadFile(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/util.cc:444
0 0 None 8 504 ManifestParser::ParsePool(std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:101
0 0 None 8 351 ManifestParser::ParsePool(std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:118
0 0 None 8 8 ReadFile(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/util.cc:451
0 0 None 6 2662 ManifestParser::Parse(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:80
0 0 None 4 333 ManifestParser::ParseDefault(std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:196
0 0 None 4 241 ManifestParser::ParseFileInclude(bool,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:421
0 0 None 4 227 ManifestParser::ParseFileInclude(bool,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/ninja/src/manifest_parser.cc:428

Runtime coverage analysis

Covered functions
141
Functions that are reachable but not covered
26
Reachable functions
109
Percentage of reachable functions covered
76.15%
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/ninja/misc/manifest_fuzzer.cc 1
/src/ninja/src/disk_interface.cc 1
/src/ninja/src/disk_interface.h 5
/src/ninja/src/state.cc 3
/src/ninja/src/third_party/emhash/hash_table8.hpp 18
/src/ninja/src/eval_env.h 6
/src/ninja/src/eval_env.cc 3
/src/ninja/src/state.h 2
/src/ninja/src/manifest_parser.h 2
/src/ninja/src/manifest_parser.cc 1
/src/ninja/src/parser.h 2
/src/ninja/src/lexer.h 1
/src/ninja/src/string_piece.h 2
/src/ninja/src/parser.cc 1
/src/ninja/src/metrics.cc 4
/src/ninja/src/metrics.h 1
/src/ninja/src/lexer.cc 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
ManifestParser::Parse(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >*) /src/ninja/src/manifest_parser.cc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 10 0 289 54 52 265 0 1127 959
DependencyScan::RecomputeNodeDirty(Node*,std::__1::vector >*,std::__1::vector >*,std::__1::basic_string ,std::__1::allocator >*) /src/ninja/src/graph.cc 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 9 0 535 97 35 218 2 710 474
DyndepParser::Parse(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >*) /src/ninja/src/dyndep_parser.cc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 9 0 252 41 37 135 0 627 234
DepsLog::Recompact(std::__1::basic_string ,std::__1::allocator >const&,std::__1::basic_string ,std::__1::allocator >*) /src/ninja/src/deps_log.cc 3 ['N/A', 'N/A', 'N/A'] 7 0 335 62 61 103 2 349 222
BuildLog::RecordCommand(Edge*,int,int,long) /src/ninja/src/build_log.cc 5 ['N/A', 'N/A', 'int', 'int', 'size_t'] 8 0 264 40 37 130 0 313 134
ParseMountInfo(std::__1::map ,std::__1::allocator >,CGroupSubSys,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,CGroupSubSys>>>&) /src/ninja/src/util.cc 2 ['N/A', 'N/A'] 3 0 387 77 63 29 2 138 118
BuildLog::OpenForWrite(std::__1::basic_string ,std::__1::allocator >const&,BuildLogUserconst&,std::__1::basic_string ,std::__1::allocator >*) /src/ninja/src/build_log.cc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 6 0 68 13 4 70 0 195 112
BuildLog::Restat(StringPiece,DiskInterfaceconst&,int,char**,std::__1::basic_string ,std::__1::allocator >*) /src/ninja/src/build_log.cc 7 ['N/A', 'N/A', 'size_t', 'N/A', 'int', 'N/A', 'N/A'] 4 0 434 77 68 54 0 158 68
DiskInterface::MakeDirs(std::__1::basic_string ,std::__1::allocator >const&) /src/ninja/src/disk_interface.cc 2 ['N/A', 'N/A'] 4 0 123 19 20 10 1 53 49
ParseSelfCGroup() /src/ninja/src/util.cc 1 ['N/A'] 3 0 191 39 36 20 2 72 42

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

Functions statically reachable by fuzzers
73.0%
280 / 386
Cyclomatic complexity statically reachable by fuzzers
83.0%
2472 / 2974

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 Runtime reached by Fuzzers Combined 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/ninja/src/depfile_parser.h [] []
/src/ninja/src/dyndep.h [] []
/src/ninja/src/eval_env.h ['fuzzer'] ['fuzzer']
/src/ninja/src/explanations.h [] []
/src/ninja/src/manifest_parser.h ['fuzzer'] []
/src/ninja/src/parser.h ['fuzzer'] ['fuzzer']
/src/ninja/src/graph.h [] []
/src/ninja/misc/manifest_fuzzer.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/metrics.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/depfile_parser.cc [] []
/src/ninja/src/metrics.h ['fuzzer'] ['fuzzer']
/src/ninja/src/build_log.h [] []
/src/ninja/src/deps_log.h [] []
/src/ninja/src/dyndep_parser.h [] []
/src/ninja/src/dyndep.cc [] []
/src/ninja/src/parser.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/build_log.cc [] []
/src/ninja/src/manifest_parser.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/string_piece_util.cc [] []
/usr/local/bin/../include/c++/v1/string [] []
/src/ninja/src/lexer.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/edit_distance.cc [] []
/src/ninja/src/state.h ['fuzzer'] ['fuzzer']
/src/ninja/src/lexer.h ['fuzzer'] ['fuzzer']
/src/ninja/src/version.cc [] []
/src/ninja/src/third_party/emhash/hash_table8.hpp ['fuzzer'] ['fuzzer']
/src/ninja/src/third_party/rapidhash/rapidhash.h [] []
/src/ninja/src/deps_log.cc [] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/ninja/src/state.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/eval_env.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/disk_interface.cc ['fuzzer'] ['fuzzer']
/src/ninja/src/graph.cc [] []
/src/ninja/src/string_piece.h ['fuzzer'] ['fuzzer']
/src/ninja/src/string_piece_util.h [] []
/src/ninja/src/disk_interface.h ['fuzzer'] ['fuzzer']
/src/ninja/src/dyndep_parser.cc [] []
/src/ninja/src/jobserver.h [] []
/src/ninja/src/util.cc [] []

Directories in report

Directory
/usr/local/bin/../include/c++/v1/
/src/ninja/src/third_party/emhash/
/src/ninja/src/third_party/rapidhash/
/src/ninja/misc/
/src/ninja/src/