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_tobj_c

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 292 46.6%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 334 53.3%
All colors 626 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
147 357 tobj_vec_free call site: 00357 parse_texopt_f
62 505 dispatch_line_f call site: 00505 ff_loops_f
16 285 tobj_arena_dup call site: 00285 tobj_vec_push
11 319 finalize_shape_f call site: 00319 tobj_vec_finalize
10 345 handle_mtllib_f call site: 00345 parse_mtl_buffer_f
6 94 b_warn_f call site: 00094 tobj_realloc
4 78 tobj_next_token call site: 00078 tobj_slice_eq
4 185 tobj_tess_project_f call site: 00185 tobj_tess_scale2d
4 576 tobj_load_obj_from_memory_f call site: 00576 tobj_arena_alloc
3 231 tobj_tess_run2d call site: 00231 tobj_tess_update_reflex
3 278 finalize_shape_f call site: 00278 tobj_vec_push
2 619 tobj_arena_destroy call site: 00619 tobj_free

Runtime coverage analysis

Covered functions
93
Functions that are reachable but not covered
15
Reachable functions
105
Percentage of reachable functions covered
85.71%
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_tobj_c.c 1
/src/tinyobjloader/tiny_obj_c.c 47
/src/tinyobjloader/tiny_obj_c_impl.inc 39
/src/tinyobjloader/tobj_tess.c 16
/src/tinyobjloader/tobj_tess_impl.inc 2

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 59 9.93%
gold [1:9] 0 0.0%
yellow [10:29] 1 0.16%
greenyellow [30:49] 1 0.16%
lawngreen 50+ 533 89.7%
All colors 594 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
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
5 155 void fast_float::parse_mantissa (fast_float::bigint&, fast_float::parsed_number_string_t &, unsigned long, unsigned long&) call site: 00155
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 124 fast_float::from_chars_result_t fast_float::from_chars_advanced (fast_float::parsed_number_string_t &, double&) call site: 00124
3 291 fast_float::adjusted_mantissa fast_float::negative_digit_comp (fast_float::bigint&, fast_float::adjusted_mantissa, int) call site: 00291
3 501 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: 00501
3 505 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: 00505
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

Runtime coverage analysis

Covered functions
200
Functions that are reachable but not covered
73
Reachable functions
373
Percentage of reachable functions covered
80.43%
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::LoadObjOptTyped(charconst*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*,charconst*,tinyobj::OptLoadConfigconst&) /src/tinyobjloader/tiny_obj_loader.h 6 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 22 0 318 64 59 626 0 3984 2444
tinyobj::LoadObjOpt(tinyobj::basic_attrib_t >*,std::__1::vector >,std::__1::allocator >>>*,std::__1::vector >*,std::__1::basic_string ,std::__1::allocator >*,std::__1::basic_string ,std::__1::allocator >*,charconst*,charconst*,tinyobj::OptLoadConfigconst&) /src/tinyobjloader/tiny_obj_loader.h 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 22 0 298 57 53 570 0 3745 718
tobj_load_obj_from_file_d /src/tinyobjloader/tiny_obj_c_impl.inc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 12 0 142 20 9 110 0 826 530
tobj_load_obj_with_callbacks_d /src/tinyobjloader/tiny_obj_c_impl.inc 5 ['N/A', 'size_t', 'N/A', 'N/A', 'N/A'] 9 0 1119 192 69 55 0 416 69
tobj_load_obj_with_callbacks_f /src/tinyobjloader/tiny_obj_c_impl.inc 5 ['N/A', 'size_t', 'N/A', 'N/A', 'N/A'] 9 0 1131 192 69 55 0 416 69
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 1585 49
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%
487 / 546
Cyclomatic complexity statically reachable by fuzzers
96.0%
6307 / 6601

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_tobj_c.c

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=['tobj_vec_free', 'dispatch_line_f', 'tobj_arena_dup', 'finalize_shape_f', 'handle_mtllib_f', 'b_warn_f', 'tobj_next_token', 'tobj_tess_project_f', 'tobj_load_obj_from_memory_f', 'tobj_tess_run2d']

/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_float_advanced(char const*, char const*, double&, fast_float::parse_options_t)', 'void fast_float::parse_mantissa(fast_float::bigint&, fast_float::parsed_number_string_t&, unsigned long, unsigned long&)', '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&)', 'fast_float::from_chars_result_t fast_float::from_chars_advanced(fast_float::parsed_number_string_t&, double&)', 'fast_float::adjusted_mantissa fast_float::negative_digit_comp(fast_float::bigint&, fast_float::adjusted_mantissa, int)', '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)']