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

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 30 23.8%
gold [1:9] 7 5.55%
yellow [10:29] 1 0.79%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 88 69.8%
All colors 126 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
12 42 3 :

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

12 42 tinyobj::parseTriple(charconst**,int,int,int,tinyobj::vertex_index_t*,tinyobj::warning_contextconst&) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:1174
6 14 4 :

['tinyobj::parseInt(char const**)', 'strcspn', 'strspn', 'atoi']

6 14 tinyobj::parseTagTriple(charconst**) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:1141
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2075
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2079
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2117
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2128
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2139
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2151
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2181
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2273
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2280
0 0 None 288 2423 tinyobj::LoadMtl(std::__1::map ,std::__1::allocator >,int,std::__1::less ,std::__1::allocator >>,std::__1::allocator ,std::__1::allocator >const,int>>>*,std::__1::vector >*,std::__1::basic_istream >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*) call site: 00000 /src/tinyobjloader/tiny_obj_loader.h:2287

Runtime coverage analysis

Covered functions
35
Functions that are reachable but not covered
56
Reachable functions
115
Percentage of reachable functions covered
51.3%
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 47
/usr/local/bin/../include/c++/v1/math.h 2

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 ['class.tinyobj::MaterialFileReader *', 'class.std::__1::basic_string *', 'class.std::__1::vector *', 'class.std::__1::map.11 *', 'class.std::__1::basic_string *', 'class.std::__1::basic_string *'] 4 0 400 73 53 45 0 268 198
tinyobj::material_t::material_t(tinyobj::material_tconst&) /src/tinyobjloader/tiny_obj_loader.h 2 ['struct.tinyobj::material_t *', 'struct.tinyobj::material_t *'] 0 0 456 84 58 3 0 60 60
tinyobj::ObjReader::ParseFromFile(std::__1::basic_string ,std::__1::allocator >const&,tinyobj::ObjReaderConfigconst&) /src/tinyobjloader/tiny_obj_loader.h 3 ['class.tinyobj::ObjReader *', 'class.std::__1::basic_string *', 'struct.tinyobj::ObjReaderConfig *'] 5 0 109 14 14 103 0 803 54

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

Functions statically reachable by fuzzers
65.3%
68/104
Cyclomatic complexity statically reachable by fuzzers
88.8%
1071 / 1206

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