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 21 15.4%
gold [1:9] 4 2.94%
yellow [10:29] 4 2.94%
greenyellow [30:49] 4 2.94%
lawngreen 50+ 103 75.7%
All colors 136 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
4 14 3 :

['strcspn', 'tinyobj::fixIndex(int, int, int*, bool, tinyobj::warning_context const&)', 'atoi']

4 14 tinyobj::parseTriple(charconst**,int,int,int,tinyobj::vertex_index_t*,tinyobj::warning_contextconst&) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:1224
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2628
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2632
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2718
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2786
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2821
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2888
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:2963
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:3024
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:3031
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:3038
0 0 None 118 747 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: 00000 /src/tinyobjloader/tiny_obj_loader.h:3073

Runtime coverage analysis

Covered functions
37
Functions that are reachable but not covered
63
Reachable functions
124
Percentage of reachable functions covered
49.19%
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 58

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'] 4 0 381 73 53 43 0 264 198
tinyobj::material_t::material_t(tinyobj::material_tconst&) /src/tinyobjloader/tiny_obj_loader.h 2 ['N/A', 'N/A'] 1 0 452 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'] 6 0 109 14 14 111 0 830 54

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

Functions statically reachable by fuzzers
74.0%
76 / 103
Cyclomatic complexity statically reachable by fuzzers
90.0%
1102 / 1222

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=['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::parseTriple(char const**, int, int, int, tinyobj::vertex_index_t*, tinyobj::warning_context const&)', 'tinyobj::parseTriple(char const**, int, int, int, tinyobj::vertex_index_t*, tinyobj::warning_context const&)', '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::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::ObjReader::ParseFromString(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&, tinyobj::ObjReaderConfig const&)', 'tinyobj::parseVertexWithColor(float*, float*, float*, float*, float*, float*, char const**, double, double, double)', '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::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::ObjReader::ParseFromString(std::__1::basic_string, std::__1::allocator > const&, std::__1::basic_string, std::__1::allocator > const&, tinyobj::ObjReaderConfig const&)']