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_db

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 331 22.3%
gold [1:9] 14 0.94%
yellow [10:29] 1 0.06%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 1138 76.6%
All colors 1484 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
22 802 leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*) call site: 00802
20 865 leveldb::Block::NewIterator(leveldb::Comparator const*) call site: 00865
17 842 leveldb::Table::Open(leveldb::Options const&, leveldb::RandomAccessFile*, unsigned long, leveldb::Table**) call site: 00842
15 395 leveldb::VersionSet::Recover(bool*) call site: 00395
11 451 leveldb::ParseFileName(std::__1::basic_string , std::__1::allocator > const&, unsigned long*, leveldb::FileType*) call site: 00451
10 249 leveldb::VersionSet::Recover(bool*) call site: 00249 snprintf
9 286 leveldb::log::Reader::ReadPhysicalRecord(leveldb::Slice*) call site: 00286
9 509 leveldb::DBImpl::RecoverLogFile(unsigned long, bool, bool*, leveldb::VersionEdit*, unsigned long*) call site: 00509
9 792 leveldb::ReadBlock(leveldb::RandomAccessFile*, leveldb::ReadOptions const&, leveldb::BlockHandle const&, leveldb::BlockContents*) call site: 00792
7 655 leveldb::TableBuilder::WriteBlock(leveldb::BlockBuilder*, leveldb::BlockHandle*) call site: 00655
7 1016 leveldb::DBImpl::RecoverLogFile(unsigned long, bool, bool*, leveldb::VersionEdit*, unsigned long*) call site: 01016
6 379 leveldb::VersionSet::Recover(bool*) call site: 00379

Runtime coverage analysis

Covered functions
583
Functions that are reachable but not covered
96
Reachable functions
789
Percentage of reachable functions covered
87.83%
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/leveldb/build/../fuzz_db.cc 3
/src/leveldb/util/options.cc 1
/src/leveldb/util/comparator.cc 3
/src/leveldb/./util/no_destructor.h 1
/src/leveldb/include/leveldb/comparator.h 2
/src/leveldb/util/env_posix.cc 7
/src/leveldb/util/env.cc 5
/src/leveldb/./port/port_stdcxx.h 13
/src/leveldb/db/db_impl.cc 30
/src/leveldb/include/leveldb/db.h 2
/src/leveldb/./db/dbformat.h 18
/src/leveldb/include/leveldb/filter_policy.h 1
/src/leveldb/include/leveldb/status.h 13
/src/leveldb/db/filename.cc 12
/src/leveldb/util/cache.cc 6
/src/leveldb/include/leveldb/cache.h 1
/src/leveldb/db/table_cache.cc 6
/src/leveldb/db/write_batch.cc 9
/src/leveldb/./db/snapshot.h 5
/src/leveldb/db/version_set.cc 50
/src/leveldb/./db/version_set.h 14
/src/leveldb/./db/version_edit.h 13
/src/leveldb/./db/db_impl.h 3
/src/leveldb/db/version_edit.cc 5
/src/leveldb/include/leveldb/slice.h 13
/src/leveldb/db/log_writer.cc 6
/src/leveldb/./util/crc32c.h 3
/src/leveldb/util/crc32c.cc 4
/src/leveldb/./util/coding.h 5
/src/leveldb/util/coding.cc 12
/src/leveldb/util/status.cc 3
/src/leveldb/./db/log_reader.h 1
/src/leveldb/db/log_reader.cc 8
/src/leveldb/util/logging.cc 3
/src/leveldb/db/memtable.cc 5
/src/leveldb/./db/memtable.h 5
/src/leveldb/util/arena.cc 5
/src/leveldb/./db/skiplist.h 6
/src/leveldb/./util/random.h 1
/src/leveldb/include/leveldb/write_batch.h 1
/src/leveldb/./util/arena.h 1
/src/leveldb/table/iterator.cc 5
/src/leveldb/db/builder.cc 1
/src/leveldb/table/table_builder.cc 13
/src/leveldb/table/block_builder.cc 5
/src/leveldb/table/filter_block.cc 6
/src/leveldb/./table/format.h 11
/src/leveldb/include/leveldb/table_builder.h 1
/src/leveldb/table/format.cc 5
/src/leveldb/./table/block_builder.h 2
/src/leveldb/./table/filter_block.h 1
/src/leveldb/include/leveldb/options.h 2
/src/leveldb/table/table.cc 11
/src/leveldb/table/block.cc 5
/src/leveldb/include/leveldb/table.h 1
/src/leveldb/table/two_level_iterator.cc 2
/src/leveldb/./table/iterator_wrapper.h 4
/src/leveldb/./table/block.h 1
/src/leveldb/include/leveldb/iterator.h 1
/src/leveldb/db/dbformat.cc 5
/src/leveldb/./util/mutexlock.h 2
/src/leveldb/table/merger.cc 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
leveldb::DBImpl::Get(leveldb::ReadOptionsconst&,leveldb::Sliceconst&,std::__1::basic_string ,std::__1::allocator >*) /src/leveldb/db/db_impl.cc 5 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A'] 16 0 122 25 10 676 0 1320 126
leveldb::DBImpl::Write(leveldb::WriteOptionsconst&,leveldb::WriteBatch*) /src/leveldb/db/db_impl.cc 4 ['N/A', 'N/A', 'N/A', 'N/A'] 17 0 236 44 17 698 0 1322 65
leveldb::(anonymousnamespace)::ShardedLRUCache::Insert(leveldb::Sliceconst&,void*,unsignedlong,void(*)(leveldb::Sliceconst&,void*)) /src/leveldb/util/cache.cc 5 ['N/A', 'N/A', 'N/A', 'size_t', 'N/A'] 6 0 17 3 2 47 0 73 44
leveldb::(anonymousnamespace)::DBIter::Prev() /src/leveldb/db/db_iter.cc 1 ['N/A'] 19 0 120 12 5 640 0 1257 41
leveldb::(anonymousnamespace)::TwoLevelIterator::Seek(leveldb::Sliceconst&) /src/leveldb/table/two_level_iterator.cc 2 ['N/A', 'N/A'] 6 0 28 6 3 43 0 68 41
leveldb::Block::Iter::Seek(leveldb::Sliceconst&) /src/leveldb/table/block.cc 2 ['N/A', 'N/A'] 5 0 182 36 14 43 0 84 40
leveldb::(anonymousnamespace)::MemTableInserter::Delete(leveldb::Sliceconst&) /src/leveldb/db/write_batch.cc 2 ['N/A', 'N/A'] 8 0 23 3 2 64 0 113 39
leveldb::DBImpl::GetProperty(leveldb::Sliceconst&,std::__1::basic_string ,std::__1::allocator >*) /src/leveldb/db/db_impl.cc 3 ['N/A', 'N/A', 'N/A'] 6 0 446 69 26 67 0 116 35

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

Functions statically reachable by fuzzers
64.0%
493 / 765
Cyclomatic complexity statically reachable by fuzzers
71.0%
1952 / 2740

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

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/leveldb/./util/crc32c.h ['fuzz_db'] []
/src/leveldb/./db/snapshot.h ['fuzz_db'] []
/src/leveldb/table/block.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/db_impl.h ['fuzz_db'] []
/src/leveldb/db/write_batch.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/status.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/log_reader.h ['fuzz_db'] []
/src/leveldb/db/version_set.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/coding.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/env.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/filter_policy.cc [] []
/src/leveldb/db/builder.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/version_set.h ['fuzz_db'] []
/src/leveldb/./util/posix_logger.h [] []
/src/leveldb/include/leveldb/filter_policy.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/random.h ['fuzz_db'] []
/src/leveldb/include/leveldb/cache.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/iterator.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/table_builder.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/dbformat.cc ['fuzz_db'] ['fuzz_db']
/usr/local/bin/../include/c++/v1/string [] []
/src/leveldb/include/leveldb/db.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/log_writer.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/arena.h ['fuzz_db'] []
/src/leveldb/db/memtable.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/format.h ['fuzz_db'] []
/src/leveldb/./util/coding.h ['fuzz_db'] []
/usr/local/bin/../include/c++/v1/stdexcept [] []
/src/leveldb/db/db_iter.cc [] []
/src/leveldb/include/leveldb/write_batch.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/dbformat.h ['fuzz_db'] []
/src/leveldb/./db/memtable.h ['fuzz_db'] []
/src/leveldb/table/merger.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/env.h [] []
/src/leveldb/include/leveldb/slice.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/iterator_wrapper.h ['fuzz_db'] []
/src/leveldb/./db/write_batch_internal.h [] []
/src/leveldb/./table/block_builder.h ['fuzz_db'] []
/src/leveldb/table/block_builder.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/options.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/table_cache.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/format.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/mutexlock.h ['fuzz_db'] []
/src/leveldb/util/logging.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/db_impl.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/two_level_iterator.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/filter_block.h ['fuzz_db'] []
/src/leveldb/db/filename.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/include/leveldb/table.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/./table/block.h ['fuzz_db'] []
/src/leveldb/include/leveldb/comparator.h ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/version_edit.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/table_builder.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./util/no_destructor.h ['fuzz_db'] []
/src/leveldb/./db/skiplist.h ['fuzz_db'] []
/src/leveldb/util/hash.cc [] []
/src/leveldb/util/status.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/iterator.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./db/version_edit.h ['fuzz_db'] []
/src/leveldb/util/crc32c.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/env_posix.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/options.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/table/filter_block.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/cache.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/build/../fuzz_db.cc ['fuzz_db'] []
/src/leveldb/util/comparator.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/util/arena.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/db/log_reader.cc ['fuzz_db'] ['fuzz_db']
/src/leveldb/./port/port_stdcxx.h ['fuzz_db'] []
/src/leveldb/table/table.cc ['fuzz_db'] ['fuzz_db']

Directories in report

Directory
/src/leveldb/util/
/usr/local/bin/../include/c++/v1/
/src/leveldb/./table/
/src/leveldb/db/
/src/leveldb/./util/
/src/leveldb/include/leveldb/
/src/leveldb/build/../
/src/leveldb/./port/
/src/leveldb/table/
/src/leveldb/./db/