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

Fuzzer details

Fuzzer: cxa_demangle_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 17 31.4%
gold [1:9] 17 31.4%
yellow [10:29] 10 18.5%
greenyellow [30:49] 0 0.0%
lawngreen 50+ 10 18.5%
All colors 54 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
32 34 3 :

['(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::look(unsigned int) const', '(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [18], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [18], (anonymous namespace)::itanium_demangle::Node*&)', '(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [22], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [22], (anonymous namespace)::itanium_demangle::Node*&)']

54 251 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
32 32 2 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::NodeArrayNode, (anonymous namespace)::itanium_demangle::NodeArray>((anonymous namespace)::itanium_demangle::NodeArray&&)', '(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::EnclosingExpr, char const (&) [11], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [11], (anonymous namespace)::itanium_demangle::Node*&)']

32 100 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseExpr() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4771
16 234 8 :

['(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::consumeIf(char)', '(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [34], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [34], (anonymous namespace)::itanium_demangle::Node*&)', 'std::__1::basic_string_view >::empty() const', 'std::__1::basic_string_view >::basic_string_view(char const*)', '(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::look(unsigned int) const', '(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseEncoding()', '(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseNumber(bool)', '(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::consumeIf(std::__1::basic_string_view >)']

16 238 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parse() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:5488
16 74 2 :

['(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseFunctionParam()', '(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::EnclosingExpr, char const (&) [11], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [11], (anonymous namespace)::itanium_demangle::Node*&)']

16 76 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseExpr() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4760
16 61 2 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::EnableIfAttr, (anonymous namespace)::itanium_demangle::NodeArray>((anonymous namespace)::itanium_demangle::NodeArray&&)', '(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::parseTemplateArg()']

16 634 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseEncoding() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:5075
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [27], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [27], (anonymous namespace)::itanium_demangle::Node*&)']

60 255 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [12], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [12], (anonymous namespace)::itanium_demangle::Node*&)']

16 210 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [9], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [9], (anonymous namespace)::itanium_demangle::Node*&)']

16 210 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [14], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [14], (anonymous namespace)::itanium_demangle::Node*&)']

16 210 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [19], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [19], (anonymous namespace)::itanium_demangle::Node*&)']

16 210 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [34], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [34], (anonymous namespace)::itanium_demangle::Node*&)']

16 53 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891
16 16 1 :

['(anonymous namespace)::itanium_demangle::Node* (anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::make<(anonymous namespace)::itanium_demangle::SpecialName, char const (&) [41], (anonymous namespace)::itanium_demangle::Node*&>(char const (&) [41], (anonymous namespace)::itanium_demangle::Node*&)']

16 53 (anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() call site: 00000 /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h:4891

Runtime coverage analysis

Covered functions
562
Functions that are reachable but not covered
20
Reachable functions
92
Percentage of reachable functions covered
78.26%
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/llvm-project/libcxxabi/fuzz/cxa_demangle_fuzzer.cpp 1
cxa_demangle.cpp 8
demangle/ItaniumDemangle.h 20
demangle/StringViewExtras.h 1
demangle/Utility.h 6

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
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseExprPrimary() /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 1 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *'] 7 0 554 64 17 280 0 417 377
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseExpr() /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 1 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *'] 4 0 1310 178 68 142 0 213 153
void(anonymousnamespace)::DumpVisitor::operator()<(anonymousnamespace)::itanium_demangle::NewExpr>((anonymousnamespace)::itanium_demangle::NewExprconst*) /src/llvm-project/libcxxabi/src/cxa_demangle.cpp 2 ['struct.(anonymous namespace)::DumpVisitor *', 'class.(anonymous namespace)::itanium_demangle::NewExpr *'] 6 0 38 3 2 45 0 140 136
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseEncoding() /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 1 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *'] 4 0 332 66 58 106 0 193 133
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseSpecialName() /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 1 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *'] 3 0 463 71 22 88 0 128 94
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseTemplateArgs(bool) /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 2 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *', 'N/A'] 3 0 215 36 37 72 0 144 84
(anonymousnamespace)::itanium_demangle::ReferenceType::printLeft((anonymousnamespace)::itanium_demangle::OutputBuffer&)const /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 2 ['class.(anonymous namespace)::itanium_demangle::ReferenceType *', 'class.(anonymous namespace)::itanium_demangle::OutputBuffer *'] 2 0 181 31 27 28 0 75 63
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseNestedName((anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::NameState*) /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 2 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *', 'struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser<(anonymous namespace)::itanium_demangle::ManglingParser<(anonymous namespace)::DefaultAllocator>, (anonymous namespace)::DefaultAllocator>::NameState *'] 3 0 365 78 30 47 0 80 42
(anonymousnamespace)::itanium_demangle::SizeofParamPackExpr::printLeft((anonymousnamespace)::itanium_demangle::OutputBuffer&)const /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 2 ['class.(anonymous namespace)::itanium_demangle::PointerType *', 'class.(anonymous namespace)::itanium_demangle::OutputBuffer *'] 3 0 62 7 6 29 0 60 40
(anonymousnamespace)::itanium_demangle::AbstractManglingParser<(anonymousnamespace)::itanium_demangle::ManglingParser<(anonymousnamespace)::DefaultAllocator>,(anonymousnamespace)::DefaultAllocator>::parseUnresolvedName(bool) /src/llvm-project/libcxxabi/src/demangle/ItaniumDemangle.h 2 ['struct.(anonymous namespace)::itanium_demangle::AbstractManglingParser *', 'N/A'] 3 0 321 63 25 42 0 70 37

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

Functions statically reachable by fuzzers
28.0%
304 / 1092
Cyclomatic complexity statically reachable by fuzzers
36.0%
1291 / 3540

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