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

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
416 416 3 :

['die', 'error', 'const_error.52762']

416 416 memory_limit_check call site: 00074 /src/git/wrapper.c:26
414 414 2 :

['_.19378', 'die']

414 414 git_attr_internal call site: 00309 /src/git/attr.c:248
414 414 2 :

['die', '_.47116']

414 414 strbuf_vaddf call site: 00122 /src/git/strbuf.c:415
414 414 1 :

['BUG_fl']

414 414 strbuf_vaddf call site: 00128 /src/git/strbuf.c:420
414 414 1 :

['BUG_fl']

414 414 strbuf_setlen call site: 00062 /src/git/./strbuf.h:166
2 2 1 :

['abort']

2 2 vreportf call site: 00020 /src/git/usage.c:16
0 485 1 :

['git_attr_internal']

0 915 parse_attr_line call site: 00315 /src/git/attr.c:414
0 0 None 416 833 xrealloc call site: 00070 /src/git/wrapper.c:131
0 0 None 416 416 do_xmalloc call site: 00073 /src/git/wrapper.c:53
0 0 None 414 1304 git_attr_internal call site: 00280 /src/git/attr.c:236
0 0 None 414 414 xcalloc call site: 00296 /src/git/wrapper.c:152
0 0 None 12 12 xwrite call site: 00028 /src/git/wrapper.c:250

Fuzzer calltree

0 LLVMFuzzerTestOneInput [function] [call site] 00000
1 parse_attr_line [function] [call site] 00001
2 strspn [call site] 00002
2 strlen [call site] 00003
2 unquote_c_style [function] [call site] 00007
3 strcspn [call site] 00008
3 strbuf_add [function] [call site] 00009
4 strbuf_grow [function] [call site] 00010
5 die [function] [call site] 00011
6 fputs [call site] 00012
6 common_exit [function] [call site] 00013
7 check_bug_if_BUG [function] [call site] 00014
8 BUG_fl [function] [call site] 00015
9 BUG_vfl [function] [call site] 00016
10 BUG_vfl_common [function] [call site] 00017
11 snprintf [call site] 00018
11 vreportf [function] [call site] 00019
12 strlen [call site] 00020
12 fprintf [call site] 00021
12 abort [call site] 00022
12 vsnprintf [call site] 00023
12 fprintf [call site] 00025
12 fflush [call site] 00026
12 write_in_full [function] [call site] 00027
13 xwrite [function] [call site] 00028
14 write [call site] 00029
14 __errno_location [call site] 00030
14 __errno_location [call site] 00031
14 handle_nonblock [function] [call site] 00032
15 poll [call site] 00033
13 __errno_location [call site] 00034
10 abort [call site] 00035
10 trace2_cmd_error_va_fl [function] [call site] 00036
11 tr2_dst_trace_want [function] [call site] 00037
12 tr2_dst_get_trace_fd [function] [call site] 00038
13 tr2_sysenv_get [function] [call site] 00039
14 getenv [call site] 00041
14 xstrdup [function] [call site] 00042
15 strdup [call site] 00043
13 strcmp [call site] 00046
13 strcasecmp [call site] 00047
13 strcmp [call site] 00048
13 strlen [call site] 00049
13 atoi [call site] 00050
13 is_absolute_path [function] [call site] 00051
14 git_is_dir_sep [function] [call site] 00052
13 is_directory [function] [call site] 00053
14 stat64 [call site] 00054
13 tr2_dst_try_auto_path [function] [call site] 00055
14 tr2_sid_get [function] [call site] 00056
15 tr2_sid_compute [function] [call site] 00057
16 getenv [call site] 00058
16 strbuf_addstr [function] [call site] 00059
17 strlen [call site] 00060
17 strbuf_add [function] [call site] 00061
18 strbuf_setlen [function] [call site] 00062
19 __assert_fail [call site] 00064
16 strbuf_addch [function] [call site] 00065
17 strbuf_avail [function] [call site] 00066
17 strbuf_grow [function] [call site] 00067
18 xrealloc [function] [call site] 00070
19 xmalloc [function] [call site] 00071
20 do_xmalloc [function] [call site] 00072
21 memory_limit_check [function] [call site] 00073
22 git_env_ulong [function] [call site] 00074
23 getenv [call site] 00075
23 git_parse_ulong [function] [call site] 00076
24 git_parse_unsigned [function] [call site] 00077
25 strchr [call site] 00078
25 __errno_location [call site] 00079
25 __errno_location [call site] 00080
25 strtoumax [call site] 00081
25 __errno_location [call site] 00082
25 __errno_location [call site] 00083
25 get_unit_factor [function] [call site] 00084
26 strcasecmp [call site] 00085
26 strcasecmp [call site] 00086
25 __errno_location [call site] 00087
25 __errno_location [call site] 00088
25 __errno_location [call site] 00089
22 const_error [function] [call site] 00093
21 const_error [function] [call site] 00097
19 memory_limit_check [function] [call site] 00098
19 realloc [call site] 00099
16 tr2_sid_append_my_sid_component [function] [call site] 00101
17 getpid [call site] 00102
17 tr2_tbuf_utc_datetime [function] [call site] 00103
18 gmtime_r [call site] 00104
17 strbuf_addstr [function] [call site] 00110
17 strbuf_addch [function] [call site] 00111
17 xgethostname [function] [call site] 00112
18 gethostname [call site] 00113
17 strbuf_add [function] [call site] 00114
17 strlen [call site] 00115
17 hash_to_hex_algop_r [function] [call site] 00116
17 strbuf_addch [function] [call site] 00117
17 strbuf_add [function] [call site] 00118
17 strbuf_addf [function] [call site] 00119
18 strbuf_vaddf [function] [call site] 00120
19 strbuf_avail [function] [call site] 00121
19 vsnprintf [call site] 00122
19 strbuf_avail [function] [call site] 00125
19 strbuf_grow [function] [call site] 00126
19 vsnprintf [call site] 00127
19 strbuf_avail [function] [call site] 00128
19 strbuf_setlen [function] [call site] 00130
16 setenv [call site] 00131
14 strrchr [call site] 00132
14 strbuf_addstr [function] [call site] 00133
14 git_is_dir_sep [function] [call site] 00134
14 strbuf_addch [function] [call site] 00135
14 strbuf_addstr [function] [call site] 00136
14 tr2_dst_too_many_files [function] [call site] 00137
15 tr2_sysenv_get [function] [call site] 00138
15 strbuf_addstr [function] [call site] 00139
15 git_is_dir_sep [function] [call site] 00140
15 strbuf_addbuf [function] [call site] 00141
16 strbuf_grow [function] [call site] 00142
16 strbuf_setlen [function] [call site] 00143
15 strbuf_addstr [function] [call site] 00144
15 opendir [call site] 00145
15 readdir64 [call site] 00146
15 closedir [call site] 00147
15 open64 [call site] 00148
15 strbuf_release [function] [call site] 00149
16 strbuf_init [function] [call site] 00150
17 strbuf_grow [function] [call site] 00151
15 strbuf_release [function] [call site] 00152
14 strbuf_setlen [function] [call site] 00153
14 strbuf_addf [function] [call site] 00154
14 open64 [call site] 00155
14 strbuf_release [function] [call site] 00156
14 tr2_dst_want_warning [function] [call site] 00157
15 tr2_sysenv_get [function] [call site] 00158
14 tr2_sysenv_display_name [function] [call site] 00159
14 tr2_dst_want_warning [function] [call site] 00162
14 tr2_sysenv_display_name [function] [call site] 00163
14 __errno_location [call site] 00164
14 tr2_dst_trace_disable [function] [call site] 00166
15 close [call site] 00167
14 strbuf_release [function] [call site] 00168
14 strbuf_release [function] [call site] 00169
13 tr2_dst_try_path [function] [call site] 00170
14 open64 [call site] 00171
14 tr2_dst_want_warning [function] [call site] 00172
14 tr2_sysenv_display_name [function] [call site] 00173
14 __errno_location [call site] 00174
14 tr2_dst_trace_disable [function] [call site] 00176
13 starts_with [function] [call site] 00177
13 tr2_dst_try_unix_domain_socket [function] [call site] 00178
14 skip_prefix [function] [call site] 00179
14 skip_prefix [function] [call site] 00180
14 skip_prefix [function] [call site] 00181
14 tr2_dst_want_warning [function] [call site] 00182
14 tr2_sysenv_display_name [function] [call site] 00183
14 tr2_dst_trace_disable [function] [call site] 00185
14 is_absolute_path [function] [call site] 00186
14 strlen [call site] 00187
14 tr2_dst_want_warning [function] [call site] 00188
14 tr2_sysenv_display_name [function] [call site] 00189
14 tr2_dst_trace_disable [function] [call site] 00191
14 tr2_dst_try_uds_connect [function] [call site] 00192
15 socket [call site] 00193
15 gitstrlcpy [function] [call site] 00194
16 strlen [call site] 00195
15 connect [call site] 00196
15 close [call site] 00197
15 __errno_location [call site] 00198
14 __errno_location [call site] 00199
14 tr2_dst_try_uds_connect [function] [call site] 00200
14 tr2_dst_want_warning [function] [call site] 00201
14 tr2_sysenv_display_name [function] [call site] 00202
14 __errno_location [call site] 00203
14 tr2_dst_trace_disable [function] [call site] 00205
13 tr2_dst_malformed_warning [function] [call site] 00206
14 tr2_sysenv_display_name [function] [call site] 00207
13 tr2_dst_trace_disable [function] [call site] 00209
10 common_exit [function] [call site] 00210
11 trace2_cmd_exit_fl [function] [call site] 00211
12 trace2_collect_process_info [function] [call site] 00212
13 trace2_is_enabled [function] [call site] 00213
13 getppid [call site] 00214
13 push_ancestry_name [function] [call site] 00215
14 stat_parent_pid [function] [call site] 00216
15 strbuf_addf [function] [call site] 00217
15 git_fopen [function] [call site] 00218
16 fopen64 [call site] 00219
16 fileno [call site] 00220
16 fclose [call site] 00221
16 fclose [call site] 00222
16 __errno_location [call site] 00223
15 strbuf_fread [function] [call site] 00224
16 strbuf_grow [function] [call site] 00225
16 fread [call site] 00226
16 strbuf_setlen [function] [call site] 00227
16 strbuf_release [function] [call site] 00228
15 parse_proc_stat [function] [call site] 00229
16 strchr [call site] 00230
16 strtol [call site] 00231
16 strbuf_add [function] [call site] 00232
15 fclose [call site] 00233
15 strbuf_release [function] [call site] 00234
15 strbuf_release [function] [call site] 00235
14 strvec_push [function] [call site] 00236
15 strvec_push_nodup [function] [call site] 00238
14 push_ancestry_name [function] [call site] 00241
15 strbuf_release [function] [call site] 00242
13 trace2_cmd_ancestry_fl [function] [call site] 00243
14 tr2_dst_trace_want [function] [call site] 00244
13 strvec_clear [function] [call site] 00245
14 strvec_init [function] [call site] 00246
12 getnanotime [function] [call site] 00247
13 highres_nanos [function] [call site] 00248
14 clock_gettime [call site] 00249
13 gettimeofday_nanos [function] [call site] 00250
14 gettimeofday [call site] 00251
13 gettimeofday_nanos [function] [call site] 00252
13 highres_nanos [function] [call site] 00253
12 tr2tls_absolute_elapsed [function] [call site] 00254
12 tr2_dst_trace_want [function] [call site] 00255
10 exit [call site] 00256
3 strbuf_addch [function] [call site] 00257
3 strbuf_setlen [function] [call site] 00258
2 strcspn [call site] 00259
2 starts_with [function] [call site] 00260
2 fprintf_ln [function] [call site] 00262
3 vfprintf [call site] 00263
3 putc [call site] 00264
2 strspn [call site] 00265
2 strcspn [call site] 00266
2 attr_name_valid [function] [call site] 00267
2 report_invalid_attr [function] [call site] 00268
3 strbuf_addf [function] [call site] 00270
3 fprintf [call site] 00271
3 strbuf_release [function] [call site] 00272
2 strspn [call site] 00273
2 parse_attr [function] [call site] 00274
3 strchr [call site] 00275
3 attr_name_valid [function] [call site] 00276
3 report_invalid_attr [function] [call site] 00277
3 git_attr_internal [function] [call site] 00279
4 attr_name_valid [function] [call site] 00280
4 hashmap_lock [function] [call site] 00281
5 pthread_mutex_lock [call site] 00282
4 attr_hashmap_get [function] [call site] 00283
5 hashmap_entry_init [function] [call site] 00285
5 hashmap_get [function] [call site] 00286
6 find_entry_ptr [function] [call site] 00287
5 container_of_or_null_offset [function] [call site] 00290
4 xcalloc [function] [call site] 00293
5 memory_limit_check [function] [call site] 00295
5 calloc [call site] 00296
5 calloc [call site] 00297
4 hashmap_get_size [function] [call site] 00299
4 attr_hashmap_add [function] [call site] 00300
4 hashmap_get_size [function] [call site] 00309
4 hashmap_unlock [function] [call site] 00312
3 strspn [call site] 00313
2 git_attr_internal [function] [call site] 00316
2 parse_path_pattern [function] [call site] 00317
3 strlen [call site] 00318
3 simple_length [function] [call site] 00319
3 no_wildcard [function] [call site] 00320
4 simple_length [function] [call site] 00321
2 parse_attr [function] [call site] 00324
2 strbuf_release [function] [call site] 00325
2 strbuf_release [function] [call site] 00326