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: jq_fuzz_parse_stream

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 350 48.8%
gold [1:9] 26 3.62%
yellow [10:29] 26 3.62%
greenyellow [30:49] 6 0.83%
lawngreen 50+ 309 43.0%
All colors 717 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
70 239 5 :

['decNumberZero', 'decShiftToMost', 'decCompare', 'decSetOverflow', 'decApplyRound']

70 360 decFinalize call site: 00228 /src/jq/vendor/decNumber/decNumber.c:7289
25 184 8 :

['stream_seq_check_truncation', 'seq_check_truncation', 'jv_free', 'stream_is_top_num', 'jv_is_valid.215', 'jv_invalid', 'parse_is_top_num', 'parser_reset']

35 1215 scan call site: 00183 /src/jq/src/jv_parse.c:650
2 2 1 :

['abort']

2 2 jv_tsd_dec_ctx_init call site: 00207 /src/jq/src/jv.c:501
2 2 1 :

['abort']

2 2 tsd_dec_ctx_get call site: 00219 /src/jq/src/jv.c:525
2 2 1 :

['decSetMaxValue']

2 2 decSetOverflow call site: 00233 /src/jq/vendor/decNumber/decNumber.c:7378
0 374 3 :

['jv_array_append', 'jv_array', 'jv_copy']

0 374 make_error call site: 00643 /src/jq/src/jv_parse.c:762
0 336 5 :

['jv_array_append', 'jv_copy', 'jv_free', 'jv_array_sized', 'jv_array_get']

0 336 jvp_array_slice call site: 00164 /src/jq/src/jv.c:973
0 235 2 :

['jv_free', 'make_error']

0 235 jv_parser_next call site: 00673 /src/jq/src/jv_parse.c:856
0 113 2 :

['jv_string', 'jv_invalid_with_msg']

0 223 jv_array_set call site: 00129 /src/jq/src/jv.c:1028
0 25 1 :

['decSetCoeff']

0 217 decNumberFromString call site: 00226 /src/jq/vendor/decNumber/decNumber.c:688
0 13 1 :

['decSetOverflow']

0 13 decApplyRound call site: 00231 /src/jq/vendor/decNumber/decNumber.c:7168
0 4 1 :

['jvp_array_length']

0 619 jv_array_set call site: 00123 /src/jq/src/jv.c:1021

Runtime coverage analysis

Covered functions
100
Functions that are reachable but not covered
84
Reachable functions
184
Percentage of reachable functions covered
54.35%
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
tests/jq_fuzz_parse_stream.c 1
src/jv_parse.c 24
src/jv.c 76
src/jv_alloc.c 8
src/jv_dtoa.c 24
src/jv_unicode.c 4
src/jv.h 1
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 24
src/jv_dtoa_tsd.c 4

Fuzzer: jq_fuzz_load_file

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 377 50.0%
gold [1:9] 9 1.19%
yellow [10:29] 3 0.39%
greenyellow [30:49] 1 0.13%
lawngreen 50+ 364 48.2%
All colors 754 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
85 175 3 :

['jv_free', 'jv_string_fmt', 'jv_invalid_with_msg']

85 175 jv_load_file call site: 00746 /src/jq/src/jv_file.c:75
70 239 5 :

['decNumberZero', 'decShiftToMost', 'decCompare', 'decSetOverflow', 'decApplyRound']

70 360 decFinalize call site: 00286 /src/jq/vendor/decNumber/decNumber.c:7289
25 184 8 :

['stream_seq_check_truncation', 'seq_check_truncation', 'jv_free', 'stream_is_top_num', 'jv_is_valid.215', 'jv_invalid', 'parse_is_top_num', 'parser_reset']

228 1215 scan call site: 00241 /src/jq/src/jv_parse.c:650
2 2 1 :

['abort']

2 2 jv_tsd_dec_ctx_init call site: 00265 /src/jq/src/jv.c:501
2 2 1 :

['abort']

2 2 tsd_dec_ctx_get call site: 00277 /src/jq/src/jv.c:525
2 2 1 :

['decSetMaxValue']

2 2 decSetOverflow call site: 00291 /src/jq/vendor/decNumber/decNumber.c:7378
0 374 3 :

['jv_array_append', 'jv_array', 'jv_copy']

0 613 jv_parser_next call site: 00721 /src/jq/src/jv_parse.c:850
0 374 3 :

['jv_array_append', 'jv_array', 'jv_copy']

0 374 make_error call site: 00701 /src/jq/src/jv_parse.c:762
0 235 2 :

['jv_free', 'make_error']

0 235 jv_parser_next call site: 00726 /src/jq/src/jv_parse.c:856
0 165 9 :

['jvp_refcnt_unshared', 'jv_copy', 'jvp_object_free', 'jvp_object_new', 'jv_get_kind', 'jvp_object_size', 'jvp_object_buckets', 'jvp_object_ptr', 'jvp_object_get_slot']

0 165 jvp_object_unshare call site: 00592 /src/jq/src/jv.c:1710
0 113 2 :

['jv_string', 'jv_invalid_with_msg']

0 223 jv_array_set call site: 00188 /src/jq/src/jv.c:1028
0 41 1 :

['jv_array']

0 265 parser_reset call site: 00159 /src/jq/src/jv_parse.c:99

Runtime coverage analysis

Covered functions
115
Functions that are reachable but not covered
89
Reachable functions
204
Percentage of reachable functions covered
56.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
tests/jq_fuzz_load_file.c 1
src/jv_file.c 1
src/jv.c 79
src/jv_alloc.c 8
src/jv_unicode.c 5
src/jv_parse.c 24
src/jv_dtoa.c 24
src/jv.h 1
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 24
src/jv_dtoa_tsd.c 4

Fuzzer: jq_fuzz_parse

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 363 50.5%
gold [1:9] 9 1.25%
yellow [10:29] 6 0.83%
greenyellow [30:49] 5 0.69%
lawngreen 50+ 335 46.6%
All colors 718 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
70 239 5 :

['decNumberZero', 'decShiftToMost', 'decCompare', 'decSetOverflow', 'decApplyRound']

70 360 decFinalize call site: 00229 /src/jq/vendor/decNumber/decNumber.c:7289
25 184 8 :

['stream_seq_check_truncation', 'seq_check_truncation', 'jv_free', 'stream_is_top_num', 'jv_is_valid.215', 'jv_invalid', 'parse_is_top_num', 'parser_reset']

228 1215 scan call site: 00184 /src/jq/src/jv_parse.c:650
2 2 1 :

['abort']

2 2 jv_tsd_dec_ctx_init call site: 00208 /src/jq/src/jv.c:501
2 2 1 :

['abort']

2 2 tsd_dec_ctx_get call site: 00220 /src/jq/src/jv.c:525
2 2 1 :

['decSetMaxValue']

2 2 decSetOverflow call site: 00234 /src/jq/vendor/decNumber/decNumber.c:7378
0 374 3 :

['jv_array_append', 'jv_array', 'jv_copy']

0 613 jv_parser_next call site: 00669 /src/jq/src/jv_parse.c:850
0 374 3 :

['jv_array_append', 'jv_array', 'jv_copy']

0 374 make_error call site: 00644 /src/jq/src/jv_parse.c:762
0 235 2 :

['jv_free', 'make_error']

0 235 jv_parser_next call site: 00674 /src/jq/src/jv_parse.c:856
0 165 9 :

['jvp_refcnt_unshared', 'jv_copy', 'jvp_object_free', 'jvp_object_new', 'jv_get_kind', 'jvp_object_size', 'jvp_object_buckets', 'jvp_object_ptr', 'jvp_object_get_slot']

0 165 jvp_object_unshare call site: 00535 /src/jq/src/jv.c:1710
0 113 2 :

['jv_string', 'jv_invalid_with_msg']

0 223 jv_array_set call site: 00130 /src/jq/src/jv.c:1028
0 41 1 :

['jv_array']

0 265 parser_reset call site: 00062 /src/jq/src/jv_parse.c:99
0 41 1 :

['jv_array']

0 47 parser_init call site: 00005 /src/jq/src/jv_parse.c:71

Runtime coverage analysis

Covered functions
112
Functions that are reachable but not covered
73
Reachable functions
185
Percentage of reachable functions covered
60.54%
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
tests/jq_fuzz_parse.c 1
src/jv_parse.c 25
src/jv.c 76
src/jv_alloc.c 8
src/jv_dtoa.c 24
src/jv_unicode.c 4
src/jv.h 1
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 24
src/jv_dtoa_tsd.c 4

Fuzzer: jq_fuzz_parse_extended

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 233 23.7%
gold [1:9] 54 5.49%
yellow [10:29] 27 2.74%
greenyellow [30:49] 11 1.12%
lawngreen 50+ 657 66.9%
All colors 982 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
139 139 1 :

['jv_string_append_buf']

139 139 put_buf call site: 00725 /src/jq/src/jv_print.c:98
70 239 5 :

['decNumberZero', 'decShiftToMost', 'decCompare', 'decSetOverflow', 'decApplyRound']

70 360 decFinalize call site: 00228 /src/jq/vendor/decNumber/decNumber.c:7289
10 10 1 :

['decShiftToLeast']

10 10 decTrim call site: 00323 /src/jq/vendor/decNumber/decNumber.c:6602
2 4 2 :

['abort', 'jv_mem_free']

2 4 tsd_dtoa_context_get call site: 00351 /src/jq/src/jv_dtoa_tsd.c:45
2 2 1 :

['abort']

2 2 jv_tsd_dec_ctx_init call site: 00207 /src/jq/src/jv.c:501
2 2 1 :

['abort']

2 2 tsd_dec_ctx_get call site: 00219 /src/jq/src/jv.c:525
2 2 1 :

['abort']

2 2 jv_tsd_dtoa_ctx_init call site: 00335 /src/jq/src/jv_dtoa_tsd.c:32
2 2 1 :

['decSetMaxValue']

2 2 decSetOverflow call site: 00233 /src/jq/vendor/decNumber/decNumber.c:7378
0 336 5 :

['jv_array_append', 'jv_copy', 'jv_free', 'jv_array_sized', 'jv_array_get']

0 336 jvp_array_slice call site: 00164 /src/jq/src/jv.c:973
0 165 9 :

['jvp_refcnt_unshared', 'jv_copy', 'jvp_object_free', 'jvp_object_new', 'jv_get_kind', 'jvp_object_size', 'jvp_object_buckets', 'jvp_object_ptr', 'jvp_object_get_slot']

0 165 jvp_object_unshare call site: 00534 /src/jq/src/jv.c:1710
0 113 2 :

['jv_string', 'jv_invalid_with_msg']

0 223 jv_array_set call site: 00129 /src/jq/src/jv.c:1028
0 48 1 :

['multadd']

0 187 pow5mult call site: 00379 /src/jq/src/jv_dtoa.c:877

Runtime coverage analysis

Covered functions
181
Functions that are reachable but not covered
41
Reachable functions
220
Percentage of reachable functions covered
81.36%
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
tests/jq_fuzz_parse_extended.c 1
src/jv_parse.c 24
src/jv.c 92
src/jv_alloc.c 9
src/jv_dtoa.c 29
src/jv_unicode.c 4
src/jv.h 1
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 24
src/jv_dtoa_tsd.c 4
./src/jv.h 1
src/jv_print.c 9
src/jv_aux.c 2

Fuzzer: jq_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 1297 42.7%
gold [1:9] 72 2.37%
yellow [10:29] 2 0.06%
greenyellow [30:49] 2 0.06%
lawngreen 50+ 1660 54.7%
All colors 3033 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
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01487 /src/jq/src/jv_print.c:281
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01487 /src/jq/src/jv_print.c:308
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01487 /src/jq/src/jv_print.c:378
206 263 5 :

['jv_get_kind', 'jv_array_slice', 'stack_pop_block', 'stack_block', 'jv_free']

206 263 stack_restore call site: 00147 /src/jq/src/execute.c:284
151 151 1 :

['put_indent']

548 1191 jv_dump_term call site: 01487 /src/jq/src/jv_print.c:302
151 151 1 :

['put_indent']

548 1191 jv_dump_term call site: 01487 /src/jq/src/jv_print.c:372
116 190 8 :

['jq_yyrealloc', 'yy_fatal_error', 'fread', 'jq_yyrestart', 'getc', 'clearerr', '__errno_location', 'ferror']

116 190 yy_get_next_buffer call site: 00999 /src/jq/src/lexer.c:1639
28 72 2 :

['decNaNs', 'decUnitCompare']

28 282 decCompareOp call site: 01691 /src/jq/vendor/decNumber/decNumber.c:6051
25 184 8 :

['stream_seq_check_truncation', 'seq_check_truncation', 'jv_free', 'stream_is_top_num', 'jv_is_valid.215', 'jv_invalid', 'parse_is_top_num', 'parser_reset']

228 1215 scan call site: 00426 /src/jq/src/jv_parse.c:650
8 10 2 :

['decNumberZero', 'decBiStr']

8 408 decNumberFromString call site: 00466 /src/jq/vendor/decNumber/decNumber.c:527
6 6 1 :

['yy_fatal_error']

6 6 yy_pop_state call site: 00304 /src/jq/src/lexer.c:2290
2 4 2 :

['abort', 'jv_mem_free']

2 4 tsd_dtoa_context_get call site: 00592 /src/jq/src/jv_dtoa_tsd.c:45

Runtime coverage analysis

Covered functions
387
Functions that are reachable but not covered
99
Reachable functions
482
Percentage of reachable functions covered
79.46%
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
tests/jq_fuzz_compile.c 1
src/execute.c 23
src/jv_alloc.c 11
src/exec_stack.h 7
src/jv.c 110
src/locfile.c 6
src/jv_unicode.c 5
src/jv.h 1
src/bytecode.c 8
src/linker.c 9
src/parser.y 14
src/lexer.c 23
src/lexer.l 5
src/compile.c 81
src/parser.c 6
src/jv_parse.c 26
src/jv_dtoa.c 29
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 26
src/jv_dtoa_tsd.c 4
src/builtin.c 17
src/jv_print.c 11
src/jv_aux.c 4
src/util.c 4
src/jv_file.c 1

Fuzzer: jq_fuzz_fixed

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 1393 39.8%
gold [1:9] 92 2.63%
yellow [10:29] 33 0.94%
greenyellow [30:49] 26 0.74%
lawngreen 50+ 1953 55.8%
All colors 3497 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
498 498 1 :

['compile_range_repeat_node']

498 1028 compile_quantifier_node call site: 00000 /src/jq/vendor/oniguruma/src/regcomp.c:1530
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:281
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:308
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:378
292 292 9 :

['fetch_escaped_value', 'check_code_point_sequence', 'scan_hexadecimal_number', 'scan_number', 'CLOSE_BRACKET_WITHOUT_ESC_WARN', 'is_end_of_bre_subexp', 'is_head_of_bre_subexp', 'scan_octal_number', 'fetch_interval']

382 535 fetch_token call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:6240
262 262 1 :

['prs_callout_of_name']

262 262 prs_bag call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:8494
191 191 6 :

['tune_call2', 'unset_addr_list_init', 'tune_called_state', 'tune_call', 'recursive_call_check_trav', 'infinite_recursive_call_check_trav']

232 811 parse_and_tune call site: 00000 /src/jq/vendor/oniguruma/src/regcomp.c:7427
190 190 8 :

['jq_yyrealloc', 'yy_fatal_error', 'fread', 'jq_yyrestart', 'getc', 'clearerr', '__errno_location', 'ferror']

190 190 yy_get_next_buffer call site: 01002 /src/jq/src/lexer.c:1639
151 151 1 :

['put_indent']

548 1191 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:302
151 151 1 :

['put_indent']

548 1191 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:372
149 149 4 :

['fetch_escaped_value', 'check_code_point_sequence_cc', 'scan_hexadecimal_number', 'scan_octal_number']

149 149 fetch_token_cc call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:5318
112 408 4 :

['jv_string_concat', 'onig_error_code_to_str', 'jv_string', 'jv_invalid_with_msg']

112 656 f_match call site: 00000 /src/jq/src/builtin.c:1093

Runtime coverage analysis

Covered functions
700
Functions that are reachable but not covered
94
Reachable functions
502
Percentage of reachable functions covered
81.27%
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
./tests/jq_fuzz_fixed.cpp 1
src/execute.c 34
src/jv_alloc.c 11
src/exec_stack.h 9
src/jv.c 114
src/jv_unicode.c 5
src/locfile.c 6
src/jv.h 1
src/bytecode.c 6
src/linker.c 9
src/parser.y 14
src/lexer.c 23
src/lexer.l 5
src/compile.c 81
src/parser.c 6
src/jv_parse.c 27
src/jv_dtoa.c 29
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 26
src/jv_dtoa_tsd.c 4
src/builtin.c 17
src/jv_print.c 11
src/jv_aux.c 6
src/util.c 4
src/jv_file.c 1
./src/jv.h 1

Fuzzer: jq_fuzz_execute

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 1297 37.0%
gold [1:9] 83 2.37%
yellow [10:29] 35 0.99%
greenyellow [30:49] 22 0.62%
lawngreen 50+ 2064 58.9%
All colors 3501 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
1222 1361 5 :

['jv_null', 'jv_copy', 'jv_array_length', 'delpaths_sorted', 'jv_array_get']

1222 1471 jv_delpaths call site: 00000 /src/jq/src/jv_aux.c:516
414 3552 13 :

['cc_cprop_next', 'fetch_token_cc', 'initialize_cclass', 'onig_node_free', 'fetch_char_property_to_ctype', 'add_ctype_to_cc', 'add_code_range', 'prs_posix_bracket', 'cc_char_next', 'and_cclass', 'prs_cc', 'CC_ESC_WARN', 'or_cclass']

414 3564 prs_cc call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:7081
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:281
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:308
397 397 1 :

['put_refcnt']

397 600 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:378
151 151 1 :

['put_indent']

548 1191 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:302
151 151 1 :

['put_indent']

548 1191 jv_dump_term call site: 01490 /src/jq/src/jv_print.c:372
116 190 8 :

['jq_yyrealloc', 'yy_fatal_error', 'fread', 'jq_yyrestart', 'getc', 'clearerr', '__errno_location', 'ferror']

116 190 yy_get_next_buffer call site: 01002 /src/jq/src/lexer.c:1639
79 79 1 :

['add_ctype_to_cc_by_range_limit']

79 79 add_ctype_to_cc call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:6614
64 1568 3 :

['match_at', 'backward_search', 'onigenc_get_prev_char_head']

64 1583 search_in_range call site: 00000 /src/jq/vendor/oniguruma/src/regexec.c:5735
30 30 1 :

['onig_snprintf_with_pattern']

30 30 CLOSE_BRACKET_WITHOUT_ESC_WARN call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:5134
30 30 1 :

['onig_snprintf_with_pattern']

30 30 CC_ESC_WARN call site: 00000 /src/jq/vendor/oniguruma/src/regparse.c:5118

Runtime coverage analysis

Covered functions
928
Functions that are reachable but not covered
85
Reachable functions
502
Percentage of reachable functions covered
83.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.
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
./tests/jq_fuzz_execute.cpp 1
src/execute.c 34
src/jv_alloc.c 11
src/exec_stack.h 9
src/jv.c 114
src/jv_unicode.c 5
src/locfile.c 6
src/jv.h 1
src/bytecode.c 6
src/linker.c 9
src/parser.y 14
src/lexer.c 23
src/lexer.l 5
src/compile.c 81
src/parser.c 6
src/jv_parse.c 27
src/jv_dtoa.c 29
vendor/decNumber/decContext.c 3
vendor/decNumber/decNumber.c 26
src/jv_dtoa_tsd.c 4
src/builtin.c 17
src/jv_print.c 11
src/jv_aux.c 6
src/util.c 4
src/jv_file.c 1
./src/jv.h 1

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
f_match /src/jq/src/builtin.c 7 ['N/A', 'size_t', 'N/A', 'size_t', 'N/A', 'N/A', 'N/A'] 16 0 2157 94 27 617 0 6170 4818
decNumberPower /src/jq/vendor/decNumber/decNumber.c 4 ['N/A', 'N/A', 'N/A', 'N/A'] 8 0 1062 161 60 34 0 776 418
onig_regset_search /src/jq/vendor/oniguruma/src/regexec.c 8 ['N/A', 'N/A', 'N/A', 'N/A', 'N/A', 'int', 'int', 'N/A'] 11 0 139 14 5 45 0 1054 106
onig_setup_builtin_monitors_by_ascii_encoded_name /src/jq/vendor/oniguruma/src/regexec.c 1 ['N/A'] 6 0 80 11 4 34 0 184 100
f_delpaths /src/jq/src/builtin.c 5 ['N/A', 'size_t', 'N/A', 'size_t', 'N/A'] 17 0 43 3 2 187 0 1287 96
get_case_fold_codes_by_str /src/jq/vendor/oniguruma/src/utf8.c 4 ['int', 'N/A', 'N/A', 'N/A'] 4 0 28 3 2 8 0 91 79
detect_can_be_slow /src/jq/vendor/oniguruma/src/regcomp.c 4 ['N/A', 'N/A', 'int', 'N/A'] 3 0 626 102 28 2 2 74 74
f_format /src/jq/src/builtin.c 5 ['N/A', 'size_t', 'N/A', 'size_t', 'N/A'] 16 0 2040 188 57 178 0 1297 68
jq_util_input_next_input_cb /src/jq/src/util.c 2 ['N/A', 'N/A'] 17 0 27 3 2 194 0 1365 52
decNumberSquareRoot /src/jq/vendor/decNumber/decNumber.c 3 ['N/A', 'N/A', 'N/A'] 6 0 1046 116 42 26 0 571 42

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

Functions statically reachable by fuzzers
67.0%
939 / 1399
Cyclomatic complexity statically reachable by fuzzers
81.0%
8771 / 10779

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

Fuzz engine guidance

This sections provides heuristics that can be used as input to a fuzz engine when running a given fuzz target. The current focus is on providing input that is usable by libFuzzer.

tests/jq_fuzz_parse_stream.c

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['jv_number_value', 'scan', 'jvp_array_alloc', 'check_literal', 'decSetSubnormal', 'jv_array_set', 'jv_parser_next', 'jvp_array_offset', 'jvp_array_slice', 'jv_string_vfmt']

tests/jq_fuzz_load_file.c

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['scan', 'jv_array_set', 'jv_string_vfmt', 'jvp_object_unshare', 'check_literal', 'decSetSubnormal', 'jv_load_file', 'jv_parser_next', 'parse_check_done']

tests/jq_fuzz_parse.c

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['scan', 'jv_array_set', 'jvp_array_alloc', 'jvp_object_unshare', 'check_literal', 'decSetSubnormal', 'jv_parser_next', 'parse_check_done', 'jvp_object_buckets']

tests/jq_fuzz_parse_extended.c

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['jvp_dtoa', 'diff', 'jvp_array_alloc', 'put_str', 'quorem', 'jvp_object_unshare', 'jvp_strtod', 'decSetSubnormal', 'Balloc', 'jv_array_set']

tests/jq_fuzz_compile.c

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['gen_param', 'quorem', 'yy_push_state', 'process_dependencies', 'gen_foreach', 'gen_object_matcher', 'block_has_only_binders_and_imports', 'gen_dictpair', 'jvp_dtoa', 'gen_error']

./tests/jq_fuzz_fixed.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['gen_param', 'yy_push_state', 'process_dependencies', 'quorem', 'gen_dictpair', 'jq_next', 'gen_foreach', 'gen_object_matcher', 'binop_greatereq', 'block_has_only_binders_and_imports']

./tests/jq_fuzz_execute.cpp

Dictionary

Use this with the libFuzzer -dict=DICT.file flag


Fuzzer function priority

Use one of these functions as input to libfuzzer with flag: -focus_function name

-focus_function=['gen_param', 'yy_push_state', 'process_dependencies', 'quorem', 'jq_next', 'gen_foreach', 'gen_object_matcher', 'block_has_only_binders_and_imports', 'gen_dictpair', 'jvp_dtoa']

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
decContextDefault 39 21 53.84% ['jq_fuzz_execute', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_parse_stream', 'jq_fuzz_parse', 'jq_fuzz_load_file', 'jq_fuzz_fixed']
decApplyRound 94 36 38.29% ['jq_fuzz_execute', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_parse_stream', 'jq_fuzz_parse', 'jq_fuzz_load_file', 'jq_fuzz_fixed']
jvp_dtoa 273 120 43.95% ['jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_execute', 'jq_fuzz_fixed']
yy_get_next_buffer 90 19 21.11% ['jq_fuzz_compile', 'jq_fuzz_execute', 'jq_fuzz_fixed']
decCompareOp 91 23 25.27% ['jq_fuzz_compile', 'jq_fuzz_execute', 'jq_fuzz_fixed']
jv_set 79 32 40.50% ['jq_fuzz_execute', 'jq_fuzz_fixed']
jv_dels 97 53 54.63% ['jq_fuzz_fixed']
decAddOp 174 47 27.01% ['jq_fuzz_execute', 'jq_fuzz_fixed']
compile_anchor_look_behind_node 103 23 22.33% ['jq_fuzz_execute']
compile_anchor_look_behind_not_node 116 30 25.86% ['jq_fuzz_execute']
onig_error_code_to_format 166 74 44.57% ['jq_fuzz_execute']
to_ascii 45 16 35.55% ['jq_fuzz_execute']
prs_callout_of_name 136 67 49.26% ['jq_fuzz_execute']
prs_callout_args 138 72 52.17% ['jq_fuzz_execute']
add_ctype_to_cc 91 15 16.48% ['jq_fuzz_execute']
onigenc_egcb_is_break_position 53 22 41.50% ['jq_fuzz_execute']

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/jq/src/exec_stack.h ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/lexer.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/st.c [] []
/src/jq/./tests/jq_fuzz_fixed.cpp ['jq_fuzz_fixed'] []
/src/jq/src/jv.h ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/ascii.c [] []
/src/jq/src/jv_unicode.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/regenc.c [] []
/src/jq/src/jv_alloc.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/execute.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/libm.h [] []
/src/jq/vendor/oniguruma/src/unicode_unfold_key.c [] []
/src/jq/src/parser.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/jv_aux.c ['jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/unicode.c [] []
/src/jq/tests/jq_fuzz_load_file.c ['jq_fuzz_load_file'] ['jq_fuzz_load_file']
/src/jq/tests/jq_fuzz_parse.c ['jq_fuzz_parse'] ['jq_fuzz_parse']
/src/jq/./src/jv.h ['jq_fuzz_parse_extended', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/parser.y ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/jv_parse.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/jv.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/unicode_fold2_key.c [] []
/src/jq/vendor/oniguruma/src/regexec.c [] []
/src/jq/vendor/oniguruma/src/unicode_fold3_key.c [] []
/src/jq/tests/jq_fuzz_parse_extended.c ['jq_fuzz_parse_extended'] ['jq_fuzz_parse_extended']
/src/jq/src/compile.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/unicode_fold1_key.c [] []
/src/jq/./tests/jq_fuzz_execute.cpp ['jq_fuzz_execute'] []
/src/jq/src/locfile.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/builtin.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/decNumber/decNumber.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/bytecode.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/jv_dtoa_tsd.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/utf8.c [] []
/src/jq/vendor/oniguruma/src/regcomp.c [] []
/src/jq/src/jv_dtoa.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/regerror.c [] []
/src/jq/vendor/oniguruma/src/regsyntax.c [] []
/src/jq/tests/jq_fuzz_compile.c ['jq_fuzz_compile'] ['jq_fuzz_compile']
/src/jq/tests/jq_fuzz_parse_stream.c ['jq_fuzz_parse_stream'] ['jq_fuzz_parse_stream']
/src/jq/src/linker.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/util.c ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/jv_print.c ['jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/src/lexer.l ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/./unicode_property_data.c [] []
/src/jq/src/jv_file.c ['jq_fuzz_load_file', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_load_file']
/src/jq/vendor/decNumber/decContext.c ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute'] ['jq_fuzz_parse_stream', 'jq_fuzz_load_file', 'jq_fuzz_parse', 'jq_fuzz_parse_extended', 'jq_fuzz_compile', 'jq_fuzz_fixed', 'jq_fuzz_execute']
/src/jq/vendor/oniguruma/src/regparse.c [] []

Directories in report

Directory
/src/jq/./src/
/src/jq/vendor/decNumber/
/src/jq/./tests/
/src/jq/vendor/oniguruma/src/./
/src/jq/tests/
/src/jq/src/
/src/jq/vendor/oniguruma/src/