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

Fuzzer details

Fuzzer: fuzz_parse

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 48 27.4%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 127 72.5%
All colors 175 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
0 36 2 :

['pugi::impl::(anonymous namespace)::strconv_escape(char*, pugi::impl::(anonymous namespace)::gap&)', 'pugi::impl::(anonymous namespace)::gap::push(char*&, unsigned long)']

0 42 pugi::impl::(anonymousnamespace)::strconv_pcdata_impl ::parse(char*) call site /src/pugixml/src/pugixml.cpp:2708
0 0 None 0 323 pugi::impl::(anonymousnamespace)::xml_parser::parse_tree(char*,pugi::xml_node_struct*,unsignedint,char) call site /src/pugixml/src/pugixml.cpp:3446
0 0 None 0 4 pugi::impl::(anonymousnamespace)::xml_parser::parse(char*,unsignedlong,pugi::impl::(anonymousnamespace)::xml_document_struct*,pugi::xml_node_struct*,unsignedint) call site /src/pugixml/src/pugixml.cpp:3525
0 0 None 0 4 pugi::impl::(anonymousnamespace)::xml_parser::parse(char*,unsignedlong,pugi::impl::(anonymousnamespace)::xml_document_struct*,pugi::xml_node_struct*,unsignedint) call site /src/pugixml/src/pugixml.cpp:3550
0 0 None 0 0 pugi::impl::(anonymousnamespace)::xml_allocator::allocate_memory_oob(unsignedlong,pugi::impl::(anonymousnamespace)::xml_memory_page*&) call site /src/pugixml/src/pugixml.cpp:719
0 0 None 0 0 pugi::impl::(anonymousnamespace)::convert_buffer(char*&,unsignedlong&,pugi::xml_encoding,voidconst*,unsignedlong,bool) call site /src/pugixml/src/pugixml.cpp:2289
0 0 None 0 0 pugi::impl::(anonymousnamespace)::get_mutable_buffer(char*&,unsignedlong&,voidconst*,unsignedlong,bool) call site /src/pugixml/src/pugixml.cpp:2061
0 0 None 0 0 pugi::impl::(anonymousnamespace)::get_mutable_buffer(char*&,unsignedlong&,voidconst*,unsignedlong,bool) call site /src/pugixml/src/pugixml.cpp:2071

Runtime coverage analysis

Covered functions
88
Functions that are reachable but not covered
15
Reachable functions
87
Percentage of reachable functions covered
82.76%
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/pugixml/tests/fuzz_parse.cpp 1
/src/pugixml/src/pugixml.cpp 85

Fuzzer: fuzz_xpath

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 21 6.32%
gold [1:9] 15 4.51%
yellow [10:29] 5 1.50%
greenyellow [30:49] 2 0.60%
lawngreen 50+ 289 87.0%
All colors 332 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
39 66 5 :

['pugi::xpath_variable::type() const', 'pugi::impl::(anonymous namespace)::xpath_lexer::next()', 'pugi::impl::(anonymous namespace)::xpath_parser::alloc_node(pugi::impl::(anonymous namespace)::ast_type_t, pugi::xpath_value_type, pugi::xpath_variable*)', 'pugi::impl::(anonymous namespace)::get_variable_scratch(char (&) [32], pugi::xpath_variable_set*, char const*, char const*, pugi::xpath_variable**)', 'pugi::impl::(anonymous namespace)::xpath_parser::error_oom()']

39 70 pugi::impl::(anonymousnamespace)::xpath_parser::parse_primary_expression() call site /src/pugixml/src/pugixml.cpp:11629
2 2 1 :

['pugi::impl::(anonymous namespace)::xpath_parser::error_oom()']

2 2 pugi::impl::(anonymousnamespace)::xpath_parser::parse_primary_expression() call site /src/pugixml/src/pugixml.cpp:11673
0 0 None 6 6 pugi::xpath_query::xpath_query(charconst*,pugi::xpath_variable_set*) call site /src/pugixml/src/pugixml.cpp:12818
0 0 None 0 4 pugi::impl::(anonymousnamespace)::xpath_parser::parse_primary_expression() call site /src/pugixml/src/pugixml.cpp:11691
0 0 None 0 0 pugi::impl::(anonymousnamespace)::xpath_allocator::allocate(unsignedlong) call site /src/pugixml/src/pugixml.cpp:7799

Runtime coverage analysis

Covered functions
71
Functions that are reachable but not covered
12
Reachable functions
73
Percentage of reachable functions covered
83.56%
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.
Function name source code lines source lines hit percentage hit

Files reached

filename functions hit
/src/pugixml/tests/fuzz_xpath.cpp 1
/src/pugixml/src/pugixml.cpp 68
/usr/local/bin/../include/c++/v1/exception 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
pugi::impl::(anonymousnamespace)::xpath_ast_node::eval_string(pugi::impl::(anonymousnamespace)::xpath_contextconst&,pugi::impl::(anonymousnamespace)::xpath_stackconst&) /src/pugixml/src/pugixml.cpp 4 ['class.pugi::impl::(anonymous namespace)::xpath_string *', 'class.pugi::impl::(anonymous namespace)::xpath_ast_node *', 'struct.pugi::impl::(anonymous namespace)::xpath_context *', 'struct.pugi::impl::(anonymous namespace)::xpath_stack *'] 57 0 1271 192 144 124 32 1385 1369
pugi::xml_document::save_file(wchar_tconst*,charconst*,unsignedint,pugi::xml_encoding)const /src/pugixml/src/pugixml.cpp 5 ['class.pugi::xml_document *', 'int *', 'char *', 'int ', 'int '] 9 0 82 11 10 62 0 301 284
pugi::xpath_variable_set::operator=(pugi::xpath_variable_setconst&) /src/pugixml/src/pugixml.cpp 2 ['class.pugi::xpath_variable_set *', 'class.pugi::xpath_variable_set *'] 9 0 35 6 3 27 0 125 104
pugi::as_wide(std::__1::basic_string ,std::__1::allocator >const&) /src/pugixml/src/pugixml.cpp 2 ['class.std::__1::basic_string.11 *', 'class.std::__1::basic_string *'] 3 0 22 3 2 5 0 62 62
pugi::xml_text::operator=(unsignedlonglong) /src/pugixml/src/pugixml.cpp 2 ['class.pugi::xml_node *', 'size_t '] 8 0 20 3 2 20 0 78 55
pugi::xpath_variable_set::set(charconst*,pugi::xpath_node_setconst&) /src/pugixml/src/pugixml.cpp 3 ['class.pugi::xpath_variable_set *', 'char *', 'class.pugi::xpath_node_set *'] 5 0 41 6 3 17 0 69 39
pugi::xml_node::first_element_by_path(charconst*,char)const /src/pugixml/src/pugixml.cpp 3 ['class.pugi::xml_node *', 'char *', 'char '] 3 0 286 46 18 8 1 54 39
pugi::xpath_query::evaluate_node_set(pugi::xpath_nodeconst&)const /src/pugixml/src/pugixml.cpp 3 ['class.pugi::xpath_node_set *', 'class.pugi::xpath_query *', 'class.pugi::xpath_node *'] 57 0 100 16 12 136 0 1292 38
pugi::xml_document::load(std::__1::basic_istream >&,unsignedint) /src/pugixml/src/pugixml.cpp 4 ['struct.pugi::xml_parse_result *', 'class.pugi::xml_document *', 'class.std::__1::basic_istream.9 *', 'int '] 5 0 30 3 2 27 0 186 36

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

Functions statically reachable by fuzzers
48.12%
397/825
Cyclomatic complexity statically reachable by fuzzers
65.92%
3130 / 4748

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