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

Fuzzer details

Fuzzer: hoedown_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 31 9.11%
gold [1:9] 0 0.0%
yellow [10:29] 0 0.0%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 309 90.8%
All colors 340 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
21 37 2 :

['hoedown_buffer_new', 'buffer_copy_with_replace']

21 70 rndr_list call site: 00000 /src/hoextdown/src/html.c:522
17 17 1 :

['hoedown_find_block_tag']

23 123 parse_htmlblock call site: 00109 /src/hoextdown/src/document.c:2884
9 9 1 :

['hoedown_hash_strdup']

9 9 hoedown_hash_item_push call site: 00000 /src/hoextdown/src/hash.c:112
2 2 1 :

['strlen']

2 2 hoedown_hash_fnv call site: 00000 /src/hoextdown/src/hash.c:38
0 22 1 :

['hoedown_buffer_putc']

0 99 rndr_autolink call site: 00000 /src/hoextdown/src/html.c:188
0 22 2 :

['hoedown_buffer_putc', 'hoedown_buffer_put']

0 22 parse_htmlblock call site: 00116 /src/hoextdown/src/document.c:2916
0 11 1 :

['hoedown_buffer_putc']

0 11 char_escape call site: 00000 /src/hoextdown/src/document.c:1207
0 11 1 :

['hoedown_buffer_putc']

0 11 char_escape call site: 00000 /src/hoextdown/src/document.c:1216
0 11 1 :

['hoedown_buffer_put']

0 11 rndr_raw_html call site: 00000 /src/hoextdown/src/html.c:780
0 5 1 :

['hoedown_buffer_reset']

0 16 parse_attributes call site: 00099 /src/hoextdown/src/document.c:718
0 0 None 131 4899 parse_block call site: 00088 /src/hoextdown/src/document.c:3560
0 0 None 131 4899 parse_block call site: 00194 /src/hoextdown/src/document.c:3595

Runtime coverage analysis

Covered functions
157
Functions that are reachable but not covered
15
Reachable functions
93
Percentage of reachable functions covered
83.87%
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
/src/hoextdown/test/hoedown_fuzzer.c 1
buffer.c 10
html.c 2
hash.c 3
document.c 58
stack.c 4
html5_blocks.c 3
html_blocks.c 3

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
char_image /src/hoextdown/src/document.c 5 ['struct.hoedown_buffer *', 'struct.hoedown_document *', 'char *', 'size_t ', 'size_t '] 4 0 77 11 5 30 0 237 156
rndr_header /src/hoextdown/src/html.c 5 ['struct.hoedown_buffer *', 'struct.hoedown_buffer *', 'struct.hoedown_buffer *', 'int ', 'struct.hoedown_renderer_data *'] 4 0 201 30 12 31 0 177 137
char_emphasis /src/hoextdown/src/document.c 5 ['struct.hoedown_buffer *', 'struct.hoedown_document *', 'char *', 'size_t ', 'size_t '] 4 0 346 60 26 22 0 164 71
char_langle_tag /src/hoextdown/src/document.c 5 ['struct.hoedown_buffer *', 'struct.hoedown_document *', 'char *', 'size_t ', 'size_t '] 4 0 156 18 7 20 0 118 53
char_autolink_url /src/hoextdown/src/document.c 5 ['struct.hoedown_buffer *', 'struct.hoedown_document *', 'char *', 'size_t ', 'size_t '] 4 0 113 15 6 21 0 93 51

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

Functions statically reachable by fuzzers
60.1%
116/193
Cyclomatic complexity statically reachable by fuzzers
75.7%
1514 / 2000

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