Error: GCC_ANALYZER_WARNING (CWE-688): [#def1] gettext-0.24/gettext-tools/src/../tree-sitter-0.23.2/lib/src/./subtree.c:1043:3: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘f’ where non-null expected gettext-0.24/gettext-tools/src/../tree-sitter-0.23.2/lib/src/./tree.c:159:6: enter_function: entry to ‘ts_tree_print_dot_graph’ gettext-0.24/gettext-tools/src/../tree-sitter-0.23.2/lib/src/./tree.c:160:16: acquire_memory: this call could return NULL gettext-0.24/gettext-tools/src/../tree-sitter-0.23.2/lib/src/./tree.c:161:3: call_function: calling ‘ts_subtree_print_dot_graph’ from ‘ts_tree_print_dot_graph’ #argument 4 of ‘__builtin_fwrite’ must be non-null # 1041| # 1042| void ts_subtree_print_dot_graph(Subtree self, const TSLanguage *language, FILE *f) { # 1043|-> fprintf(f, "digraph tree {\n"); # 1044| fprintf(f, "edge [arrowhead=none]\n"); # 1045| ts_subtree__print_dot_graph(&self, 0, language, 0, f); Error: COMPILER_WARNING (CWE-476): [#def2] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/language.h:275:32: warning[-Wnull-dereference]: potential null pointer dereference # 275 | for (const char *chr = name; *chr; chr++) { # | ^~~~ # 273| ) { # 274| const char *name = ts_language_symbol_name(self, symbol); # 275|-> for (const char *chr = name; *chr; chr++) { # 276| switch (*chr) { # 277| case '"': Error: COMPILER_WARNING: [#def3] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/lib.c:6: included_from: Included from here. gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/lexer.c: scope_hint: In function ‘ts_lexer__log’ gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/lexer.c:293:5: warning[-Wsuggest-attribute=format]: function ‘ts_lexer__log’ might be a candidate for ‘gnu_printf’ format attribute # 293 | vsnprintf(self->debug_buffer, TREE_SITTER_SERIALIZATION_BUFFER_SIZE, fmt, args); # | ^~~~~~~~~ # 291| va_start(args, fmt); # 292| if (self->logger.log) { # 293|-> vsnprintf(self->debug_buffer, TREE_SITTER_SERIALIZATION_BUFFER_SIZE, fmt, args); # 294| self->logger.log(self->logger.payload, TSLogTypeLex, self->debug_buffer); # 295| } Error: COMPILER_WARNING (CWE-476): [#def4] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c:43:13: warning[-Wnull-dereference]: potential null pointer dereference # 43 | symbol[i] != '\0' \ # | ~~~~~~^~~ # 41| for ( \ # 42| int i = 0; \ # 43|-> symbol[i] != '\0' \ # 44| && off < TREE_SITTER_SERIALIZATION_BUFFER_SIZE; \ # 45| i++ \ Error: COMPILER_WARNING (CWE-476): [#def5] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c: scope_hint: In function 'ts_parser__lex' gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c:689:3: warning[-Wnull-dereference]: potential null pointer dereference # 689 | LOG_LOOKAHEAD( # | ^ # 687| } # 688| # 689|-> LOG_LOOKAHEAD( # 690| SYM_NAME(ts_subtree_symbol(result)), # 691| ts_subtree_total_size(result).bytes Error: CPPCHECK_WARNING (CWE-768): [#def6] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c:1864: error[unknownEvaluationOrder]: Expression 'self,0,(union Subtree){.ptr=NULL},(union Subtree){.ptr=NULL}' depends on order of evaluation of side effects # 1862| self->included_range_differences = (TSRangeArray) array_new(); # 1863| self->included_range_difference_index = 0; # 1864|-> ts_parser__set_cached_token(self, 0, NULL_SUBTREE, NULL_SUBTREE); # 1865| return self; # 1866| } Error: CPPCHECK_WARNING (CWE-768): [#def7] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c:1885: error[unknownEvaluationOrder]: Expression 'self,0,(union Subtree){.ptr=NULL},(union Subtree){.ptr=NULL}' depends on order of evaluation of side effects # 1883| ts_wasm_store_delete(self->wasm_store); # 1884| ts_lexer_delete(&self->lexer); # 1885|-> ts_parser__set_cached_token(self, 0, NULL_SUBTREE, NULL_SUBTREE); # 1886| ts_subtree_pool_delete(&self->tree_pool); # 1887| reusable_node_delete(&self->reusable_node); Error: CPPCHECK_WARNING (CWE-768): [#def8] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c:1987: error[unknownEvaluationOrder]: Expression 'self,0,(union Subtree){.ptr=NULL},(union Subtree){.ptr=NULL}' depends on order of evaluation of side effects # 1985| ts_lexer_reset(&self->lexer, length_zero()); # 1986| ts_stack_clear(self->stack); # 1987|-> ts_parser__set_cached_token(self, 0, NULL_SUBTREE, NULL_SUBTREE); # 1988| if (self->finished_tree.ptr) { # 1989| ts_subtree_release(&self->tree_pool, self->finished_tree); Error: COMPILER_WARNING (CWE-476): [#def9] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/parser.c:2002:46: warning[-Wnull-dereference]: potential null pointer dereference # 2002 | if (!self->language || !input.read) return NULL; # | ^ # 2000| ) { # 2001| TSTree *result = NULL; # 2002|-> if (!self->language || !input.read) return NULL; # 2003| # 2004| if (ts_language_is_wasm(self->language)) { Error: COMPILER_WARNING (CWE-670): [#def10] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/lib.c:9: included_from: Included from here. gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/query.c: scope_hint: In function ‘ts_query_cursor_exec’ gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/query.c:3037:17: warning[-Wduplicated-branches]: this condition has identical branches # 3037 | } else if (step->symbol != WILDCARD_SYMBOL) { # | ^ # 3035| } else if (step->is_pass_through) { # 3036| LOG("pass_through"); # 3037|-> } else if (step->symbol != WILDCARD_SYMBOL) { # 3038| LOG("symbol: %s", query->language->symbol_names[step->symbol]); # 3039| } else { Error: COMPILER_WARNING (CWE-476): [#def11] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/reusable_node.h:65:5: warning[-Wnull-dereference]: potential null pointer dereference # 65 | array_push(&self->stack, ((StackEntry) { # | ^ # 63| StackEntry last_entry = *array_back(&self->stack); # 64| if (ts_subtree_child_count(last_entry.tree) > 0) { # 65|-> array_push(&self->stack, ((StackEntry) { # 66| .tree = ts_subtree_children(last_entry.tree)[0], # 67| .child_index = 0, Error: COMPILER_WARNING (CWE-476): [#def12] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/reusable_node.h:66:51: warning[-Wnull-dereference]: potential null pointer dereference # 66 | .tree = ts_subtree_children(last_entry.tree)[0], # 64| if (ts_subtree_child_count(last_entry.tree) > 0) { # 65| array_push(&self->stack, ((StackEntry) { # 66|-> .tree = ts_subtree_children(last_entry.tree)[0], # 67| .child_index = 0, # 68| .byte_offset = last_entry.byte_offset, Error: COMPILER_WARNING: [#def13] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/lib.c:10: included_from: Included from here. gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/stack.c: scope_hint: In function ‘ts_stack_print_dot_graph’ gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/stack.c:806:67: warning[-Wformat=]: format ‘%X’ expects argument of type ‘unsigned int’, but argument 3 has type ‘int’ # 806 | for (uint32_t j = 0; j < state->length; j++) fprintf(f, " %2X", data[j]); # | ~~^ ~~~~~~~ # | | | # | | int # | unsigned int # | %2X # 804| const char *data = ts_external_scanner_state_data(state); # 805| fprintf(f, "\nexternal_scanner_state:"); # 806|-> for (uint32_t j = 0; j < state->length; j++) fprintf(f, " %2X", data[j]); # 807| } # 808| Error: COMPILER_WARNING (CWE-476): [#def14] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:308:53: warning[-Wnull-dereference]: potential null pointer dereference # 308 | MutableSubtree child = ts_subtree_to_mut_unsafe(ts_subtree_children(tree)[0]); # | ^ # 306| if (tree.ptr->ref_count > 1 || tree.ptr->child_count < 2) break; # 307| # 308|-> MutableSubtree child = ts_subtree_to_mut_unsafe(ts_subtree_children(tree)[0]); # 309| if ( # 310| child.data.is_inline || Error: COMPILER_WARNING (CWE-476): [#def15] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:333:53: warning[-Wnull-dereference]: potential null pointer dereference # 333 | MutableSubtree child = ts_subtree_to_mut_unsafe(ts_subtree_children(tree)[0]); # | ^ # 331| while (stack->size > initial_stack_size) { # 332| tree = array_pop(stack); # 333|-> MutableSubtree child = ts_subtree_to_mut_unsafe(ts_subtree_children(tree)[0]); # 334| MutableSubtree grandchild = ts_subtree_to_mut_unsafe(ts_subtree_children(child)[child.ptr->child_count - 1]); # 335| ts_subtree_summarize_children(grandchild, language); Error: COMPILER_WARNING (CWE-476): [#def16] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c: scope_hint: In function ‘ts_subtree_balance’ gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:352:15: warning[-Wnull-dereference]: potential null pointer dereference # 352 | Subtree child1 = ts_subtree_children(tree)[0]; # | ^~~~~~ # 350| # 351| if (tree.ptr->u.non_terminal.repeat_depth > 0) { # 352|-> Subtree child1 = ts_subtree_children(tree)[0]; # 353| Subtree child2 = ts_subtree_children(tree)[tree.ptr->child_count - 1]; # 354| long repeat_delta = (long)ts_subtree_repeat_depth(child1) - (long)ts_subtree_repeat_depth(child2); Error: COMPILER_WARNING: [#def17] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/lib.c:11: included_from: Included from here. gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c: scope_hint: In function ‘ts_subtree__print_dot_graph’ gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:1000:14: warning[-Wformat=]: format ‘%u’ expects argument of type ‘unsigned int’, but argument 7 has type ‘int’ # 1000 | fprintf(f, ", tooltip=\"" # | ^~~~~~~~~~~~~~ #...... # 1012 | ts_subtree_has_changes(*self), # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # | | # | int gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:1004:20: note: format string is defined here # 1004 | "has-changes: %u\n" # | ~^ # | | # | unsigned int # | %u # 998| if (ts_subtree_extra(*self)) fprintf(f, ", fontcolor=gray"); # 999| # 1000|-> fprintf(f, ", tooltip=\"" # 1001| "range: %u - %u\n" # 1002| "state: %d\n" Error: COMPILER_WARNING: [#def18] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:1000:14: warning[-Wformat=]: format ‘%u’ expects argument of type ‘unsigned int’, but argument 8 has type ‘int’ # 1000 | fprintf(f, ", tooltip=\"" # | ^~~~~~~~~~~~~~ #...... # 1013 | ts_subtree_depends_on_column(*self), # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # | | # | int gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.c:1005:26: note: format string is defined here # 1005 | "depends-on-column: %u\n" # | ~^ # | | # | unsigned int # | %u # 998| if (ts_subtree_extra(*self)) fprintf(f, ", fontcolor=gray"); # 999| # 1000|-> fprintf(f, ", tooltip=\"" # 1001| "range: %u - %u\n" # 1002| "state: %d\n" Error: COMPILER_WARNING (CWE-476): [#def19] gettext-0.24/gettext-tools/tree-sitter-0.23.2/lib/src/subtree.h:238:33: warning[-Wnull-dereference]: potential null pointer dereference # 238 | ((self).data.is_inline ? NULL : (Subtree *)((self).ptr) - (self).ptr->child_count) # | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # 236| // tree's own heap data. # 237| #define ts_subtree_children(self) \ # 238|-> ((self).data.is_inline ? NULL : (Subtree *)((self).ptr) - (self).ptr->child_count) # 239| # 240| static inline void ts_subtree_set_extra(MutableSubtree *self, bool is_extra) { Error: COMPILER_WARNING: [#def20] gettext-0.24/gettext-tools/tree-sitter-rust-0.23.2/src/rust-scanner.c: scope_hint: In function ‘tree_sitter_rust_external_scanner_deserialize’ gettext-0.24/gettext-tools/tree-sitter-rust-0.23.2/src/rust-scanner.c:37:18: warning[-Wshadow=compatible-local]: declaration of ‘scanner’ shadows a previous local # 37 | Scanner *scanner = (Scanner *)payload; # | ^~~~~~~ gettext-0.24/gettext-tools/tree-sitter-rust-0.23.2/src/rust-scanner.c:34:14: note: shadowed declaration is here # 34 | Scanner *scanner = (Scanner *)payload; # | ^~~~~~~ # 35| scanner->opening_hash_count = 0; # 36| if (length == 1) { # 37|-> Scanner *scanner = (Scanner *)payload; # 38| scanner->opening_hash_count = buffer[0]; # 39| }
analyzer-version-clippy | 1.86.0 |
analyzer-version-cppcheck | 2.17.1 |
analyzer-version-gcc | 15.0.1 |
analyzer-version-gcc-analyzer | 15.0.1 |
analyzer-version-shellcheck | 0.10.0 |
analyzer-version-unicontrol | 0.0.2 |
diffbase-analyzer-version-clippy | 1.86.0 |
diffbase-analyzer-version-cppcheck | 2.17.1 |
diffbase-analyzer-version-gcc | 15.0.1 |
diffbase-analyzer-version-gcc-analyzer | 15.0.1 |
diffbase-analyzer-version-shellcheck | 0.10.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-199.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.20250425.124705.g1c7c448.main-1.el9.noarch |
diffbase-mock-config | fedora-rawhide-x86_64 |
diffbase-project-name | gettext-0.23.1-2.fc42 |
diffbase-store-results-to | /tmp/tmp8fgtt6bk/gettext-0.23.1-2.fc42.tar.xz |
diffbase-time-created | 2025-04-25 12:33:01 |
diffbase-time-finished | 2025-04-25 12:50:07 |
diffbase-tool | csmock |
diffbase-tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp8fgtt6bk/gettext-0.23.1-2.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp8fgtt6bk/gettext-0.23.1-2.fc42.src.rpm' |
diffbase-tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |
enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
exit-code | 0 |
host | ip-172-16-1-199.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.20250425.124705.g1c7c448.main-1.el9.noarch |
mock-config | fedora-rawhide-x86_64 |
project-name | gettext-0.24-1.fc43 |
store-results-to | /tmp/tmpsw5tsdfw/gettext-0.24-1.fc43.tar.xz |
time-created | 2025-04-25 12:50:33 |
time-finished | 2025-04-25 13:08:33 |
title | Newly introduced findings |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpsw5tsdfw/gettext-0.24-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsw5tsdfw/gettext-0.24-1.fc43.src.rpm' |
tool-version | csmock-3.8.1.20250422.172604.g26bc3d6-1.el9 |