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

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 32 42.1%
gold [1:9] 1 1.31%
yellow [10:29] 0 0.0%
greenyellow [30:49] 1 1.31%
lawngreen 50+ 42 55.2%
All colors 76 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
10 55 test_with_flags call site: 00055 write_root
6 67 yyjson_mut_write_opts call site: 00067 write_f64_raw
4 22 is_truncated_end call site: 00022 read_num_raw
3 3 yyjson_read_opts call site: 00003 read_num_raw
3 9 yyjson_read_opts call site: 00009 read_num_raw
3 29 yyjson_read_opts call site: 00029 read_num_raw
2 52 yyjson_val_mut_copy call site: 00052 unsafe_yyjson_str_pool_grow
1 41 read_root_single call site: 00041 is_truncated_end

Runtime coverage analysis

Covered functions
149
Functions that are reachable but not covered
5
Reachable functions
28
Percentage of reachable functions covered
82.14%
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
fuzz/fuzzer.c 2
src/yyjson.c 24

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
yyjson_incr_read /src/yyjson/src/yyjson.c 3 ['N/A', 'size_t', 'N/A'] 3 0 20142 3429 1348 8 0 1544 1348
yyjson_mut_patch /src/yyjson/src/yyjson.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 1170 256 100 11 0 452 436
yyjson_read_number /src/yyjson/src/yyjson.c 5 ['N/A', 'N/A', 'int', 'N/A', 'N/A'] 1 0 4232 743 298 3 0 407 298
yyjson_patch /src/yyjson/src/yyjson.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 3 0 1192 258 100 12 0 477 100
yyjson_merge_patch /src/yyjson/src/yyjson.c 3 ['N/A', 'N/A', 'N/A'] 2 0 489 102 41 5 1 123 82
yyjson_mut_merge_patch /src/yyjson/src/yyjson.c 3 ['N/A', 'N/A', 'N/A'] 3 0 473 96 39 6 1 110 78
unsafe_yyjson_equals /src/yyjson/src/yyjson.c 2 ['N/A', 'N/A'] 2 0 435 95 33 2 1 68 66
unsafe_yyjson_ptr_getx /src/yyjson/src/yyjson.c 4 ['N/A', 'N/A', 'size_t', 'N/A'] 1 0 517 122 48 1 0 50 48

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

Functions statically reachable by fuzzers
48.0%
41 / 86
Cyclomatic complexity statically reachable by fuzzers
96.0%
6829 / 7099

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