Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] xen-4.20.2/tools/xentrace/xenalyze.c:326:14: warning[-Wanalyzer-null-argument]: use of NULL ‘fopen(fn, "rb")’ where non-null expected xen-4.20.2/tools/xentrace/xenalyze.c:10923:5: enter_function: entry to ‘main’ xen-4.20.2/tools/xentrace/xenalyze.c:10929:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xentrace/xenalyze.c:10932:18: branch_false: ...to here xen-4.20.2/tools/xentrace/xenalyze.c:10934:9: call_function: inlined call to ‘error’ from ‘main’ xen-4.20.2/tools/xentrace/xenalyze.c:10941:18: branch_false: ...to here xen-4.20.2/tools/xentrace/xenalyze.c:10944:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xentrace/xenalyze.c:10945:9: branch_true: ...to here xen-4.20.2/tools/xentrace/xenalyze.c:10945:9: call_function: calling ‘parse_symbol_file’ from ‘main’ # 324| /* FIXME -- use regexp. This won't work for symbols with spaces (yes they exist) */ # 325| (*p)->symbols[(*p)->count].addr = 0xDEADBEEF; # 326|-> if ( fscanf(symbol_file, "%llx %" STR(SYMBOL_NAME_SIZE) "s", # 327| &(*p)->symbols[(*p)->count].addr, # 328| (*p)->symbols[(*p)->count].name) == 0 ) Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] xen-4.20.2/tools/xl/xl_parse.c:828:34: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xen-4.20.2/tools/xl/xl_parse.c:814:5: enter_function: entry to ‘parse_vdispl_config’ xen-4.20.2/tools/xl/xl_parse.c:821:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:823:16: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:823:15: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:825:16: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:825:15: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:826:9: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:826:9: call_function: calling ‘split_string_into_string_list’ from ‘parse_vdispl_config’ xen-4.20.2/tools/xl/xl_parse.c:826:9: return_function: returning to ‘parse_vdispl_config’ from ‘split_string_into_string_list’ xen-4.20.2/tools/xl/xl_parse.c:828:34: throw: if ‘libxl_string_list_length’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:828:34: danger: ‘<unknown>’ leaks here; was allocated at [(16)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/15) # 826| split_string_into_string_list(oparg, ";", &connectors); # 827| # 828|-> vdispl->num_connectors = libxl_string_list_length(&connectors); # 829| vdispl->connectors = xcalloc(vdispl->num_connectors, # 830| sizeof(*vdispl->connectors)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def3] xen-4.20.2/tools/xl/xl_parse.c:828:34: warning[-Wanalyzer-malloc-leak]: leak of ‘connectors’ xen-4.20.2/tools/xl/xl_parse.c:814:5: enter_function: entry to ‘parse_vdispl_config’ xen-4.20.2/tools/xl/xl_parse.c:821:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:823:16: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:823:15: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:825:16: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:825:15: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:826:9: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:826:9: call_function: calling ‘split_string_into_string_list’ from ‘parse_vdispl_config’ xen-4.20.2/tools/xl/xl_parse.c:826:9: return_function: returning to ‘parse_vdispl_config’ from ‘split_string_into_string_list’ xen-4.20.2/tools/xl/xl_parse.c:828:34: throw: if ‘libxl_string_list_length’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:828:34: danger: ‘connectors’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11) # 826| split_string_into_string_list(oparg, ";", &connectors); # 827| # 828|-> vdispl->num_connectors = libxl_string_list_length(&connectors); # 829| vdispl->connectors = xcalloc(vdispl->num_connectors, # 830| sizeof(*vdispl->connectors)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def4] xen-4.20.2/tools/xl/xl_parse.c:871:36: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xen-4.20.2/tools/xl/xl_parse.c:861:12: enter_function: entry to ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:866:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:867:27: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:869:9: call_function: calling ‘split_string_into_string_list’ from ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:869:9: return_function: returning to ‘parse_vsnd_params’ from ‘split_string_into_string_list’ xen-4.20.2/tools/xl/xl_parse.c:871:36: throw: if ‘libxl_string_list_length’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:871:36: danger: ‘<unknown>’ leaks here; was allocated at [(12)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/11) # 869| split_string_into_string_list(oparg, ";", &rates); # 870| # 871|-> params->num_sample_rates = libxl_string_list_length(&rates); # 872| params->sample_rates = xcalloc(params->num_sample_rates, # 873| sizeof(*params->sample_rates)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] xen-4.20.2/tools/xl/xl_parse.c:871:36: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1017:5: enter_function: entry to ‘parse_vsnd_item’ xen-4.20.2/tools/xl/xl_parse.c:1019:17: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1025:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_true: following ‘true’ branch (when ‘key’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1029:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1030:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1043:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1032:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1033:23: call_function: calling ‘parse_vsnd_card_param’ from ‘parse_vsnd_item’ # 869| split_string_into_string_list(oparg, ";", &rates); # 870| # 871|-> params->num_sample_rates = libxl_string_list_length(&rates); # 872| params->sample_rates = xcalloc(params->num_sample_rates, # 873| sizeof(*params->sample_rates)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] xen-4.20.2/tools/xl/xl_parse.c:871:36: warning[-Wanalyzer-malloc-leak]: leak of ‘rates’ xen-4.20.2/tools/xl/xl_parse.c:861:12: enter_function: entry to ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:866:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:867:27: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:869:9: call_function: calling ‘split_string_into_string_list’ from ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:869:9: return_function: returning to ‘parse_vsnd_params’ from ‘split_string_into_string_list’ xen-4.20.2/tools/xl/xl_parse.c:871:36: throw: if ‘libxl_string_list_length’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:871:36: danger: ‘rates’ leaks here; was allocated at [(8)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/7) # 869| split_string_into_string_list(oparg, ";", &rates); # 870| # 871|-> params->num_sample_rates = libxl_string_list_length(&rates); # 872| params->sample_rates = xcalloc(params->num_sample_rates, # 873| sizeof(*params->sample_rates)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] xen-4.20.2/tools/xl/xl_parse.c:885:38: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ xen-4.20.2/tools/xl/xl_parse.c:861:12: enter_function: entry to ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:866:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:880:16: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:880:15: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:881:27: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:883:9: call_function: calling ‘split_string_into_string_list’ from ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:883:9: return_function: returning to ‘parse_vsnd_params’ from ‘split_string_into_string_list’ xen-4.20.2/tools/xl/xl_parse.c:885:38: throw: if ‘libxl_string_list_length’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:885:38: danger: ‘<unknown>’ leaks here; was allocated at [(14)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/13) # 883| split_string_into_string_list(oparg, ";", &formats); # 884| # 885|-> params->num_sample_formats = libxl_string_list_length(&formats); # 886| params->sample_formats = xcalloc(params->num_sample_formats, # 887| sizeof(*params->sample_formats)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] xen-4.20.2/tools/xl/xl_parse.c:885:38: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1017:5: enter_function: entry to ‘parse_vsnd_item’ xen-4.20.2/tools/xl/xl_parse.c:1019:17: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1025:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_true: following ‘true’ branch (when ‘key’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1029:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1030:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1043:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: following ‘false’ branch (when ‘key’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1032:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1033:23: call_function: calling ‘parse_vsnd_card_param’ from ‘parse_vsnd_item’ # 883| split_string_into_string_list(oparg, ";", &formats); # 884| # 885|-> params->num_sample_formats = libxl_string_list_length(&formats); # 886| params->sample_formats = xcalloc(params->num_sample_formats, # 887| sizeof(*params->sample_formats)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] xen-4.20.2/tools/xl/xl_parse.c:885:38: warning[-Wanalyzer-malloc-leak]: leak of ‘formats’ xen-4.20.2/tools/xl/xl_parse.c:861:12: enter_function: entry to ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:866:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:880:16: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:880:15: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:881:27: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:883:9: call_function: calling ‘split_string_into_string_list’ from ‘parse_vsnd_params’ xen-4.20.2/tools/xl/xl_parse.c:883:9: return_function: returning to ‘parse_vsnd_params’ from ‘split_string_into_string_list’ xen-4.20.2/tools/xl/xl_parse.c:885:38: throw: if ‘libxl_string_list_length’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:885:38: danger: ‘formats’ leaks here; was allocated at [(10)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/9) # 883| split_string_into_string_list(oparg, ";", &formats); # 884| # 885|-> params->num_sample_formats = libxl_string_list_length(&formats); # 886| params->sample_formats = xcalloc(params->num_sample_formats, # 887| sizeof(*params->sample_formats)); Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] xen-4.20.2/tools/xl/xl_parse.c:997:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1017:5: enter_function: entry to ‘parse_vsnd_item’ xen-4.20.2/tools/xl/xl_parse.c:1019:17: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1025:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_true: following ‘true’ branch (when ‘key’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1029:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1029:19: call_function: calling ‘parse_vsnd_create_item’ from ‘parse_vsnd_item’ # 995| # 996| } else if (strcasecmp(key, "pcm") == 0) { # 997|-> ARRAY_EXTEND_INIT_NODEVID(vsnd->pcms, vsnd->num_vsnd_pcms, # 998| libxl_vsnd_pcm_init); # 999| } else if (strcasecmp(key, "stream") == 0) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] xen-4.20.2/tools/xl/xl_parse.c:1001:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1017:5: enter_function: entry to ‘parse_vsnd_item’ xen-4.20.2/tools/xl/xl_parse.c:1019:17: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1025:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_true: following ‘true’ branch (when ‘key’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1029:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1029:19: call_function: calling ‘parse_vsnd_create_item’ from ‘parse_vsnd_item’ # 999| } else if (strcasecmp(key, "stream") == 0) { # 1000| if (vsnd->num_vsnd_pcms == 0) { # 1001|-> ARRAY_EXTEND_INIT_NODEVID(vsnd->pcms, vsnd->num_vsnd_pcms, # 1002| libxl_vsnd_pcm_init); # 1003| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] xen-4.20.2/tools/xl/xl_parse.c:1007:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1017:5: enter_function: entry to ‘parse_vsnd_item’ xen-4.20.2/tools/xl/xl_parse.c:1019:17: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1024:12: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1025:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1027:12: branch_true: following ‘true’ branch (when ‘key’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1029:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1029:19: call_function: calling ‘parse_vsnd_create_item’ from ‘parse_vsnd_item’ # 1005| libxl_vsnd_pcm *pcm = &vsnd->pcms[vsnd->num_vsnd_pcms - 1]; # 1006| # 1007|-> ARRAY_EXTEND_INIT_NODEVID(pcm->streams, pcm->num_vsnd_streams, # 1008| libxl_vsnd_stream_init); # 1009| } else { Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] xen-4.20.2/tools/xl/xl_parse.c:1112:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1148:13: enter_function: entry to ‘parse_vkb_list’ xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1162:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1166:19: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1169:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1169:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1171:24: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1173:22: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1173:22: call_function: calling ‘parse_vkb_config’ from ‘parse_vkb_list’ # 1110| } else if (MATCH_OPTION("backend-type", token, oparg)) { # 1111| libxl_vkb_backend backend_type; # 1112|-> if (libxl_vkb_backend_from_string(oparg, &backend_type)) { # 1113| fprintf(stderr, "Unknown backend_type \"%s\" in vkb spec\n", # 1114| oparg); Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] xen-4.20.2/tools/xl/xl_parse.c:1158:24: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1162:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1166:19: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1169:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1179:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1179:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1184:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:24: throw: if ‘xlu_cfg_get_listitem’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:1158:24: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/16/codeFlows/0/threadFlows/0/locations/4) # 1156| if (!xlu_cfg_get_list (config, "vkb", &vkbs, 0, 0)) { # 1157| int entry = 0; # 1158|-> while ((item = xlu_cfg_get_listitem(vkbs, entry)) != NULL) { # 1159| libxl_device_vkb *vkb; # 1160| char *p; Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] xen-4.20.2/tools/xl/xl_parse.c:1162:19: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1162:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1166:19: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1169:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1179:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1179:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1184:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1162:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1162:19: throw: if ‘xrealloc’ throws an exception... xen-4.20.2/tools/xl/xl_parse.c:1162:19: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/17/codeFlows/0/threadFlows/0/locations/4) # 1160| char *p; # 1161| # 1162|-> vkb = ARRAY_EXTEND_INIT(d_config->vkbs, # 1163| d_config->num_vkbs, # 1164| libxl_device_vkb_init); Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] xen-4.20.2/tools/xl/xl_parse.c:1197:13: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1156:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1162:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1166:19: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1169:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1179:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1179:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1184:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1158:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1162:19: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1169:20: branch_false: following ‘false’ branch (when ‘p’ is NULL)... xen-4.20.2/tools/xl/xl_parse.c:1179:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1179:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1184:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1184:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1197:13: danger: ‘buf’ leaks here; was allocated at [(5)](sarif:/runs/0/results/19/codeFlows/0/threadFlows/0/locations/4) # 1195| } # 1196| # 1197|-> entry++; # 1198| } # 1199| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] xen-4.20.2/tools/xl/xl_parse.c:1218:14: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1230:13: enter_function: entry to ‘parse_virtio_list’ xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1240:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1244:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1247:19: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1255:20: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1256:26: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1256:24: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1257:36: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1267:22: call_function: calling ‘parse_virtio_config’ from ‘parse_virtio_list’ # 1216| virtio->type = strdup(oparg); # 1217| } else if (MATCH_OPTION("transport", token, oparg)) { # 1218|-> rc = libxl_virtio_transport_from_string(oparg, &virtio->transport); # 1219| if (rc) return rc; # 1220| } else if (MATCH_OPTION("grant_usage", token, oparg)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] xen-4.20.2/tools/xl/xl_parse.c:1218:14: warning[-Wanalyzer-malloc-leak]: leak of ‘str’ xen-4.20.2/tools/xl/xl_parse.c:1230:13: enter_function: entry to ‘parse_virtio_list’ xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1240:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1244:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1255:20: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1256:26: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1256:24: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1257:36: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1258:31: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1267:22: call_function: calling ‘parse_virtio_config’ from ‘parse_virtio_list’ # 1216| virtio->type = strdup(oparg); # 1217| } else if (MATCH_OPTION("transport", token, oparg)) { # 1218|-> rc = libxl_virtio_transport_from_string(oparg, &virtio->transport); # 1219| if (rc) return rc; # 1220| } else if (MATCH_OPTION("grant_usage", token, oparg)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] xen-4.20.2/tools/xl/xl_parse.c:1221:9: warning[-Wanalyzer-malloc-leak]: leak of ‘buf’ xen-4.20.2/tools/xl/xl_parse.c:1230:13: enter_function: entry to ‘parse_virtio_list’ xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1240:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1244:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1247:19: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1255:20: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1256:26: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1256:24: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1257:36: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1267:22: call_function: calling ‘parse_virtio_config’ from ‘parse_virtio_list’ # 1219| if (rc) return rc; # 1220| } else if (MATCH_OPTION("grant_usage", token, oparg)) { # 1221|-> libxl_defbool_set(&virtio->grant_usage, strtoul(oparg, NULL, 0)); # 1222| } else { # 1223| fprintf(stderr, "Unknown string \"%s\" in virtio spec\n", token); Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] xen-4.20.2/tools/xl/xl_parse.c:1221:9: warning[-Wanalyzer-malloc-leak]: leak of ‘str’ xen-4.20.2/tools/xl/xl_parse.c:1230:13: enter_function: entry to ‘parse_virtio_list’ xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1240:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1244:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1255:20: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1256:26: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1256:24: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1257:36: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1258:31: acquire_memory: allocated here xen-4.20.2/tools/xl/xl_parse.c:1267:22: call_function: calling ‘parse_virtio_config’ from ‘parse_virtio_list’ # 1219| if (rc) return rc; # 1220| } else if (MATCH_OPTION("grant_usage", token, oparg)) { # 1221|-> libxl_defbool_set(&virtio->grant_usage, strtoul(oparg, NULL, 0)); # 1222| } else { # 1223| fprintf(stderr, "Unknown string \"%s\" in virtio spec\n", token); Error: GCC_ANALYZER_WARNING (CWE-688): [#def21] xen-4.20.2/tools/xl/xl_parse.c:1258:50: warning[-Wanalyzer-null-argument]: use of NULL ‘p2’ where non-null expected xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1240:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1244:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1252:24: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1255:21: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1255:20: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1256:26: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1256:24: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1257:36: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1258:50: danger: argument 1 (‘p2’) NULL where non-null expected # 1256| if (!strncmp(oparg, "virtio", strlen("virtio"))) { # 1257| char *p2 = strtok(NULL, ","); # 1258|-> str = malloc(strlen(p) + strlen(p2) + 2); # 1259| # 1260| strcpy(str, p); Error: GCC_ANALYZER_WARNING (CWE-688): [#def22] xen-4.20.2/tools/xl/xl_parse.c:1260:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘str’ where non-null expected xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1238:8: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1240:16: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1244:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)... xen-4.20.2/tools/xl/xl_parse.c:1250:20: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1252:24: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1255:21: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1255:20: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1256:26: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1256:24: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1257:36: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1258:31: acquire_memory: this call could return NULL xen-4.20.2/tools/xl/xl_parse.c:1260:25: danger: argument 1 (‘str’) from [(15)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/14) could be NULL where non-null expected # 1258| str = malloc(strlen(p) + strlen(p2) + 2); # 1259| # 1260|-> strcpy(str, p); # 1261| strcat(str, ","); # 1262| strcat(str, p2); Error: GCC_ANALYZER_WARNING (CWE-476): [#def23] xen-4.20.2/tools/xl/xl_parse.c:1482:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ xen-4.20.2/tools/xl/xl_parse.c:1314:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1320:5: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1323:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1328:8: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1329:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1334:10: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1393:8: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1398:10: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1451:8: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1454:9: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1455:21: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1456:22: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1459:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1465:17: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1465:16: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1471:24: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1471:23: branch_false: following ‘false’ branch... xen-4.20.2/tools/xl/xl_parse.c:1477:13: branch_false: ...to here xen-4.20.2/tools/xl/xl_parse.c:1481:29: branch_true: following ‘true’ branch... xen-4.20.2/tools/xl/xl_parse.c:1482:17: branch_true: ...to here xen-4.20.2/tools/xl/xl_parse.c:1482:17: danger: dereference of NULL ‘*(libxl_domain_build_info *)((char *)d_config + 104).llc_colors + (long unsigned int)cur_index * 4’ # 1480| # 1481| for (k = start; k <= end; k++) # 1482|-> b_info->llc_colors[cur_index++] = k; # 1483| } # 1484| }
| analyzer-version-clippy | 1.92.0 |
| analyzer-version-cppcheck | 2.19.1 |
| analyzer-version-gcc | 16.0.0 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.92.0 |
| diffbase-analyzer-version-cppcheck | 2.19.1 |
| diffbase-analyzer-version-gcc | 16.0.0 |
| diffbase-analyzer-version-gcc-analyzer | 16.0.0 |
| diffbase-analyzer-version-shellcheck | 0.11.0 |
| diffbase-analyzer-version-unicontrol | 0.0.2 |
| diffbase-enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| diffbase-exit-code | 0 |
| diffbase-host | ip-172-16-1-169.us-west-2.compute.internal |
| diffbase-known-false-positives | /usr/share/csmock/known-false-positives.js |
| diffbase-known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| diffbase-mock-config | fedora-rawhide-x86_64 |
| diffbase-project-name | xen-4.20.1-6.fc43 |
| diffbase-store-results-to | /tmp/tmpftvjpvau/xen-4.20.1-6.fc43.tar.xz |
| diffbase-time-created | 2026-01-08 22:10:01 |
| diffbase-time-finished | 2026-01-08 22:21:58 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpftvjpvau/xen-4.20.1-6.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpftvjpvau/xen-4.20.1-6.fc43.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-169.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-x86_64 |
| project-name | xen-4.20.2-2.fc44 |
| store-results-to | /tmp/tmpsunzp3ro/xen-4.20.2-2.fc44.tar.xz |
| time-created | 2026-01-08 22:22:57 |
| time-finished | 2026-01-08 22:34:20 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpsunzp3ro/xen-4.20.2-2.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsunzp3ro/xen-4.20.2-2.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |