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: fuzz_ParseFromString

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 238 40.1%
gold [1:9] 2 0.33%
yellow [10:29] 15 2.52%
greenyellow [30:49] 7 1.18%
lawngreen 50+ 331 55.8%
All colors 593 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
194 122 fast_float::from_chars_result_t fast_float::from_chars_advanced (fast_float::parsed_number_string_t &, double&) call site: 00122 __assert_fail
6 64 fast_float::from_chars_result_t fast_float::from_chars_float_advanced (char const*, char const*, double&, fast_float::parse_options_t ) call site: 00064
3 8 tinyobj::LoadObj(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string , std::__1::allocator >*, std::__1::basic_string , std::__1::allocator >*, std::__1::basic_istream >*, tinyobj::MaterialReader*, bool, bool) call site: 00008
3 16 tinyobj::LoadObjInternal(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string , std::__1::allocator >*, std::__1::basic_string , std::__1::allocator >*, tinyobj::StreamReader&, tinyobj::MaterialReader*, bool, bool, std::__1::basic_string , std::__1::allocator > const&) call site: 00016
3 104 fast_float::from_chars_result_t fast_float::from_chars_advanced (fast_float::parsed_number_string_t &, double&) call site: 00104 __assert_fail
3 500 tinyobj::LoadObjInternal(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string , std::__1::allocator >*, std::__1::basic_string , std::__1::allocator >*, tinyobj::StreamReader&, tinyobj::MaterialReader*, bool, bool, std::__1::basic_string , std::__1::allocator > const&) call site: 00500
3 504 tinyobj::LoadObjInternal(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string , std::__1::allocator >*, std::__1::basic_string , std::__1::allocator >*, tinyobj::StreamReader&, tinyobj::MaterialReader*, bool, bool, std::__1::basic_string , std::__1::allocator > const&) call site: 00504
2 58 fast_float::from_chars_result_t fast_float::from_chars_float_advanced (char const*, char const*, double&, fast_float::parse_options_t ) call site: 00058
2 61 fast_float::from_chars_result_t fast_float::from_chars_float_advanced (char const*, char const*, double&, fast_float::parse_options_t ) call site: 00061
2 88 fast_float::from_chars_result_t fast_float::detail::parse_infnan (char const*, char const*, double&, fast_float::chars_format) call site: 00088
2 98 fast_float::from_chars_result_t fast_float::from_chars_advanced (fast_float::parsed_number_string_t &, double&) call site: 00098
2 361 tinyobj::sr_parseInt(tinyobj::StreamReader&, int*, std::__1::basic_string , std::__1::allocator >*, std::__1::basic_string , std::__1::allocator > const&) call site: 00361

Runtime coverage analysis

Covered functions
117
Functions that are reachable but not covered
189
Reachable functions
373
Percentage of reachable functions covered
49.33%
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/tinyobjloader/fuzzer/fuzz_ParseFromString.cc 1
/src/tinyobjloader/tiny_obj_loader.h 183

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
tinyobj::MaterialFileReader::operator()(std::__1::basic_string ,std::__1::allocator >const&,std::__1::vector >*,std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) /src/tinyobjloader/tiny_obj_loader.h 6 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 20 0 391 78 56 281 0 1485 751
tinyobj::material_t::material_t(tinyobj::material_tconst&) /src/tinyobjloader/tiny_obj_loader.h 2 ['N/A', 'N/A'] 1 0 450 84 58 4 0 62 60
tinyobj::ObjReader::ParseFromFile(std::__1::basic_string ,std::__1::allocator >const&,tinyobj::ObjReaderConfigconst&) /src/tinyobjloader/tiny_obj_loader.h 3 ['N/A', 'N/A', 'N/A'] 21 0 104 14 14 358 0 1575 57
tinyobj::LoadObjWithCallback(std::__1::basic_istream >&,tinyobj::callback_tconst&,void*,tinyobj::MaterialReader*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) /src/tinyobjloader/tiny_obj_loader.h 6 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 20 0 53 6 6 262 0 824 43

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

Functions statically reachable by fuzzers
89.0%
210 / 237
Cyclomatic complexity statically reachable by fuzzers
96.0%
2445 / 2555

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

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

/src/tinyobjloader/fuzzer/fuzz_ParseFromString.cc

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['fast_float::from_chars_result_t fast_float::from_chars_advanced(fast_float::parsed_number_string_t&, double&)', 'fast_float::from_chars_result_t fast_float::from_chars_float_advanced(char const*, char const*, double&, fast_float::parse_options_t)', 'tinyobj::LoadObj(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string, std::__1::allocator >*, std::__1::basic_string, std::__1::allocator >*, std::__1::basic_istream >*, tinyobj::MaterialReader*, bool, bool)', 'tinyobj::LoadObjInternal(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string, std::__1::allocator >*, std::__1::basic_string, std::__1::allocator >*, tinyobj::StreamReader&, tinyobj::MaterialReader*, bool, bool, std::__1::basic_string, std::__1::allocator > const&)', 'fast_float::from_chars_result_t fast_float::from_chars_advanced(fast_float::parsed_number_string_t&, double&)', 'tinyobj::LoadObjInternal(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string, std::__1::allocator >*, std::__1::basic_string, std::__1::allocator >*, tinyobj::StreamReader&, tinyobj::MaterialReader*, bool, bool, std::__1::basic_string, std::__1::allocator > const&)', 'tinyobj::LoadObjInternal(tinyobj::attrib_t*, std::__1::vector >*, std::__1::vector >*, std::__1::basic_string, std::__1::allocator >*, std::__1::basic_string, std::__1::allocator >*, tinyobj::StreamReader&, tinyobj::MaterialReader*, bool, bool, std::__1::basic_string, std::__1::allocator > const&)', 'fast_float::from_chars_result_t fast_float::from_chars_float_advanced(char const*, char const*, double&, fast_float::parse_options_t)', 'fast_float::from_chars_result_t fast_float::from_chars_float_advanced(char const*, char const*, double&, fast_float::parse_options_t)', 'fast_float::from_chars_result_t fast_float::detail::parse_infnan(char const*, char const*, double&, fast_float::chars_format)']