Error: GCC_ANALYZER_WARNING (CWE-775): [#def1] libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:275:14: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(keymap_path, "r")’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:95:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:159:12: branch_false: following ‘false’ branch (when ‘c != -1’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:162:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:239:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:244:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:249:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: call_function: calling ‘load_keymap’ from ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: return_function: returning to ‘main’ from ‘load_keymap’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:256:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:264:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:267:8: branch_true: following ‘true’ branch (when ‘keymap_path’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:269:23: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:269:23: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:270:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:275:14: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:275:14: danger: ‘fopen(keymap_path, "r")’ leaks here; was opened at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18) # 273| goto keymap_error; # 274| } # 275|-> if (!map_file(keymap_file, &keymap_str, &keymap_str_length)) { # 276| fclose(keymap_file); # 277| ret = EXIT_FAILURE; Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:275:14: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(keymap_path, "r")’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:95:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:159:12: branch_false: following ‘false’ branch (when ‘c != -1’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:162:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:239:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:244:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:249:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: call_function: calling ‘load_keymap’ from ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: return_function: returning to ‘main’ from ‘load_keymap’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:256:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:264:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:267:8: branch_true: following ‘true’ branch (when ‘keymap_path’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:269:23: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:269:23: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:270:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:275:14: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:275:14: danger: ‘fopen(keymap_path, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/18) # 273| goto keymap_error; # 274| } # 275|-> if (!map_file(keymap_file, &keymap_str, &keymap_str_length)) { # 276| fclose(keymap_file); # 277| ret = EXIT_FAILURE; Error: GCC_ANALYZER_WARNING (CWE-775): [#def3] libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:325:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stderr_old’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:95:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:209:16: branch_false: following ‘false’ branch (when ‘max_iterations != 0’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:214:48: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:215:20: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:155:15: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:239:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:244:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:249:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: call_function: calling ‘load_keymap’ from ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: return_function: returning to ‘main’ from ‘load_keymap’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:256:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:301:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:304:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:305:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:304:9: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:309:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:311:22: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:313:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:314:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:313:9: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:318:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:320:8: branch_true: following ‘true’ branch (when ‘explicit_iterations != 0’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:322:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:323:34: branch_true: following ‘true’ branch (when ‘max_iterations > i’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:325:23: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:325:23: danger: ‘stderr_old’ leaks here; was opened at [(23)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/22) # 323| for (unsigned int i = 0; i < max_iterations; i++) { # 324| #ifdef KEYMAP_DUMP # 325|-> char *s = xkb_keymap_get_as_string2(keymap, keymap_output_format, # 326| serialize_flags); # 327| assert(s); Error: GCC_ANALYZER_WARNING (CWE-775): [#def4] libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:325:23: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdout_old’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:95:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:209:16: branch_false: following ‘false’ branch (when ‘max_iterations != 0’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:214:48: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:215:20: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:155:15: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:239:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:240:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:244:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:249:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: call_function: calling ‘load_keymap’ from ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:252:33: return_function: returning to ‘main’ from ‘load_keymap’ libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:256:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:301:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:302:22: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:304:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:305:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:304:9: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:309:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:313:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:314:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:313:9: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:318:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:320:8: branch_true: following ‘true’ branch (when ‘explicit_iterations != 0’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:322:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:323:34: branch_true: following ‘true’ branch (when ‘max_iterations > i’)... libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:325:23: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compile-keymap.c:325:23: danger: ‘stdout_old’ leaks here; was opened at [(19)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/18) # 323| for (unsigned int i = 0; i < max_iterations; i++) { # 324| #ifdef KEYMAP_DUMP # 325|-> char *s = xkb_keymap_get_as_string2(keymap, keymap_output_format, # 326| serialize_flags); # 327| assert(s); Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:195:5: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:151:1: enter_function: entry to ‘xkb_compose_table_new_from_locale’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:160:8: branch_false: following ‘false’ branch (when ‘flags == 0’)... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:166:13: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:166:13: call_function: calling ‘xkb_compose_table_new’ from ‘xkb_compose_table_new_from_locale’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:166:13: return_function: returning to ‘xkb_compose_table_new_from_locale’ from ‘xkb_compose_table_new’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:168:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:171:12: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:173:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:175:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:179:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:181:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:185:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:187:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:191:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:193:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:195:5: danger: ‘<unknown>’ leaks here; was allocated at [(10)](sarif:/runs/0/results/24/codeFlows/0/threadFlows/0/locations/9) # 193| free(path); # 194| # 195|-> log_err(ctx, XKB_ERROR_INVALID_COMPOSE_LOCALE, # 196| "couldn't find a Compose file for locale \"%s\" (mapped to \"%s\")\n", # 197| locale, table->locale); Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:195:5: warning[-Wanalyzer-malloc-leak]: leak of ‘xkb_compose_table_new(ctx, locale, 1, 0)’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:151:1: enter_function: entry to ‘xkb_compose_table_new_from_locale’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:160:8: branch_false: following ‘false’ branch (when ‘flags == 0’)... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:166:13: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:166:13: call_function: calling ‘xkb_compose_table_new’ from ‘xkb_compose_table_new_from_locale’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:166:13: return_function: returning to ‘xkb_compose_table_new_from_locale’ from ‘xkb_compose_table_new’ libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:168:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:171:12: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:173:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:175:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:179:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:181:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:185:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:187:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:191:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:193:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/compose/table.c:195:5: danger: ‘xkb_compose_table_new(ctx, locale, 1, 0)’ leaks here; was allocated at [(8)](sarif:/runs/0/results/25/codeFlows/0/threadFlows/0/locations/7) # 193| free(path); # 194| # 195|-> log_err(ctx, XKB_ERROR_INVALID_COMPOSE_LOCALE, # 196| "couldn't find a Compose file for locale \"%s\" (mapped to \"%s\")\n", # 197| locale, table->locale); Error: GCC_ANALYZER_WARNING (CWE-476): [#def7] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:194:5: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*section.buffer.item + (sizetype)(*section.buffer.size + 4294967295)’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:382:1: enter_function: entry to ‘xkb_file_iterator_new_from_buffer’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:391:8: branch_false: following ‘false’ branch (when ‘iter’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:397:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:402:5: call_function: calling ‘xkb_file_section_init’ from ‘xkb_file_iterator_new_from_buffer’ # 192| darray_init(section->includes); # 193| darray_init(section->buffer); # 194|-> darray_append(section->buffer, '\0'); # 195| } # 196| Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:256:13: warning[-Wanalyzer-malloc-leak]: leak of ‘*section.buffer.item’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:343:1: enter_function: entry to ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:351:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:355:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:363:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:370:5: call_function: inlined call to ‘xkb_file_section_reset’ from ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:373:9: call_function: calling ‘xkb_file_section_set_meta_data’ from ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:373:9: return_function: returning to ‘xkb_file_section_parse’ from ‘xkb_file_section_set_meta_data’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:372:21: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:375:10: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:375:10: call_function: calling ‘xkb_file_section_process’ from ‘xkb_file_section_parse’ # 254| # 255| const darray_size_t file = darray_size(section->buffer); # 256|-> darray_append_string0(section->buffer, stmt->file); # 257| # 258| const darray_size_t section_name = Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:263:17: warning[-Wanalyzer-malloc-leak]: leak of ‘*iter.section.buffer.item’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:424:1: enter_function: entry to ‘xkb_file_iterator_next’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:427:8: branch_false: following ‘false’ branch... branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:437:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:439:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:439:12: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:441:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:472:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:482:13: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:504:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:505:10: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:505:10: call_function: calling ‘xkb_file_section_process’ from ‘xkb_file_iterator_next’ # 261| : 0; # 262| if (section_name) { # 263|-> darray_append_string0(section->buffer, # 264| (stmt->map) ? stmt->map : xkb_file->name); # 265| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:263:17: warning[-Wanalyzer-malloc-leak]: leak of ‘*section.buffer.item’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:343:1: enter_function: entry to ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:351:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:355:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:363:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:370:5: call_function: inlined call to ‘xkb_file_section_reset’ from ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:373:9: call_function: calling ‘xkb_file_section_set_meta_data’ from ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:373:9: return_function: returning to ‘xkb_file_section_parse’ from ‘xkb_file_section_set_meta_data’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:372:21: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:375:10: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:375:10: call_function: calling ‘xkb_file_section_process’ from ‘xkb_file_section_parse’ # 261| : 0; # 262| if (section_name) { # 263|-> darray_append_string0(section->buffer, # 264| (stmt->map) ? stmt->map : xkb_file->name); # 265| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘*iter.section.buffer.item’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:424:1: enter_function: entry to ‘xkb_file_iterator_next’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:427:8: branch_false: following ‘false’ branch... branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:437:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:439:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:439:12: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:441:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:472:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:482:13: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:504:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:505:10: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:505:10: call_function: calling ‘xkb_file_section_process’ from ‘xkb_file_iterator_next’ # 269| : 0; # 270| if (modifier) { # 271|-> darray_append_string0(section->buffer, stmt->modifier); # 272| } # 273| Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:271:17: warning[-Wanalyzer-malloc-leak]: leak of ‘*section.buffer.item’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:343:1: enter_function: entry to ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:351:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:355:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:363:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:370:5: call_function: inlined call to ‘xkb_file_section_reset’ from ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:373:9: call_function: calling ‘xkb_file_section_set_meta_data’ from ‘xkb_file_section_parse’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:373:9: return_function: returning to ‘xkb_file_section_parse’ from ‘xkb_file_section_set_meta_data’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:372:21: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:375:10: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:375:10: call_function: calling ‘xkb_file_section_process’ from ‘xkb_file_section_parse’ # 269| : 0; # 270| if (modifier) { # 271|-> darray_append_string0(section->buffer, stmt->modifier); # 272| } # 273| Error: GCC_ANALYZER_WARNING (CWE-775): [#def13] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(path, "rb")’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:351:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:355:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: danger: ‘fopen(path, "rb")’ leaks here; was opened at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) # 359| } # 360| # 361|-> XkbFile *xkb_file = XkbParseFile(ctx, file, path, map); # 362| fclose(file); # 363| if (!xkb_file) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def14] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(path, "rb")’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:351:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:354:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:355:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:361:25: danger: ‘fopen(path, "rb")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/2) # 359| } # 360| # 361|-> XkbFile *xkb_file = XkbParseFile(ctx, file, path, map); # 362| fclose(file); # 363| if (!xkb_file) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def15] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:404:10: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:382:1: enter_function: entry to ‘xkb_file_iterator_new_from_buffer’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:391:8: branch_false: following ‘false’ branch (when ‘iter’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:397:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:402:5: call_function: calling ‘xkb_file_section_init’ from ‘xkb_file_iterator_new_from_buffer’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:402:5: return_function: returning to ‘xkb_file_iterator_new_from_buffer’ from ‘xkb_file_section_init’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:404:10: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/5) # 402| xkb_file_section_init(&iter->section); # 403| # 404|-> if (!XkbParseStringInit(ctx, &iter->scanner, string, length, path, NULL)) { # 405| xkb_file_iterator_free(iter); # 406| return NULL; Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:404:10: warning[-Wanalyzer-malloc-leak]: leak of ‘iter’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:390:45: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:391:8: branch_false: following ‘false’ branch (when ‘iter’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:397:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap-file-iterator.c:404:10: danger: ‘iter’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 402| xkb_file_section_init(&iter->section); # 403| # 404|-> if (!XkbParseStringInit(ctx, &iter->scanner, string, length, path, NULL)) { # 405| xkb_file_iterator_free(iter); # 406| return NULL; Error: GCC_ANALYZER_WARNING (CWE-476): [#def17] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:217:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:554:1: enter_function: entry to ‘CompileKeymap’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:594:10: branch_true: following ‘true’ branch (when ‘type != 4’)... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:596:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:608:12: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:595:10: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:616:12: call_function: calling ‘UpdateDerivedKeymapFields’ from ‘CompileKeymap’ # 215| break; # 216| case 1: # 217|-> darray_append(actions, interp->a.action); # 218| break; # 219| default: Error: GCC_ANALYZER_WARNING (CWE-415): [#def18] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:265:5: warning[-Wanalyzer-double-free]: double-‘free’ of ‘<unknown>’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:554:1: enter_function: entry to ‘CompileKeymap’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:594:10: branch_true: following ‘true’ branch (when ‘type != 4’)... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:596:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:608:12: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:595:10: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/keymap.c:616:12: call_function: calling ‘UpdateDerivedKeymapFields’ from ‘CompileKeymap’ # 263| } # 264| } # 265|-> darray_free(actions); # 266| darray_free(interprets); # 267| Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/parser.y:994:33: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/parser.y:1108:1: enter_function: entry to ‘parse_next’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/parser.y:1118:16: call_function: calling ‘_xkbcommon_parse’ from ‘parse_next’ # 992| $$ = XKB_KEY_NoSymbol; # 993| } # 994|-> parser_vrb( # 995| /* # 996| * Require an extra high verbosity, because Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1324:13: warning[-Wanalyzer-malloc-leak]: leak of ‘expanded.item’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1490:1: enter_function: entry to ‘matcher_rule_apply_if_matches’ libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1607:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1609:14: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1610:14: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1613:37: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1613:16: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1614:44: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1615:54: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/src/xkbcomp/rules.c:1658:21: call_function: calling ‘append_expanded_kccgst_value’ from ‘matcher_rule_apply_if_matches’ # 1322| str[*i] == 'a' && str[*i+1] == 'l' && str[*i+2] == 'l') { # 1323| if (has_layout_idx_range) # 1324|-> scanner_vrb(s, XKB_LOG_VERBOSITY_DETAILED, XKB_LOG_MESSAGE_NO_ID, # 1325| "Using :all qualifier with indices range " # 1326| "is not recommended."); Error: GCC_ANALYZER_WARNING (CWE-401): [#def21] libxkbcommon-xkbcommon-1.12.2/test/common.c:315:13: warning[-Wanalyzer-malloc-leak]: leak of ‘test_get_path(path_rel)’ libxkbcommon-xkbcommon-1.12.2/test/common.c:679:1: enter_function: entry to ‘test_compile_output2’ libxkbcommon-xkbcommon-1.12.2/test/common.c:695:8: branch_false: following ‘false’ branch (when ‘rel_path’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/common.c:709:8: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:709:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:714:17: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:716:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:721:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:723:24: call_function: calling ‘test_get_path’ from ‘test_compile_output2’ libxkbcommon-xkbcommon-1.12.2/test/common.c:723:24: return_function: returning to ‘test_compile_output2’ from ‘test_get_path’ libxkbcommon-xkbcommon-1.12.2/test/common.c:724:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:726:8: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:726:8: branch_false: following ‘false’ branch (when ‘update_output_files == 0’)... libxkbcommon-xkbcommon-1.12.2/test/common.c:733:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:734:32: call_function: calling ‘test_read_file’ from ‘test_compile_output2’ # 313| printf("Error reading file %s: unexpected end of file\n", path); # 314| else if (ferror(file)) # 315|-> perror("Error reading file"); # 316| fclose(file); # 317| free(ret); Error: GCC_ANALYZER_WARNING (CWE-910): [#def22] libxkbcommon-xkbcommon-1.12.2/test/common.c:342:9: warning[-Wanalyzer-double-fclose]: double ‘fclose’ of FILE ‘fopen(test_get_path(path_rel), "rb")’ libxkbcommon-xkbcommon-1.12.2/test/common.c:679:1: enter_function: entry to ‘test_compile_output2’ libxkbcommon-xkbcommon-1.12.2/test/common.c:695:8: branch_false: following ‘false’ branch (when ‘rel_path’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/common.c:709:8: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:709:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:714:17: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:716:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:721:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:723:24: call_function: calling ‘test_get_path’ from ‘test_compile_output2’ libxkbcommon-xkbcommon-1.12.2/test/common.c:723:24: return_function: returning to ‘test_compile_output2’ from ‘test_get_path’ libxkbcommon-xkbcommon-1.12.2/test/common.c:724:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:726:8: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:726:8: branch_false: following ‘false’ branch (when ‘update_output_files == 0’)... libxkbcommon-xkbcommon-1.12.2/test/common.c:733:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:734:32: call_function: calling ‘test_read_file’ from ‘test_compile_output2’ # 340| out: # 341| if (file) # 342|-> fclose(file); # 343| free(path); # 344| return ret; Error: GCC_ANALYZER_WARNING (CWE-415): [#def23] libxkbcommon-xkbcommon-1.12.2/test/common.c:342:9: warning[-Wanalyzer-double-free]: double-‘fclose’ of ‘fopen(test_get_path(path_rel), "rb")’ libxkbcommon-xkbcommon-1.12.2/test/common.c:679:1: enter_function: entry to ‘test_compile_output2’ libxkbcommon-xkbcommon-1.12.2/test/common.c:695:8: branch_false: following ‘false’ branch (when ‘rel_path’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/common.c:709:8: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:709:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:714:17: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:716:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:721:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:723:24: call_function: calling ‘test_get_path’ from ‘test_compile_output2’ libxkbcommon-xkbcommon-1.12.2/test/common.c:723:24: return_function: returning to ‘test_compile_output2’ from ‘test_get_path’ libxkbcommon-xkbcommon-1.12.2/test/common.c:724:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/common.c:726:8: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:726:8: branch_false: following ‘false’ branch (when ‘update_output_files == 0’)... libxkbcommon-xkbcommon-1.12.2/test/common.c:733:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/common.c:734:32: call_function: calling ‘test_read_file’ from ‘test_compile_output2’ # 340| out: # 341| if (file) # 342|-> fclose(file); # 343| free(path); # 344| return ret; Error: GCC_ANALYZER_WARNING (CWE-775): [#def24] libxkbcommon-xkbcommon-1.12.2/test/test.h:152:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(test_get_path("locale/en_US.UTF-8/Compose"), "rb")’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:18:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:28:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:30:12: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:31:12: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:32:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: call_function: calling ‘xkb_enable_quiet_logging’ from ‘main’ # 150| xkb_enable_quiet_logging(struct xkb_context *ctx) # 151| { # 152|-> xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); # 153| xkb_context_set_log_verbosity(ctx, XKB_LOG_VERBOSITY_MINIMAL); # 154| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] libxkbcommon-xkbcommon-1.12.2/test/test.h:152:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(test_get_path("locale/en_US.UTF-8/Compose"), "rb")’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:18:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:28:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:30:12: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:31:12: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:32:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: call_function: calling ‘xkb_enable_quiet_logging’ from ‘main’ # 150| xkb_enable_quiet_logging(struct xkb_context *ctx) # 151| { # 152|-> xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); # 153| xkb_context_set_log_verbosity(ctx, XKB_LOG_VERBOSITY_MINIMAL); # 154| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def26] libxkbcommon-xkbcommon-1.12.2/test/test.h:153:5: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(test_get_path("locale/en_US.UTF-8/Compose"), "rb")’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:18:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:28:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:30:12: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:31:12: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:32:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: call_function: calling ‘xkb_enable_quiet_logging’ from ‘main’ # 151| { # 152| xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); # 153|-> xkb_context_set_log_verbosity(ctx, XKB_LOG_VERBOSITY_MINIMAL); # 154| } # 155| Error: GCC_ANALYZER_WARNING (CWE-401): [#def27] libxkbcommon-xkbcommon-1.12.2/test/test.h:153:5: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(test_get_path("locale/en_US.UTF-8/Compose"), "rb")’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:18:1: enter_function: entry to ‘main’ libxkbcommon-xkbcommon-1.12.2/bench/compose.c:28:5: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:30:12: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:31:12: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:32:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/bench/compose.c:39:5: call_function: calling ‘xkb_enable_quiet_logging’ from ‘main’ # 151| { # 152| xkb_context_set_log_level(ctx, XKB_LOG_LEVEL_CRITICAL); # 153|-> xkb_context_set_log_verbosity(ctx, XKB_LOG_VERBOSITY_MINIMAL); # 154| } # 155| Error: GCC_ANALYZER_WARNING (CWE-775): [#def28] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pipe[0]’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:145:5: branch_false: following ‘false’ branch (when ‘keymap’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:148:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:165:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: danger: ‘stdin_pipe[0]’ leaks here # 169| } # 170| if (posix_spawn_file_actions_init(&action)) { # 171|-> perror("spawn_file_actions_init error"); # 172| goto posix_spawn_file_actions_init_error; # 173| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def29] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pipe[1]’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:145:5: branch_false: following ‘false’ branch (when ‘keymap’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:148:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:165:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: danger: ‘stdin_pipe[1]’ leaks here # 169| } # 170| if (posix_spawn_file_actions_init(&action)) { # 171|-> perror("spawn_file_actions_init error"); # 172| goto posix_spawn_file_actions_init_error; # 173| } Error: GCC_ANALYZER_WARNING (CWE-775): [#def30] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:219:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pipe[0]’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:145:5: branch_false: following ‘false’ branch (when ‘keymap’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:148:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:165:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:178:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:178:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:179:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:219:5: danger: ‘stdin_pipe[0]’ leaks here # 217| # 218| posix_spawn_file_actions_error: # 219|-> perror("posix_spawn_file_actions_* error"); # 220| posix_spawn_file_actions_init_error: # 221| close(stdin_pipe[PIPE_WRITE]); Error: GCC_ANALYZER_WARNING (CWE-775): [#def31] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:221:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pipe[0]’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:145:5: branch_false: following ‘false’ branch (when ‘keymap’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:148:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:165:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:221:5: danger: ‘stdin_pipe[0]’ leaks here # 219| perror("posix_spawn_file_actions_* error"); # 220| posix_spawn_file_actions_init_error: # 221|-> close(stdin_pipe[PIPE_WRITE]); # 222| close(stdin_pipe[PIPE_READ]); # 223| ret = TEST_SETUP_FAILURE; Error: GCC_ANALYZER_WARNING (CWE-775): [#def32] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:221:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pipe[1]’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:145:5: branch_false: following ‘false’ branch (when ‘keymap’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:148:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:165:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:171:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:221:5: danger: ‘stdin_pipe[1]’ leaks here # 219| perror("posix_spawn_file_actions_* error"); # 220| posix_spawn_file_actions_init_error: # 221|-> close(stdin_pipe[PIPE_WRITE]); # 222| close(stdin_pipe[PIPE_READ]); # 223| ret = TEST_SETUP_FAILURE; Error: GCC_ANALYZER_WARNING (CWE-775): [#def33] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:222:5: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘stdin_pipe[0]’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:145:5: branch_false: following ‘false’ branch (when ‘keymap’ is non-NULL)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:148:11: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:165:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:170:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:222:5: danger: ‘stdin_pipe[0]’ leaks here # 220| posix_spawn_file_actions_init_error: # 221| close(stdin_pipe[PIPE_WRITE]); # 222|-> close(stdin_pipe[PIPE_READ]); # 223| ret = TEST_SETUP_FAILURE; # 224| cleanup: Error: GCC_ANALYZER_WARNING (CWE-775): [#def34] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:278:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘file’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:257:1: enter_function: entry to ‘test_keymap_roundtrip’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:265:9: branch_false: following ‘false’ branch (when the strings are non-equal)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:272:16: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:272:16: acquire_resource: opened here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:273:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:278:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:278:22: danger: ‘file’ leaks here; was opened at [(7)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/6) # 276| } # 277| } # 278|-> char *original = read_file(keymap_path, file); # 279| fclose(file); # 280| if (!original) Error: GCC_ANALYZER_WARNING (CWE-401): [#def35] libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:278:22: warning[-Wanalyzer-malloc-leak]: leak of ‘file’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:257:1: enter_function: entry to ‘test_keymap_roundtrip’ libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:265:9: branch_false: following ‘false’ branch (when the strings are non-equal)... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:272:16: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:272:16: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:273:12: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:278:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/x11comp.c:278:22: danger: ‘file’ leaks here; was allocated at [(7)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/6) # 276| } # 277| } # 278|-> char *original = read_file(keymap_path, file); # 279| fclose(file); # 280| if (!original) Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:93:12: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:46:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:47:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:51:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:76:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:90:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:103:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:111:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:113:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:119:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:93:12: danger: ‘tmpfile()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 91| # 92| /* Now wait for the SIGUSR1 signal that Xvfb is ready */ # 93|-> while (!xvfb_is_ready) { # 94| usleep(1000); # 95| if (++counter >= 3000) /* 3 seconds max wait */ Error: GCC_ANALYZER_WARNING (CWE-401): [#def37] libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:102:17: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:46:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:47:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:51:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:76:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:90:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:102:17: danger: ‘tmpfile()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 100| # 101| /* Check if Xvfb is still alive */ # 102|-> pid_t pid = waitpid(xvfb_pid, NULL, WNOHANG); # 103| if (pid != 0) { # 104| fprintf(stderr, "ERROR: Xvfb not alive\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def38] libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:128:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:46:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:47:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:51:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:76:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:90:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:103:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:111:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:113:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:119:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:128:13: danger: ‘tmpfile()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/0) # 126| switch (test_pid) { # 127| case -1: # 128|-> perror("fork"); # 129| ret = TEST_SETUP_FAILURE; # 130| break; Error: GCC_ANALYZER_WARNING (CWE-401): [#def39] libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:140:35: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:46:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:47:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:51:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:76:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:90:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:103:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:111:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:113:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:119:9: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:140:35: danger: ‘tmpfile()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/0) # 138| { # 139| int test_status = 0; # 140|-> pid_t test_pid2 = waitpid(test_pid, &test_status, 0); # 141| ret = (test_pid2 > 0 && WIFEXITED(test_status)) # 142| ? WEXITSTATUS(test_status) Error: GCC_ANALYZER_WARNING (CWE-401): [#def40] libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:157:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:46:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:47:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:51:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:152:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:153:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:157:13: danger: ‘tmpfile()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 155| fprintf(stderr, "Waiting for Xvfb to exit (pid: %d)...\n", xvfb_pid); # 156| int xvfb_status = 0; # 157|-> if (waitpid(xvfb_pid, &xvfb_status, 0) <= 0) { # 158| perror("Xvfb waitpid failed."); # 159| } else if (WIFEXITED(xvfb_status)) { Error: GCC_ANALYZER_WARNING (CWE-401): [#def41] libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:158:13: warning[-Wanalyzer-malloc-leak]: leak of ‘tmpfile()’ libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:46:18: acquire_memory: allocated here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:47:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:51:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:152:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:153:9: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:157:12: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:158:13: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/test/xvfb-wrapper.c:158:13: danger: ‘tmpfile()’ leaks here; was allocated at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 156| int xvfb_status = 0; # 157| if (waitpid(xvfb_pid, &xvfb_status, 0) <= 0) { # 158|-> perror("Xvfb waitpid failed."); # 159| } else if (WIFEXITED(xvfb_status)) { # 160| fprintf(stderr, "Xvfb shut down (pid: %d) with exit code %d.\n", Error: GCC_ANALYZER_WARNING (CWE-401): [#def42] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:295:9: warning[-Wanalyzer-malloc-leak]: leak of ‘parent2_node.item’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ # 293| ); # 294| if (inc->section) { # 295|-> darray_append_lit(*node, "("); # 296| darray_append_string( # 297| *node, Error: GCC_ANALYZER_WARNING (CWE-401): [#def43] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:296:9: warning[-Wanalyzer-malloc-leak]: leak of ‘parent2_node.item’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ # 294| if (inc->section) { # 295| darray_append_lit(*node, "("); # 296|-> darray_append_string( # 297| *node, # 298| xkb_file_section_get_string(section, inc->section) Error: GCC_ANALYZER_WARNING (CWE-401): [#def44] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:300:9: warning[-Wanalyzer-malloc-leak]: leak of ‘parent2_node.item’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ # 298| xkb_file_section_get_string(section, inc->section) # 299| ); # 300|-> darray_append_lit(*node, ")"); # 301| } # 302| Error: GCC_ANALYZER_WARNING (CWE-688): [#def45] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:305:5: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ #argument 1 of ‘__builtin_memcpy’ must be non-null # 303| /* Node label */ # 304| darray_size(*label) = 0; # 305|-> darray_append_lit(*label, "<B>"); # 306| darray_append_string( # 307| *label, Error: GCC_ANALYZER_WARNING (CWE-401): [#def46] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:306:5: warning[-Wanalyzer-malloc-leak]: leak of ‘parent2_label.item’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ # 304| darray_size(*label) = 0; # 305| darray_append_lit(*label, "<B>"); # 306|-> darray_append_string( # 307| *label, # 308| ((output_options & OUTPUT_YAML_SHORT_LABELS) Error: GCC_ANALYZER_WARNING (CWE-401): [#def47] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:306:5: warning[-Wanalyzer-malloc-leak]: leak of ‘parent2_node.item’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ # 304| darray_size(*label) = 0; # 305| darray_append_lit(*label, "<B>"); # 306|-> darray_append_string( # 307| *label, # 308| ((output_options & OUTPUT_YAML_SHORT_LABELS) Error: GCC_ANALYZER_WARNING (CWE-401): [#def48] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:312:5: warning[-Wanalyzer-malloc-leak]: leak of ‘parent2_label.item’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:329:1: enter_function: entry to ‘print_dot_included_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:343:9: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:344:17: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:345:22: call_function: calling ‘print_dot_node’ from ‘print_dot_included_sections’ # 310| : xkb_file_section_get_string(section, inc->path)) # 311| ); # 312|-> darray_append_lit(*label, "</B>"); # 313| if (inc->section) { # 314| darray_append_lit(*label, "("); Error: COMPILER_WARNING (CWE-252): [#def49] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c: scope_hint: In function ‘print_dot’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:385:9: warning[-Wunused-result]: ignoring return value of ‘realpath’ declared with attribute ‘warn_unused_result’ # 385 | realpath(path, root); # | ^~~~~~~~~~~~~~~~~~~~ # 383| } else { # 384| #ifdef HAVE_REAL_PATH # 385|-> realpath(path, root); # 386| #else # 387| if (unlikely(!strcpy_safe(root, sizeof(root), path))) Error: GCC_ANALYZER_WARNING (CWE-415): [#def50] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:427:9: warning[-Wanalyzer-double-free]: double-‘free’ of ‘<unknown>’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:812:1: enter_function: entry to ‘print_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:879:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:886:39: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:892:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:898:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:909:14: call_function: calling ‘print_dot’ from ‘print_sections’ # 425| } # 426| /* Append full path & section */ # 427|-> darray_append_string(parent_node, root); # 428| if (section->name) { # 429| darray_append_lit(parent_node, "("); Error: GCC_ANALYZER_WARNING (CWE-688): [#def51] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:448:13: warning[-Wanalyzer-null-argument]: use of NULL ‘<unknown>’ where non-null expected libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:812:1: enter_function: entry to ‘print_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:879:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:886:39: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:892:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:898:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:909:14: call_function: calling ‘print_dot’ from ‘print_sections’ #argument 1 of ‘__builtin_memcpy’ must be non-null # 446| if (!is_composite_file || section->file_type == FILE_TYPE_KEYMAP) { # 447| /* Display file only for top-level components */ # 448|-> darray_append_lit(parent_label, "<B>"); # 449| if (root_file && (output_options & OUTPUT_YAML_SHORT_LABELS)) { # 450| darray_append_string(parent_label, root_file); Error: GCC_ANALYZER_WARNING (CWE-415): [#def52] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:454:13: warning[-Wanalyzer-double-free]: double-‘free’ of ‘<unknown>’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:812:1: enter_function: entry to ‘print_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:879:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:886:39: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:892:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:898:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:909:14: call_function: calling ‘print_dot’ from ‘print_sections’ # 452| darray_append_string(parent_label, root); # 453| } # 454|-> darray_append_lit(parent_label, "</B>"); # 455| } # 456| if (section->name) { Error: GCC_ANALYZER_WARNING (CWE-415): [#def53] libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:464:13: warning[-Wanalyzer-double-free]: double-‘free’ of ‘<unknown>’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:812:1: enter_function: entry to ‘print_sections’ libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:879:8: branch_true: following ‘true’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:886:39: branch_true: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:892:8: branch_false: following ‘false’ branch... libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:898:5: branch_false: ...to here libxkbcommon-xkbcommon-1.12.2/tools/introspection.c:909:14: call_function: calling ‘print_dot’ from ‘print_sections’ # 462| darray_append_lit(parent_label, ")"); # 463| } else { # 464|-> darray_append_string( # 465| parent_label, # 466| (is_composite_file ? "(unnamed)" : "(-)")
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| diffbase-analyzer-version-clippy | 1.90.0 |
| diffbase-analyzer-version-cppcheck | 2.18.3 |
| diffbase-analyzer-version-gcc | 15.2.1 |
| 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-204.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-gcc-latest-x86_64 |
| diffbase-project-name | libxkbcommon-1.11.0-1.fc43 |
| diffbase-store-results-to | /tmp/tmpm2nsna3y/libxkbcommon-1.11.0-1.fc43.tar.xz |
| diffbase-time-created | 2025-10-28 19:18:56 |
| diffbase-time-finished | 2025-10-28 19:22:13 |
| diffbase-tool | csmock |
| diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpm2nsna3y/libxkbcommon-1.11.0-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpm2nsna3y/libxkbcommon-1.11.0-1.fc43.src.rpm' |
| diffbase-tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-204.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-gcc-latest-x86_64 |
| project-name | libxkbcommon-1.12.2-1.fc44 |
| store-results-to | /tmp/tmpfz8dw2ek/libxkbcommon-1.12.2-1.fc44.tar.xz |
| time-created | 2025-10-28 19:23:03 |
| time-finished | 2025-10-28 19:25:59 |
| title | Newly introduced findings |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpfz8dw2ek/libxkbcommon-1.12.2-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpfz8dw2ek/libxkbcommon-1.12.2-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |