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 15 17.2%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 72 82.7%
All colors 87 100

Fuzz blockers

The following nodes represent call sites where fuzz blockers occur.

Amount of callsites blocked Calltree index Parent function Callsite Largest blocked function
2 5 LLVMFuzzerTestOneInput call site: 00005
2 70 Parser::Load(std::__1::basic_string , std::__1::allocator > const&, std::__1::basic_string , std::__1::allocator >*, Lexer*) call site: 00070
2 76 Parser::Load(std::__1::basic_string , std::__1::allocator > const&, std::__1::basic_string , std::__1::allocator >*, Lexer*) call site: 00076 __clang_call_terminate
2 81 LLVMFuzzerTestOneInput call site: 00081
2 84 LLVMFuzzerTestOneInput call site: 00084
1 13 emhash8::HashMap , std::__1::equal_to , std::__1::allocator >, emhash8::DefaultPolicy>::rehash(unsigned long) call site: 00013 abort
1 21 emhash8::HashMap , std::__1::equal_to , std::__1::allocator >, emhash8::DefaultPolicy>::rebuild(unsigned int, unsigned int, unsigned int) call site: 00021 __cxa_begin_catch
1 62 ManifestParser::ManifestParser(State*, FileReader*, ManifestParserOptions) call site: 00062
1 67 Parser::Load(std::__1::basic_string , std::__1::allocator > const&, std::__1::basic_string , std::__1::allocator >*, Lexer*) call site: 00067
1 79 LLVMFuzzerTestOneInput call site: 00079

Runtime coverage analysis

Covered functions
146
Functions that are reachable but not covered
27
Reachable functions
118
Percentage of reachable functions covered
77.12%
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 21
/src/ninja/src/eval_env.h 6
/src/ninja/src/eval_env.cc 3
/src/ninja/src/string_piece.h 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/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 294 55 52 278 0 1176 996
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 558 101 36 236 2 757 486
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 246 41 37 141 0 662 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 288 56 55 121 2 388 221
BuildLog::RecordCommand(Edge*,int,int,long) /src/ninja/src/build_log.cc 5 ['N/A', 'N/A', 'int', 'int', 'size_t'] 8 0 247 38 37 145 0 354 140
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 376 77 63 29 2 138 114
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 64 13 4 83 0 211 107
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 381 68 64 65 0 173 64
DiskInterface::MakeDirs(std::__1::basic_string ,std::__1::allocator >const&) /src/ninja/src/disk_interface.cc 2 ['N/A', 'N/A'] 4 0 117 19 20 10 1 53 49
ParseSelfCGroup() /src/ninja/src/util.cc 1 ['N/A'] 3 0 186 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
71.0%
290 / 410
Cyclomatic complexity statically reachable by fuzzers
83.0%
2520 / 3041

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

Directories in report

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