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 508 83.6%
gold [1:9] 53 8.73%
yellow [10:29] 8 1.31%
greenyellow [30:49] 4 0.65%
lawngreen 50+ 34 5.60%
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
231 123 re_parse_term call site: 00123 re_parse_char_class
60 544 lre_exec_backtrack call site: 00544 lre_canonicalize
50 356 get_class_atom call site: 00356 re_parse_class_set_operand
41 75 re_parse_term call site: 00075 re_parse_group_name
29 40 re_parse_term call site: 00040 re_parse_disjunction
13 421 re_emit_char call site: 00421 re_emit_range
12 408 re_emit_op_u16 call site: 00408 rqsort
10 532 lre_exec_backtrack call site: 00532 lre_is_space
8 448 re_parse_term call site: 00448 re_emit_goto
8 458 re_emit_goto call site: 00458 re_emit_goto_u8_u32
8 467 re_parse_term call site: 00467 re_emit_goto_u8
8 518 lre_exec_backtrack call site: 00518 is_line_terminator

Runtime coverage analysis

Covered functions
45
Functions that are reachable but not covered
94
Reachable functions
139
Percentage of reachable functions covered
32.37%
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 4591 79.8%
gold [1:9] 771 13.4%
yellow [10:29] 103 1.79%
greenyellow [30:49] 36 0.62%
lawngreen 50+ 247 4.29%
All colors 5748 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
542 2487 JS_DefinePropertyValueUint32 call site: 02487 JS_IteratorNext
445 5302 dbuf_put_leb128 call site: 05302 JS_ReadObject
405 3964 lre_js_is_ident_next call site: 03964 js_regexp_set_internal
194 2234 JS_CallInternal call site: 02234 JS_NewSymbolFromAtom
182 4927 js_std_add_helpers call site: 04927 js_print
168 2060 JS_CallInternal call site: 02060 JS_ThrowInternalError
138 738 JS_ToPropertyKey call site: 00738 JS_ToStringInternal
104 3709 JS_AddIntrinsicDate call site: 03709 js_Date_parse
104 4758 string_buffer_putc_slow call site: 04758 json_parse_value
103 1685 lre_is_space call site: 01685 js_atof
77 3148 js_async_function_call call site: 03148 JS_NewCFunctionData
75 4513 JS_AddIntrinsicTypedArrays call site: 04513 js_typed_array_constructor_obj

Runtime coverage analysis

Covered functions
457
Functions that are reachable but not covered
690
Reachable functions
1040
Percentage of reachable functions covered
33.65%
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 776
./list.h 6
./cutils.h 29
./quickjs.h 22
dtoa.c 37
cutils.c 18
./libunicode.h 9
libunicode.c 32
libregexp.c 51
fuzz/fuzz_common.c 3
quickjs-libc.c 32

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 3619 68.3%
gold [1:9] 413 7.80%
yellow [10:29] 640 12.0%
greenyellow [30:49] 147 2.77%
lawngreen 50+ 473 8.93%
All colors 5292 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
297 3966 lre_is_id_continue call site: 03966 re_parse_disjunction
186 2838 JS_CallInternal call site: 02838 js_binary_logic_slow
182 4927 js_std_add_helpers call site: 04927 js_print
130 2298 JS_ConcatString3 call site: 02298 JS_DefinePropertyValue
104 3709 JS_AddIntrinsicDate call site: 03709 js_Date_parse
94 4768 ident_realloc call site: 04768 json_parse_value
81 2647 js_binary_arith_slow call site: 02647 js_bigint_add
56 3091 js_async_function_resume call site: 03091 js_promise_resolve
52 4513 JS_AddIntrinsicTypedArrays call site: 04513 js_typed_array_constructor_obj
50 949 JS_NewObject call site: 00949 js_build_arguments
49 1739 js_atof call site: 01739 JS_ThrowOutOfMemory
49 3260 JS_EvalFunctionInternal call site: 03260 JS_ThrowTypeError

Runtime coverage analysis

Covered functions
692
Functions that are reachable but not covered
478
Reachable functions
977
Percentage of reachable functions covered
51.07%
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 714
./list.h 6
./cutils.h 28
./quickjs.h 22
dtoa.c 37
cutils.c 18
./libunicode.h 9
libunicode.c 32
libregexp.c 51
fuzz/fuzz_common.c 3
quickjs-libc.c 32

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'] 95 0 341 58 20 821 0 7535 2753
js_regexp_Symbol_replace /src/quickjs/quickjs.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 69 0 767 125 50 655 0 5251 309
js_json_to_str /src/quickjs/quickjs.c 5 ['N/A', 'N/A', 'size_t', 'size_t', 'N/A'] 74 0 781 139 54 644 3 4949 252
js_string_normalize /src/quickjs/quickjs.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 68 0 155 31 13 637 0 4803 126
js_typed_array_indexOf /src/quickjs/quickjs.c 6 ['N/A', 'size_t', 'size_t', 'int', 'N/A', 'int'] 70 0 931 227 93 622 0 4762 115
js_os_exec /src/quickjs/quickjs-libc.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 70 0 743 161 60 633 0 4762 110
js_set_difference /src/quickjs/quickjs.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 71 0 257 39 17 629 0 4761 90
JS_ComputeMemoryUsage /src/quickjs/quickjs.c 2 ['N/A', 'N/A'] 3 0 1108 163 54 6 0 77 71
internalize_json_property /src/quickjs/quickjs.c 8 ['N/A', 'size_t', 'size_t', 'int', 'size_t', 'size_t', 'N/A', 'N/A'] 71 0 331 63 27 619 3 4718 62
js_std_file_printf /src/quickjs/quickjs-libc.c 5 ['N/A', 'size_t', 'size_t', 'int', 'N/A'] 72 0 29 6 3 626 0 4719 61

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

Functions statically reachable by fuzzers
69.0%
1281 / 1860
Cyclomatic complexity statically reachable by fuzzers
74.0%
11661 / 15749

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
re_parse_term 471 116 24.62% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
get_class_atom 165 48 29.09% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
re_need_check_adv_and_capture_init 67 28 41.79% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
compute_register_count 60 19 31.66% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
lre_exec_backtrack 493 172 34.88% ['fuzz_eval', 'fuzz_regexp']
exchange_func 33 9 27.27% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
js_module_set_import_meta 44 24 54.54% ['fuzz_eval', 'fuzz_compile']
JS_GetPropertyInternal 138 67 48.55% ['fuzz_eval', 'fuzz_compile']
JS_SetPropertyInternal 247 57 23.07% ['fuzz_eval', 'fuzz_compile']
JS_DefineProperty 262 89 33.96% ['fuzz_eval', 'fuzz_compile']
JS_GetOwnPropertyNamesInternal 180 74 41.11% ['fuzz_eval', 'fuzz_compile']
JS_GetOwnPropertyInternal 70 21 30.0% ['fuzz_eval', 'fuzz_compile']
JS_ToStringInternal 54 23 42.59% ['fuzz_eval', 'fuzz_compile']
JS_CallInternal 2600 591 22.73% ['fuzz_eval', 'fuzz_compile']
simple_next_token 81 40 49.38% ['fuzz_eval', 'fuzz_compile']
js_host_resolve_imported_module 39 17 43.58% ['fuzz_eval', 'fuzz_compile']
js_default_module_normalize_name 46 8 17.39% ['fuzz_eval', 'fuzz_compile']
js_inner_module_linking 130 69 53.07% ['fuzz_eval', 'fuzz_compile']
js_string_define_own_property 32 11 34.37% ['fuzz_eval', 'fuzz_compile']
js_promise_resolve_function_call 41 19 46.34% ['fuzz_eval', 'fuzz_compile']
fulfill_or_reject_promise 32 12 37.5% ['fuzz_eval', 'fuzz_compile']
js_async_function_resume 45 13 28.88% ['fuzz_eval', 'fuzz_compile']
push_scope 32 13 40.62% ['fuzz_eval', 'fuzz_compile']
next_token 417 202 48.44% ['fuzz_eval', 'fuzz_compile']
js_parse_string 120 60 50.0% ['fuzz_eval', 'fuzz_compile']
js_parse_postfix_expr 579 179 30.91% ['fuzz_eval', 'fuzz_compile']
js_parse_assign_expr2 236 46 19.49% ['fuzz_eval', 'fuzz_compile']
js_parse_logical_and_or 35 12 34.28% ['fuzz_eval', 'fuzz_compile']
js_parse_expr_binary 161 88 54.65% ['fuzz_eval', 'fuzz_compile']
js_parse_unary 129 40 31.00% ['fuzz_eval', 'fuzz_compile']
get_lvalue 121 55 45.45% ['fuzz_eval', 'fuzz_compile']
put_lvalue 109 35 32.11% ['fuzz_eval', 'fuzz_compile']
js_parse_import 125 36 28.79% ['fuzz_eval', 'fuzz_compile']
js_parse_statement_or_decl 626 81 12.93% ['fuzz_eval', 'fuzz_compile']
emit_return 68 17 25.0% ['fuzz_eval', 'fuzz_compile']
add_global_variables 52 21 40.38% ['fuzz_eval', 'fuzz_compile']
resolve_variables 309 127 41.10% ['fuzz_eval', 'fuzz_compile']
resolve_scope_var 425 174 40.94% ['fuzz_eval', 'fuzz_compile']
instantiate_hoisted_definitions 85 30 35.29% ['fuzz_eval', 'fuzz_compile']
resolve_labels 776 311 40.07% ['fuzz_eval', 'fuzz_compile']
compute_stack_size 180 96 53.33% ['fuzz_eval', 'fuzz_compile']
ss_check 33 17 51.51% ['fuzz_eval', 'fuzz_compile']
unicode_to_utf8 32 16 50.0% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
js_dtoa_max_len 39 15 38.46% ['fuzz_eval', 'fuzz_compile']
js_dtoa 172 29 16.86% ['fuzz_eval', 'fuzz_compile']
lre_parse_escape 108 39 36.11% ['fuzz_eval', 'fuzz_regexp', 'fuzz_compile']
js_os_poll 98 14 14.28% ['fuzz_eval', 'fuzz_compile']
JS_ExecutePendingJob 31 10 32.25% ['fuzz_eval', 'fuzz_compile']
JS_HasProperty 37 20 54.05% ['fuzz_eval', 'fuzz_compile']
JS_GetPropertyValue 69 26 37.68% ['fuzz_eval', 'fuzz_compile']
delete_property 83 35 42.16% ['fuzz_eval', 'fuzz_compile']
JS_ToBoolFree 59 25 42.37% ['fuzz_eval', 'fuzz_compile']
JS_ToPrimitiveFree 69 34 49.27% ['fuzz_eval', 'fuzz_compile']
JS_ToInt64SatFree 38 13 34.21% ['fuzz_eval', 'fuzz_compile']
js_call_c_function 112 51 45.53% ['fuzz_eval']
js_closure 42 18 42.85% ['fuzz_eval', 'fuzz_compile']
js_for_in_next 80 27 33.75% ['fuzz_eval', 'fuzz_compile']
js_for_in_prepare_prototype_chain_enum 52 23 44.23% ['fuzz_eval', 'fuzz_compile']
JS_GetIterator 31 12 38.70% ['fuzz_eval', 'fuzz_compile']
JS_IteratorNext2 31 17 54.83% ['fuzz_eval', 'fuzz_compile']
JS_ConcatString 72 19 26.38% ['fuzz_eval', 'fuzz_compile']
js_add_slow 103 22 21.35% ['fuzz_eval', 'fuzz_compile']
js_binary_arith_slow 178 35 19.66% ['fuzz_eval', 'fuzz_compile']
js_unary_arith_slow 134 27 20.14% ['fuzz_eval', 'fuzz_compile']
js_binary_logic_slow 153 28 18.30% ['fuzz_eval', 'fuzz_compile']
JS_CallConstructorInternal 40 15 37.5% ['fuzz_eval', 'fuzz_compile']
JS_ToObject 46 16 34.78% ['fuzz_eval', 'fuzz_compile']
js_compile_regexp 69 37 53.62% ['fuzz_eval', 'fuzz_compile']
js_regexp_constructor 78 27 34.61% ['fuzz_eval', 'fuzz_compile']
js_regexp_exec 196 101 51.53% ['fuzz_eval']
js_parse_function_decl2 463 177 38.22% ['fuzz_eval']
define_var 112 41 36.60% ['fuzz_eval']
js_parse_regexp 100 44 44.0% ['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 14 41.17% ['fuzz_eval']
js_parse_function_check_names 43 22 51.16% ['fuzz_eval']
js_array_join 50 27 54.0% ['fuzz_eval']
js_function_toString 38 10 26.31% ['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.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']
/src/quickjs/fuzz/fuzz_regexp.c ['fuzz_regexp'] ['fuzz_regexp']
/src/quickjs/cutils.c ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
/src/quickjs/libregexp.c ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval']
/src/quickjs/./libunicode.h ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] []
/src/quickjs/./quickjs.h ['fuzz_compile', 'fuzz_eval'] []
/src/quickjs/fuzz/fuzz_common.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']
/src/quickjs/./list.h ['fuzz_compile', 'fuzz_eval'] []
/src/quickjs/dtoa.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_eval']
/src/quickjs/fuzz/fuzz_compile.c ['fuzz_compile'] ['fuzz_compile']
/src/quickjs/fuzz/fuzz_eval.c ['fuzz_eval'] ['fuzz_eval']
/src/quickjs/quickjs-libc.c ['fuzz_compile', 'fuzz_eval'] ['fuzz_compile', 'fuzz_eval']
/src/quickjs/libunicode.c ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] ['fuzz_eval']
/src/quickjs/./cutils.h ['fuzz_regexp', 'fuzz_compile', 'fuzz_eval'] []

Directories in report

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