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

Fuzzer details

Fuzzer: croaring_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 58 16.4%
gold [1:9] 6 1.70%
yellow [10:29] 1 0.28%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 287 81.5%
All colors 352 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
16 16 1 :

['art_node_prev_child']

16 34 art_node_init_iterator call site: 00247 /src/croaring/src/art/art.c:1590
16 16 1 :

['art_node_prev_child']

16 30 art_iterator_neighbor_child call site: 00279 /src/croaring/src/art/art.c:1551
2 2 1 :

['exit']

2 2 bitmap32 call site: 00171 /src/croaring_fuzzer.c:43
2 2 1 :

['exit']

2 2 bitmap64 call site: 00348 /src/croaring_fuzzer.c:72
0 2 1 :

['roaring_malloc']

0 4 array_container_grow call site: 00041 /src/croaring/src/containers/array.c:172
0 2 1 :

['roaring_free']

0 2 array_container_create_given_capacity call site: 00036 /src/croaring/src/containers/array.c:59
0 2 1 :

['roaring_free']

0 2 bitset_container_create call site: 00017 /src/croaring/src/containers/bitset.c:87
0 0 None 45 45 container_add call site: 00144 /src/croaring/include/roaring/containers/containers.h:489
0 0 None 5 38 run_container_cardinality call site: 00108 /src/croaring/src/containers/run.c:1065
0 0 None 5 12 bitset_container_compute_cardinality call site: 00072 /src/croaring/src/containers/bitset.c:275
0 0 None 5 5 bitset_container_compute_cardinality call site: 00073 /src/croaring/src/containers/bitset.c:281
0 0 None 5 5 run_container_cardinality call site: 00110 /src/croaring/src/containers/run.c:1069

Runtime coverage analysis

Covered functions
166
Functions that are reachable but not covered
28
Reachable functions
188
Percentage of reachable functions covered
85.11%
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/croaring_fuzzer.c 3
/src/croaring/src/roaring.c 8
/src/croaring/src/memory.c 5
/src/croaring/src/roaring_array.c 10
/src/croaring/src/containers/bitset.c 8
/src/croaring/src/isadetection.c 5
/src/croaring/src/containers/run.c 12
/src/croaring/include/roaring/containers/run.h 6
/src/croaring/src/containers/array.c 9
/src/croaring/include/roaring/containers/array.h 6
/src/croaring/src/containers/containers.c 5
/src/croaring/include/roaring/portability.h 4
/src/croaring/include/roaring/roaring.h 1
/src/croaring/include/roaring/bitset_util.h 6
/src/croaring/include/roaring/containers/containers.h 5
/src/croaring/include/roaring/roaring_array.h 6
/src/croaring/include/roaring/array_util.h 1
/src/croaring/include/roaring/containers/bitset.h 3
/src/croaring/src/containers/convert.c 1
/src/croaring/src/roaring64.c 13
/usr/include/x86_64-linux-gnu/bits/byteswap.h 1
/src/croaring/src/art/art.c 67

Fuzzer: croaring_fuzzer_cc

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 394 24.7%
gold [1:9] 13 0.81%
yellow [10:29] 15 0.94%
greenyellow [30:49] 11 0.69%
lawngreen 50+ 1160 72.8%
All colors 1593 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
244 244 1 :

['roaring_bitmap_serialize']

248 248 roaring::Roaring::write(char*,bool)const call site: 00000 /src/croaring/cpp/roaring.hh:624
101 101 1 :

['roaring_bitmap_size_in_bytes']

105 105 roaring::Roaring::getSizeInBytes(bool)const call site: 00000 /src/croaring/cpp/roaring.hh:698
84 84 1 :

['container_from_run_range']

84 84 container_add_range call site: 00230 /src/croaring/include/roaring/containers/containers.h:2327
42 90 4 :

['bitset_container_create', 'array_container_add_from_range', 'array_container_create_given_capacity', 'bitset_container_add_from_range']

42 90 container_from_range call site: 00248 /src/croaring/include/roaring/containers/containers.h:307
18 18 1 :

['roaring_bitmap_create']

18 24 roaring_bitmap_andnot call site: 00652 /src/croaring/src/roaring.c:1166
13 13 1 :

['bitset_extract_setbits_avx512']

13 13 bitset_container_to_uint32_array call site: 01322 /src/croaring/src/containers/bitset.c:943
8 17 2 :

['bitset_extract_intersection_setbits_uint16', 'array_container_create_given_capacity']

8 17 bitset_bitset_container_intersection_inplace call site: 01141 /src/croaring/src/containers/mixed_intersection.c:331
8 8 4 :

['std::runtime_error::runtime_error(char const*)', '__cxa_free_exception', '__cxa_throw', '__cxa_allocate_exception']

8 8 roaring::Roaring::operator&(roaring::Roaringconst&)const call site: 00000 /src/croaring/cpp/roaring.hh:761
8 8 4 :

['std::runtime_error::runtime_error(char const*)', '__cxa_free_exception', '__cxa_throw', '__cxa_allocate_exception']

8 8 roaring::Roaring::operator-(roaring::Roaringconst&)const call site: 00000 /src/croaring/cpp/roaring.hh:774
8 8 4 :

['std::runtime_error::runtime_error(char const*)', '__cxa_free_exception', '__cxa_throw', '__cxa_allocate_exception']

8 8 roaring::Roaring::operator|(roaring::Roaringconst&)const call site: 00000 /src/croaring/cpp/roaring.hh:787
8 8 4 :

['std::runtime_error::runtime_error(char const*)', '__cxa_free_exception', '__cxa_throw', '__cxa_allocate_exception']

8 8 roaring::Roaring::operator^(roaring::Roaringconst&)const call site: 00000 /src/croaring/cpp/roaring.hh:800
2 4 3 :

['roaring_free', 'get_container_type.519', 'roaring_calloc']

2 26 ra_portable_serialize call site: 01517 /src/croaring/src/roaring_array.c:555

Runtime coverage analysis

Covered functions
458
Functions that are reachable but not covered
94
Reachable functions
603
Percentage of reachable functions covered
84.41%
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/croaring_fuzzer_cc.cc 2
/src/croaring/cpp/roaring.hh 61
/src/croaring/include/roaring/roaring.h 6
/src/croaring/src/roaring.c 63
/src/croaring/src/roaring_array.c 25
/src/croaring/src/memory.c 6
/src/croaring/include/roaring/roaring_array.h 8
/src/croaring/include/roaring/array_util.h 4
/src/croaring/include/roaring/containers/containers.h 38
/src/croaring/src/containers/containers.c 8
/src/croaring/include/roaring/portability.h 5
/src/croaring/src/containers/bitset.c 44
/src/croaring/src/isadetection.c 5
/src/croaring/src/containers/array.c 25
/src/croaring/src/containers/run.c 29
/src/croaring/include/roaring/containers/bitset.h 9
/src/croaring/include/roaring/containers/array.h 18
/src/croaring/src/containers/convert.c 10
/src/croaring/include/roaring/containers/run.h 26
/src/croaring/include/roaring/bitset_util.h 20
/src/croaring/src/bitset_util.c 16
/src/croaring/src/array_util.c 29
/src/croaring/src/containers/mixed_intersection.c 11
/src/croaring/src/containers/mixed_andnot.c 19
/src/croaring/src/containers/mixed_union.c 6
/src/croaring/src/containers/mixed_xor.c 16
/src/croaring/src/containers/mixed_equal.c 3
/src/croaring/src/containers/mixed_subset.c 5
/src/croaring/src/containers/mixed_negation.c 8

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
roaring64_bitmap_remove_range /src/croaring/src/roaring64.c 3 ['N/A', 'size_t', 'size_t'] 10 0 27 6 3 118 0 485 110
roaring_bitmap_add_offset /src/croaring/src/roaring.c 2 ['N/A', 'size_t'] 10 0 225 39 16 130 0 602 105
roaring_bitmap_or_many /src/croaring/src/roaring.c 2 ['size_t', 'N/A'] 10 0 64 14 6 130 0 576 85
roaring_bitmap_xor_many /src/croaring/src/roaring.c 2 ['size_t', 'N/A'] 12 0 64 14 6 138 0 596 81
roaring64_bitmap_to_uint64_array /src/croaring/src/roaring64.c 2 ['N/A', 'N/A'] 7 0 19 3 2 39 0 152 60
roaring_bitmap_flip /src/croaring/src/roaring.c 3 ['N/A', 'size_t', 'size_t'] 11 0 39 9 4 94 0 411 52
roaring_bitmap_rank_many /src/croaring/src/roaring.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 6 0 120 14 6 17 0 105 36

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

Functions statically reachable by fuzzers
74.0%
697 / 944
Cyclomatic complexity statically reachable by fuzzers
75.0%
3849 / 5121

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

Files and Directories in report

This section shows which files and directories are considered in this report. The main reason for showing this is fuzz introspector may include more code in the reasoning than is desired. This section helps identify if too many files/directories are included, e.g. third party code, which may be irrelevant for the threat model. In the event too much is included, fuzz introspector supports a configuration file that can exclude data from the report. See the following link for more information on how to create a config file: link

Files in report

Source file Reached by Covered by
[] []
/src/croaring/include/roaring/containers/bitset.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/bitset_util.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/art/art.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/containers/mixed_xor.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/containers/mixed_negation.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/include/roaring/containers/containers.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/include/roaring/bitset_util.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/include/roaring/roaring_array.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/include/roaring/containers/array.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/usr/include/x86_64-linux-gnu/bits/byteswap.h ['croaring_fuzzer'] []
/src/croaring/src/containers/mixed_equal.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/containers/mixed_subset.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/memory.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/include/roaring/roaring.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/include/roaring/portability.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/containers/mixed_andnot.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/include/roaring/containers/run.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/bitset.c [] []
/src/croaring/src/isadetection.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/cpp/roaring.hh ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/array_util.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/roaring.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/croaring/src/containers/containers.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/containers/array.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/containers/mixed_intersection.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/src/containers/bitset.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/roaring64.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring/src/roaring_array.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/containers/run.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/src/containers/convert.c ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring_fuzzer.c ['croaring_fuzzer'] ['croaring_fuzzer']
/src/croaring_fuzzer_cc.cc ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']
/src/croaring/include/roaring/array_util.h ['croaring_fuzzer', 'croaring_fuzzer_cc'] ['croaring_fuzzer', 'croaring_fuzzer_cc']
/src/croaring/include/roaring/bitset/bitset.h [] []
/src/croaring/src/containers/mixed_union.c ['croaring_fuzzer_cc'] ['croaring_fuzzer_cc']

Directories in report

Directory
/usr/local/bin/../include/c++/v1/
/src/croaring/include/roaring/
/src/
/usr/include/x86_64-linux-gnu/bits/
/src/croaring/src/containers/
/src/croaring/src/
/src/croaring/include/roaring/bitset/
/src/croaring/include/roaring/containers/
/src/croaring/cpp/
/src/croaring/src/art/