Error: CPPCHECK_WARNING (CWE-476): [#def1] snowball-3.0.1/compiler/generator.c:237: error[ctunullpointer]: Null pointer dereference: p # 235| # 236| static void winc(struct generator * g, struct node * p) { /* increment c */ # 237|-> write_string(g, p->mode == m_forward ? "z->c++;" : # 238| "z->c--;"); # 239| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def2] snowball-3.0.1/compiler/space.c:159:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ snowball-3.0.1/compiler/space.c:272:13: enter_function: entry to ‘str_append_wchar_as_utf8’ snowball-3.0.1/compiler/space.c:273:8: branch_false: following ‘false’ branch (when ‘ch > 127’)... snowball-3.0.1/compiler/space.c:277:8: branch_false: ...to here snowball-3.0.1/compiler/space.c:277:8: branch_false: following ‘false’ branch (when ‘ch > 2047’)... snowball-3.0.1/compiler/space.c:282:5: branch_false: ...to here snowball-3.0.1/compiler/space.c:282:5: call_function: inlined call to ‘str_append_ch’ from ‘str_append_wchar_as_utf8’ snowball-3.0.1/compiler/space.c:282:5: call_function: inlined call to ‘str_append_ch’ from ‘str_append_wchar_as_utf8’ snowball-3.0.1/compiler/space.c:283:5: call_function: inlined call to ‘str_append_ch’ from ‘str_append_wchar_as_utf8’ snowball-3.0.1/compiler/space.c:283:5: call_function: inlined call to ‘str_append_ch’ from ‘str_append_wchar_as_utf8’ snowball-3.0.1/compiler/space.c:284:5: call_function: inlined call to ‘str_append_ch’ from ‘str_append_wchar_as_utf8’ # 157| CAPACITY(p) = n; # 158| SIZE(p) = 0; # 159|-> return p; # 160| } # 161| Error: GCC_ANALYZER_WARNING (CWE-457): [#def3] snowball-3.0.1/compiler/space.c:173:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘p’ snowball-3.0.1/compiler/space.c:255:13: enter_function: entry to ‘str_append_s’ snowball-3.0.1/compiler/space.c:256:17: call_function: calling ‘add_s_to_s’ from ‘str_append_s’ # 171| extern byte * increase_capacity_s(byte * p, int n) { # 172| byte * q = create_s(CAPACITY(p) + n + EXTENDER); # 173|-> memmove(q, p, CAPACITY(p)); # 174| SIZE(q) = SIZE(p); # 175| lose_s(p); Error: GCC_ANALYZER_WARNING (CWE-476): [#def4] snowball-3.0.1/examples/stemwords.c:44:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘b’ snowball-3.0.1/examples/stemwords.c:115:1: enter_function: entry to ‘main’ snowball-3.0.1/examples/stemwords.c:175:12: branch_false: following ‘false’ branch (when ‘in’ is NULL)... snowball-3.0.1/examples/stemwords.c:175:5: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:176:8: branch_false: following ‘false’ branch (when ‘f_in’ is non-NULL)... snowball-3.0.1/examples/stemwords.c:180:13: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:180:13: branch_false: following ‘false’ branch (when ‘out’ is NULL)... snowball-3.0.1/examples/stemwords.c:180:5: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:181:8: branch_false: following ‘false’ branch (when ‘f_out’ is non-NULL)... snowball-3.0.1/examples/stemwords.c:187:15: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:188:8: branch_false: following ‘false’ branch... snowball-3.0.1/examples/stemwords.c:197:5: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:197:5: call_function: calling ‘stem_file’ from ‘main’ # 42| ch = tolower(ch); # 43| # 44|-> b[i] = ch; # 45| i++; # 46| ch = getc(f_in); Error: GCC_ANALYZER_WARNING (CWE-401): [#def5] snowball-3.0.1/examples/stemwords.c:50:45: warning[-Wanalyzer-malloc-leak]: leak of ‘b’ snowball-3.0.1/examples/stemwords.c:20:35: acquire_memory: allocated here snowball-3.0.1/examples/stemwords.c:24:12: branch_false: following ‘false’ branch... snowball-3.0.1/examples/stemwords.c:24:12: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:30:20: branch_false: following ‘false’ branch... snowball-3.0.1/examples/stemwords.c:50:45: branch_false: ...to here snowball-3.0.1/examples/stemwords.c:50:45: throw: if ‘sb_stemmer_stem’ throws an exception... snowball-3.0.1/examples/stemwords.c:50:45: danger: ‘b’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0) # 48| # 49| { # 50|-> const sb_symbol * stemmed = sb_stemmer_stem(stemmer, b, i); # 51| if (stemmed == NULL) # 52| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def6] snowball-3.0.1/libstemmer/libstemmer.c:56:20: warning[-Wanalyzer-malloc-leak]: leak of ‘stemmer’ snowball-3.0.1/libstemmer/libstemmer.c:42:8: branch_false: following ‘false’ branch... snowball-3.0.1/libstemmer/libstemmer.c:42:8: branch_false: ...to here snowball-3.0.1/libstemmer/libstemmer.c:44:28: branch_true: following ‘true’ branch... snowball-3.0.1/libstemmer/libstemmer.c:45:13: branch_true: ...to here snowball-3.0.1/libstemmer/libstemmer.c:47:8: branch_false: following ‘false’ branch... snowball-3.0.1/libstemmer/libstemmer.c:49:37: branch_false: ...to here snowball-3.0.1/libstemmer/libstemmer.c:49:37: acquire_memory: allocated here snowball-3.0.1/libstemmer/libstemmer.c:50:8: branch_false: following ‘false’ branch (when ‘stemmer’ is non-NULL)... snowball-3.0.1/libstemmer/libstemmer.c:52:23: branch_false: ...to here snowball-3.0.1/libstemmer/libstemmer.c:56:20: throw: if the called function throws an exception... snowball-3.0.1/libstemmer/libstemmer.c:56:20: danger: ‘stemmer’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6) # 54| stemmer->stem = module->stem; # 55| # 56|-> stemmer->env = stemmer->create(); # 57| if (stemmer->env == NULL) # 58| { Error: GCC_ANALYZER_WARNING (CWE-401): [#def7] snowball-3.0.1/libstemmer/libstemmer.c:71:9: warning[-Wanalyzer-malloc-leak]: leak of ‘stemmer’ snowball-3.0.1/libstemmer/libstemmer.c:35:1: enter_function: entry to ‘sb_stemmer_new’ snowball-3.0.1/libstemmer/libstemmer.c:42:8: branch_false: following ‘false’ branch... snowball-3.0.1/libstemmer/libstemmer.c:42:8: branch_false: ...to here snowball-3.0.1/libstemmer/libstemmer.c:44:28: branch_true: following ‘true’ branch... snowball-3.0.1/libstemmer/libstemmer.c:45:13: branch_true: ...to here snowball-3.0.1/libstemmer/libstemmer.c:47:8: branch_false: following ‘false’ branch... snowball-3.0.1/libstemmer/libstemmer.c:49:37: branch_false: ...to here snowball-3.0.1/libstemmer/libstemmer.c:49:37: acquire_memory: allocated here snowball-3.0.1/libstemmer/libstemmer.c:50:8: branch_false: following ‘false’ branch (when ‘stemmer’ is non-NULL)... snowball-3.0.1/libstemmer/libstemmer.c:52:23: branch_false: ...to here snowball-3.0.1/libstemmer/libstemmer.c:57:8: branch_true: following ‘true’ branch... snowball-3.0.1/libstemmer/libstemmer.c:59:9: branch_true: ...to here snowball-3.0.1/libstemmer/libstemmer.c:59:9: call_function: calling ‘sb_stemmer_delete’ from ‘sb_stemmer_new’ # 69| if (stemmer == 0) return; # 70| if (stemmer->close) { # 71|-> stemmer->close(stemmer->env); # 72| stemmer->close = 0; # 73| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def8] snowball-3.0.1/runtime/api.c:11:12: warning[-Wanalyzer-malloc-leak]: leak of ‘z’ snowball-3.0.1/runtime/api.c:8:43: acquire_memory: allocated here snowball-3.0.1/runtime/api.c:9:8: branch_false: following ‘false’ branch (when ‘z’ is non-NULL)... snowball-3.0.1/runtime/api.c:10:5: branch_false: ...to here snowball-3.0.1/runtime/api.c:11:12: throw: if ‘create_s’ throws an exception... snowball-3.0.1/runtime/api.c:11:12: danger: ‘z’ leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 9| if (z == NULL) return NULL; # 10| *z = default_SN_env; # 11|-> z->p = create_s(); # 12| if (z->p == NULL) goto error; # 13| if (S_size) Error: GCC_ANALYZER_WARNING (CWE-401): [#def9] snowball-3.0.1/runtime/api.c:21:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc((long unsigned int)S_size * 8)’ snowball-3.0.1/runtime/api.c:9:8: branch_false: following ‘false’ branch (when ‘z’ is non-NULL)... snowball-3.0.1/runtime/api.c:10:5: branch_false: ...to here snowball-3.0.1/runtime/api.c:12:8: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:13:8: branch_false: ...to here snowball-3.0.1/runtime/api.c:13:8: branch_true: following ‘true’ branch (when ‘S_size != 0’)... snowball-3.0.1/runtime/api.c:16:29: branch_true: ...to here snowball-3.0.1/runtime/api.c:16:29: acquire_memory: allocated here snowball-3.0.1/runtime/api.c:17:12: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:17:12: branch_false: ...to here snowball-3.0.1/runtime/api.c:19:21: branch_true: following ‘true’ branch (when ‘i < S_size’)... snowball-3.0.1/runtime/api.c:21:17: branch_true: ...to here snowball-3.0.1/runtime/api.c:21:23: throw: if ‘create_s’ throws an exception... snowball-3.0.1/runtime/api.c:21:17: danger: ‘malloc((long unsigned int)S_size * 8)’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6) # 19| for (i = 0; i < S_size; i++) # 20| { # 21|-> z->S[i] = create_s(); # 22| if (z->S[i] == NULL) { # 23| S_size = i; Error: GCC_ANALYZER_WARNING (CWE-401): [#def10] snowball-3.0.1/runtime/api.c:21:23: warning[-Wanalyzer-malloc-leak]: leak of ‘z’ snowball-3.0.1/runtime/api.c:8:43: acquire_memory: allocated here snowball-3.0.1/runtime/api.c:9:8: branch_false: following ‘false’ branch (when ‘z’ is non-NULL)... snowball-3.0.1/runtime/api.c:10:5: branch_false: ...to here snowball-3.0.1/runtime/api.c:12:8: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:13:8: branch_false: ...to here snowball-3.0.1/runtime/api.c:13:8: branch_true: following ‘true’ branch (when ‘S_size != 0’)... snowball-3.0.1/runtime/api.c:16:29: branch_true: ...to here snowball-3.0.1/runtime/api.c:17:12: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:17:12: branch_false: ...to here snowball-3.0.1/runtime/api.c:19:21: branch_true: following ‘true’ branch (when ‘i < S_size’)... snowball-3.0.1/runtime/api.c:21:17: branch_true: ...to here snowball-3.0.1/runtime/api.c:21:23: throw: if ‘create_s’ throws an exception... snowball-3.0.1/runtime/api.c:21:23: danger: ‘z’ leaks here; was allocated at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) # 19| for (i = 0; i < S_size; i++) # 20| { # 21|-> z->S[i] = create_s(); # 22| if (z->S[i] == NULL) { # 23| S_size = i; Error: GCC_ANALYZER_WARNING (CWE-401): [#def11] snowball-3.0.1/runtime/api.c:49:13: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ snowball-3.0.1/runtime/api.c:5:24: enter_function: entry to ‘SN_create_env’ snowball-3.0.1/runtime/api.c:9:8: branch_false: following ‘false’ branch (when ‘z’ is non-NULL)... snowball-3.0.1/runtime/api.c:10:5: branch_false: ...to here snowball-3.0.1/runtime/api.c:12:8: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:13:8: branch_false: ...to here snowball-3.0.1/runtime/api.c:13:8: branch_true: following ‘true’ branch (when ‘S_size != 0’)... snowball-3.0.1/runtime/api.c:16:29: branch_true: ...to here snowball-3.0.1/runtime/api.c:16:29: acquire_memory: allocated here snowball-3.0.1/runtime/api.c:17:12: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:17:12: branch_false: ...to here snowball-3.0.1/runtime/api.c:22:16: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:19:33: branch_false: ...to here snowball-3.0.1/runtime/api.c:29:8: branch_true: following ‘true’ branch (when ‘I_size != 0’)... snowball-3.0.1/runtime/api.c:31:24: branch_true: ...to here snowball-3.0.1/runtime/api.c:32:12: branch_true: following ‘true’ branch... snowball-3.0.1/runtime/api.c:32:9: branch_true: ...to here snowball-3.0.1/runtime/api.c:37:5: call_function: calling ‘SN_close_env’ from ‘SN_create_env’ # 47| for (i = 0; i < S_size; i++) # 48| { # 49|-> lose_s(z->S[i]); # 50| } # 51| free(z->S); Error: GCC_ANALYZER_WARNING (CWE-401): [#def12] snowball-3.0.1/runtime/api.c:49:13: warning[-Wanalyzer-malloc-leak]: leak of ‘z’ snowball-3.0.1/runtime/api.c:5:24: enter_function: entry to ‘SN_create_env’ snowball-3.0.1/runtime/api.c:8:43: acquire_memory: allocated here snowball-3.0.1/runtime/api.c:9:8: branch_false: following ‘false’ branch (when ‘z’ is non-NULL)... snowball-3.0.1/runtime/api.c:10:5: branch_false: ...to here snowball-3.0.1/runtime/api.c:12:8: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:13:8: branch_false: ...to here snowball-3.0.1/runtime/api.c:13:8: branch_true: following ‘true’ branch (when ‘S_size != 0’)... snowball-3.0.1/runtime/api.c:16:29: branch_true: ...to here snowball-3.0.1/runtime/api.c:17:12: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:17:12: branch_false: ...to here snowball-3.0.1/runtime/api.c:22:16: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:19:33: branch_false: ...to here snowball-3.0.1/runtime/api.c:29:8: branch_true: following ‘true’ branch (when ‘I_size != 0’)... snowball-3.0.1/runtime/api.c:31:24: branch_true: ...to here snowball-3.0.1/runtime/api.c:32:12: branch_true: following ‘true’ branch... snowball-3.0.1/runtime/api.c:32:9: branch_true: ...to here snowball-3.0.1/runtime/api.c:37:5: call_function: calling ‘SN_close_env’ from ‘SN_create_env’ # 47| for (i = 0; i < S_size; i++) # 48| { # 49|-> lose_s(z->S[i]); # 50| } # 51| free(z->S); Error: GCC_ANALYZER_WARNING (CWE-401): [#def13] snowball-3.0.1/runtime/api.c:54:15: warning[-Wanalyzer-malloc-leak]: leak of ‘z’ snowball-3.0.1/runtime/api.c:5:24: enter_function: entry to ‘SN_create_env’ snowball-3.0.1/runtime/api.c:8:43: acquire_memory: allocated here snowball-3.0.1/runtime/api.c:9:8: branch_false: following ‘false’ branch (when ‘z’ is non-NULL)... snowball-3.0.1/runtime/api.c:10:5: branch_false: ...to here snowball-3.0.1/runtime/api.c:12:8: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/api.c:13:8: branch_false: ...to here snowball-3.0.1/runtime/api.c:13:8: branch_true: following ‘true’ branch (when ‘S_size != 0’)... snowball-3.0.1/runtime/api.c:16:29: branch_true: ...to here snowball-3.0.1/runtime/api.c:17:12: branch_true: following ‘true’ branch... snowball-3.0.1/runtime/api.c:17:9: branch_true: ...to here snowball-3.0.1/runtime/api.c:37:5: call_function: calling ‘SN_close_env’ from ‘SN_create_env’ # 52| } # 53| free(z->I); # 54|-> if (z->p) lose_s(z->p); # 55| free(z); # 56| } Error: CPPCHECK_WARNING (CWE-401): [#def14] snowball-3.0.1/runtime/utilities.c:17: error[memleak]: Memory leak: mem # 15| CAPACITY(p) = CREATE_SIZE; # 16| SET_SIZE(p, 0); # 17|-> return p; # 18| } # 19| Error: CPPCHECK_WARNING (CWE-401): [#def15] snowball-3.0.1/runtime/utilities.c:371: error[memleak]: Memory leak: mem # 369| q = (symbol *) (HEAD + (char *)mem); # 370| CAPACITY(q) = new_size; # 371|-> return q; # 372| } # 373| Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] snowball-3.0.1/runtime/utilities.c:406:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’ snowball-3.0.1/runtime/utilities.c:379:12: enter_function: entry to ‘replace_s’ snowball-3.0.1/runtime/utilities.c:383:8: branch_true: following ‘true’ branch... snowball-3.0.1/runtime/utilities.c:384:16: branch_true: ...to here snowball-3.0.1/runtime/utilities.c:384:16: call_function: calling ‘create_s’ from ‘replace_s’ snowball-3.0.1/runtime/utilities.c:384:16: return_function: returning to ‘replace_s’ from ‘create_s’ snowball-3.0.1/runtime/utilities.c:385:12: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/utilities.c:387:27: branch_false: ...to here snowball-3.0.1/runtime/utilities.c:404:8: branch_false: following ‘false’ branch (when ‘s_size == 0’)... snowball-3.0.1/runtime/utilities.c:405:8: branch_false: ...to here snowball-3.0.1/runtime/utilities.c:405:8: branch_true: following ‘true’ branch (when ‘adjptr’ is non-NULL)... snowball-3.0.1/runtime/utilities.c:406:9: branch_true: ...to here snowball-3.0.1/runtime/utilities.c:406:9: danger: ‘<unknown>’ leaks here; was allocated at [(6)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/5) # 404| if (s_size) memmove(z->p + c_bra, s, s_size * sizeof(symbol)); # 405| if (adjptr != NULL) # 406|-> *adjptr = adjustment; # 407| return 0; # 408| } Error: GCC_ANALYZER_WARNING (CWE-465): [#def17] snowball-3.0.1/runtime/utilities.c:462:16: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it snowball-3.0.1/runtime/utilities.c:453:17: enter_function: entry to ‘slice_to’ snowball-3.0.1/runtime/utilities.c:454:8: branch_false: following ‘false’ branch... snowball-3.0.1/runtime/utilities.c:459:19: branch_false: ...to here snowball-3.0.1/runtime/utilities.c:460:12: branch_true: following ‘true’ branch... snowball-3.0.1/runtime/utilities.c:461:17: branch_true: ...to here snowball-3.0.1/runtime/utilities.c:461:17: call_function: calling ‘increase_size’ from ‘slice_to’ snowball-3.0.1/runtime/utilities.c:461:17: return_function: returning to ‘slice_to’ from ‘increase_size’ snowball-3.0.1/runtime/utilities.c:462:16: danger: pointer ‘p’ is checked for NULL here but it was already dereferenced at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3) # 460| if (CAPACITY(p) < len) { # 461| p = increase_size(p, len); # 462|-> if (p == NULL) # 463| return NULL; # 464| } Error: GCC_ANALYZER_WARNING (CWE-465): [#def18] snowball-3.0.1/runtime/utilities.c:475:12: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it snowball-3.0.1/runtime/utilities.c:471:17: enter_function: entry to ‘assign_to’ snowball-3.0.1/runtime/utilities.c:473:8: branch_true: following ‘true’ branch... snowball-3.0.1/runtime/utilities.c:474:13: branch_true: ...to here snowball-3.0.1/runtime/utilities.c:474:13: call_function: calling ‘increase_size’ from ‘assign_to’ snowball-3.0.1/runtime/utilities.c:474:13: return_function: returning to ‘assign_to’ from ‘increase_size’ snowball-3.0.1/runtime/utilities.c:475:12: danger: pointer ‘p’ is checked for NULL here but it was already dereferenced at [(2)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/1) # 473| if (CAPACITY(p) < len) { # 474| p = increase_size(p, len); # 475|-> if (p == NULL) # 476| return NULL; # 477| }
| 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 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-59.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 | snowball-3.0.1-8.fc44 |
| store-results-to | /tmp/tmpa6ujo5ri/snowball-3.0.1-8.fc44.tar.xz |
| time-created | 2026-01-08 21:44:56 |
| time-finished | 2026-01-08 21:46:50 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,cppcheck,clippy,shellcheck,unicontrol' '-o' '/tmp/tmpa6ujo5ri/snowball-3.0.1-8.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpa6ujo5ri/snowball-3.0.1-8.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251215.161544.g62de9a5-1.el9 |