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_regexp

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 358 58.9%
gold [1:9] 50 8.23%
yellow [10:29] 37 6.09%
greenyellow [30:49] 7 1.15%
lawngreen 50+ 155 25.5%
All colors 607 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
47 238 unicode_case1 call site: 00238 unicode_prop_ops
35 198 cr_op call site: 00198 unicode_prop
31 573 lre_exec_backtrack call site: 00573 lre_canonicalize
18 171 re_string_list_free call site: 00171 parse_unicode_property
17 384 re_parse_nested_class call site: 00384 re_parse_class_set_operand
14 93 lre_js_is_ident_first call site: 00093 lre_js_is_ident_next
14 335 lre_canonicalize call site: 00335 parse_class_string_disjunction
13 288 cr_op1 call site: 00288 re_string_list_canonicalize
13 421 re_emit_char call site: 00421 re_emit_range
10 81 lre_parse_escape call site: 00081 unicode_from_utf8
10 532 lre_exec_backtrack call site: 00532 lre_is_space
8 40 re_parse_term call site: 00040 re_parse_disjunction

Runtime coverage analysis

Covered functions
89
Functions that are reachable but not covered
52
Reachable functions
139
Percentage of reachable functions covered
62.59%
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
fuzz/fuzz_regexp.c 4
libregexp.c 57
cutils.c 14
./cutils.h 14
./libunicode.h 10
libunicode.c 32

Fuzzer: fuzz_compile

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 4242 72.2%
gold [1:9] 852 14.5%
yellow [10:29] 279 4.75%
greenyellow [30:49] 74 1.26%
lawngreen 50+ 426 7.25%
All colors 5873 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
554 2588 JS_DefinePropertyValueUint32 call site: 02588 JS_IteratorNext
405 4082 lre_js_is_ident_next call site: 04082 js_regexp_set_internal
194 2335 JS_CallInternal call site: 02335 JS_NewSymbolFromAtom
183 5048 js_std_add_helpers call site: 05048 js_print
158 2161 JS_CallInternal call site: 02161 JS_ThrowInternalError
135 3207 js_async_function_resume call site: 03207 js_promise_resolve
104 4878 string_buffer_putc_slow call site: 04878 json_parse_value
99 5719 JS_ReadModule call site: 05719 JS_ReadObjectRec
75 2085 JS_CallInternal call site: 02085 JS_ThrowReferenceErrorUninitialized2
75 4631 JS_AddIntrinsicTypedArrays call site: 04631 js_typed_array_constructor_obj
74 1708 JS_ToInt32 call site: 01708 JS_ToNumberFree
72 4000 dbuf_put_u32 call site: 04000 re_parse_disjunction

Runtime coverage analysis

Covered functions
598
Functions that are reachable but not covered
591
Reachable functions
1052
Percentage of reachable functions covered
43.82%
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
fuzz/fuzz_compile.c 1
quickjs.c 784
./list.h 6
./cutils.h 29
./quickjs.h 23
dtoa.c 37
cutils.c 18
./libunicode.h 9
libunicode.c 32
libregexp.c 51
fuzz/fuzz_common.c 3
quickjs-libc.c 34

Fuzzer: fuzz_eval

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 3767 69.5%
gold [1:9] 852 15.7%
yellow [10:29] 288 5.31%
greenyellow [30:49] 41 0.75%
lawngreen 50+ 468 8.64%
All colors 5416 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
403 4084 lre_is_id_continue call site: 04084 js_regexp_set_internal
183 5048 js_std_add_helpers call site: 05048 js_print
135 3207 js_async_function_resume call site: 03207 js_promise_resolve
119 2193 js_for_in_prepare_prototype_chain_enum call site: 02193 JS_GetOwnPropertyNamesInternal
107 3033 JS_CallInternal call site: 03033 js_operator_in
104 3827 JS_AddIntrinsicDate call site: 03827 js_Date_parse
94 4888 ident_realloc call site: 04888 json_parse_value
81 2750 js_binary_arith_slow call site: 02750 js_bigint_add
74 2390 JS_ToStringFree call site: 02390 string_buffer_init2
72 4000 dbuf_put_u32 call site: 04000 re_parse_disjunction
60 2619 JS_ConcatString call site: 02619 JS_ConcatString2
57 2886 js_not_slow call site: 02886 js_binary_logic_slow

Runtime coverage analysis

Covered functions
650
Functions that are reachable but not covered
509
Reachable functions
989
Percentage of reachable functions covered
48.53%
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
fuzz/fuzz_eval.c 1
quickjs.c 722
./list.h 6
./cutils.h 28
./quickjs.h 23
dtoa.c 37
cutils.c 18
./libunicode.h 9
libunicode.c 32
libregexp.c 51
fuzz/fuzz_common.c 3
quickjs-libc.c 34

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
__JS_EvalInternal /src/quickjs/quickjs.c 8 ['N/A', 'size_t', 'size_t', 'N/A', 'size_t', 'N/A', 'int', 'int'] 96 0 334 57 20 829 0 7661 2755
js_regexp_Symbol_replace /src/quickjs/quickjs.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 70 0 712 120 49 663 0 5375 309
js_json_to_str /src/quickjs/quickjs.c 5 ['N/A', 'N/A', 'size_t', 'size_t', 'N/A'] 75 0 775 140 54 652 3 5073 252
js_string_normalize /src/quickjs/quickjs.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 69 0 150 31 13 645 0 4928 127
js_typed_array_indexOf /src/quickjs/quickjs.c 6 ['N/A', 'size_t', 'size_t', 'int', 'N/A', 'int'] 71 0 930 227 93 630 0 4886 115
js_os_exec /src/quickjs/quickjs-libc.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 71 0 745 163 61 641 0 4887 111
js_set_difference /src/quickjs/quickjs.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 72 0 248 39 17 637 0 4885 90

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

Functions statically reachable by fuzzers
68.0%
1279 / 1890
Cyclomatic complexity statically reachable by fuzzers
72.0%
11638 / 16070

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

Runtime coverage analysis

This section shows analysis of runtime coverage data.

For futher technical details on how this section is generated, please see the Glossary .

Complex functions with low coverage

Func name Function total lines Lines covered at runtime percentage covered Reached by fuzzers
exchange_func 33 14 42.42% ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
lre_parse_escape 108 39 36.11% ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
re_parse_nested_class 142 57 40.14% ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
re_emit_string_list 64 9 14.06% ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
js_os_poll 97 12 12.37% ['fuzz_compile', 'fuzz_eval']
JS_ExecutePendingJob 31 10 32.25% ['fuzz_compile', 'fuzz_eval']
JS_GetPropertyInternal 138 49 35.50% ['fuzz_compile', 'fuzz_eval']
JS_SetPropertyInternal 247 51 20.64% ['fuzz_compile', 'fuzz_eval']
JS_DefineProperty 262 89 33.96% ['fuzz_compile', 'fuzz_eval']
JS_GetOwnPropertyNamesInternal 180 96 53.33% ['fuzz_compile', 'fuzz_eval']
JS_GetOwnPropertyInternal 70 30 42.85% ['fuzz_compile', 'fuzz_eval']
add_property 50 27 54.0% ['fuzz_compile', 'fuzz_eval']
JS_ToStringInternal 54 21 38.88% ['fuzz_compile', 'fuzz_eval']
js_call_c_function 112 46 41.07% ['fuzz_compile', 'fuzz_eval']
JS_CallInternal 2787 625 22.42% ['fuzz_compile', 'fuzz_eval']
simple_next_token 81 37 45.67% ['fuzz_compile', 'fuzz_eval']
js_host_resolve_imported_module 39 17 43.58% ['fuzz_compile', 'fuzz_eval']
js_default_module_normalize_name 46 8 17.39% ['fuzz_compile', 'fuzz_eval']
js_inner_module_linking 130 66 50.76% ['fuzz_compile', 'fuzz_eval']
JS_WriteObjectRec 137 25 18.24% ['fuzz_compile']
JS_WriteModule 44 17 38.63% ['fuzz_compile']
JS_ReadObjectRec 107 27 25.23% ['fuzz_compile']
JS_ReadModule 103 25 24.27% ['fuzz_compile']
js_string_define_own_property 32 11 34.37% ['fuzz_compile', 'fuzz_eval']
js_promise_resolve_function_call 41 19 46.34% ['fuzz_compile', 'fuzz_eval']
fulfill_or_reject_promise 32 15 46.87% ['fuzz_compile', 'fuzz_eval']
js_async_function_resume 45 20 44.44% ['fuzz_compile', 'fuzz_eval']
js_date_parse_isostring 54 12 22.22% ['fuzz_compile', 'fuzz_eval']
js_date_parse_otherstring 140 42 30.0% ['fuzz_compile', 'fuzz_eval']
push_scope 32 13 40.62% ['fuzz_compile', 'fuzz_eval']
next_token 417 213 51.07% ['fuzz_compile', 'fuzz_eval']
js_parse_string 120 52 43.33% ['fuzz_compile', 'fuzz_eval']
js_parse_function_decl2 463 239 51.61% ['fuzz_compile', 'fuzz_eval']
js_parse_regexp 100 31 31.0% ['fuzz_compile']
js_parse_postfix_expr 579 212 36.61% ['fuzz_compile', 'fuzz_eval']
js_parse_array_literal 84 32 38.09% ['fuzz_compile']
js_parse_assign_expr2 236 46 19.49% ['fuzz_compile', 'fuzz_eval']
js_parse_logical_and_or 35 12 34.28% ['fuzz_compile', 'fuzz_eval']
js_parse_expr_binary 161 80 49.68% ['fuzz_compile', 'fuzz_eval']
js_parse_unary 129 51 39.53% ['fuzz_compile', 'fuzz_eval']
get_lvalue 121 58 47.93% ['fuzz_compile', 'fuzz_eval']
put_lvalue 109 47 43.11% ['fuzz_compile', 'fuzz_eval']
js_parse_import 125 36 28.79% ['fuzz_compile', 'fuzz_eval']
js_parse_statement_or_decl 627 149 23.76% ['fuzz_compile', 'fuzz_eval']
emit_return 68 17 25.0% ['fuzz_compile', 'fuzz_eval']
resolve_variables 309 141 45.63% ['fuzz_compile', 'fuzz_eval']
resolve_scope_var 425 176 41.41% ['fuzz_compile', 'fuzz_eval']
resolve_labels 776 318 40.97% ['fuzz_compile', 'fuzz_eval']
compute_stack_size 180 82 45.55% ['fuzz_compile', 'fuzz_eval']
ss_check 33 17 51.51% ['fuzz_compile', 'fuzz_eval']
unicode_to_utf8 32 16 50.0% ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
js_dtoa_max_len 39 15 38.46% ['fuzz_compile', 'fuzz_eval']
js_dtoa 172 29 16.86% ['fuzz_compile', 'fuzz_eval']
JS_HasProperty 37 20 54.05% ['fuzz_compile', 'fuzz_eval']
JS_GetPropertyValue 69 28 40.57% ['fuzz_compile', 'fuzz_eval']
JS_SetPropertyValue 115 23 20.0% ['fuzz_compile', 'fuzz_eval']
delete_property 83 35 42.16% ['fuzz_compile', 'fuzz_eval']
JS_ToBoolFree 59 10 16.94% ['fuzz_compile', 'fuzz_eval']
JS_ToPrimitiveFree 69 33 47.82% ['fuzz_compile', 'fuzz_eval']
JS_ToInt64SatFree 38 13 34.21% ['fuzz_compile', 'fuzz_eval']
JS_CheckDefineGlobalVar 34 15 44.11% ['fuzz_compile', 'fuzz_eval']
js_closure_define_global_var 88 27 30.68% ['fuzz_compile', 'fuzz_eval']
js_for_in_next 80 27 33.75% ['fuzz_compile', 'fuzz_eval']
js_for_in_prepare_prototype_chain_enum 52 23 44.23% ['fuzz_compile', 'fuzz_eval']
JS_ConcatString 72 16 22.22% ['fuzz_compile', 'fuzz_eval']
js_add_slow 103 15 14.56% ['fuzz_compile', 'fuzz_eval']
js_binary_arith_slow 178 32 17.97% ['fuzz_compile', 'fuzz_eval']
JS_CallConstructorInternal 40 15 37.5% ['fuzz_compile', 'fuzz_eval']
define_var 112 54 48.21% ['fuzz_eval']
js_parse_destructuring_element 403 84 20.84% ['fuzz_eval']
js_parse_property_name 106 19 17.92% ['fuzz_eval']
js_define_var 34 17 50.0% ['fuzz_eval']
js_parse_var 87 25 28.73% ['fuzz_eval']
js_parse_for_in_of 183 99 54.09% ['fuzz_eval']
js_array_join 50 23 46.0% ['fuzz_eval']
js_function_toString 38 10 26.31% ['fuzz_eval']
js_array_buffer_constructor3 61 30 49.18% ['fuzz_compile', 'fuzz_eval']
js_typed_array_constructor 78 20 25.64% ['fuzz_compile', 'fuzz_eval']

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/quickjs/./quickjs.h ['fuzz_compile', 'fuzz_eval'] []
/src/quickjs/quickjs.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']
/src/quickjs/./list.h ['fuzz_compile', 'fuzz_eval'] []
/src/quickjs/fuzz/fuzz_common.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']
/src/quickjs/./cutils.h ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] []
/src/quickjs/cutils.c ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
/src/quickjs/fuzz/fuzz_regexp.c ['fuzz_regexp'] ['fuzz_regexp']
/src/quickjs/./libunicode.h ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] []
/src/quickjs/libregexp.c ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
/src/quickjs/fuzz/fuzz_compile.c ['fuzz_compile'] ['fuzz_compile']
/src/quickjs/dtoa.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']
/src/quickjs/fuzz/fuzz_eval.c ['fuzz_eval'] ['fuzz_eval']
/src/quickjs/libunicode.c ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] ['fuzz_regexp', 'fuzz_eval']
/src/quickjs/quickjs-libc.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']

Directories in report

Directory
/src/quickjs/./
/src/quickjs/fuzz/
/src/quickjs/