snowball-2.2.0-11.fc41
List of Defects
Error: CPPCHECK_WARNING: [#def1]
snowball-2.2.0-build/snowball-2.2.0/compiler/analyser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def2]
snowball-2.2.0-build/snowball-2.2.0/compiler/driver.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def3]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def4]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_comment_content’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:135:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_comment_content’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_comment_content’
# 133|
# 134| void write_comment_content(struct generator * g, struct node * p) {
# 135|-> switch (p->type) {
# 136| case c_mathassign:
# 137| case c_plusassign:
Error: GCC_ANALYZER_WARNING (CWE-476): [#def5]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wk’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:199:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wk’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wk’
# 197| static void wk(struct generator * g, struct node * p, int keep_limit) {
# 198| ++g->keep_count;
# 199|-> if (p->mode == m_forward) {
# 200| write_string(g, "int c");
# 201| write_int(g, g->keep_count);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def6]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestore’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:223:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestore’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestore’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestore’
# 221|
# 222| static void wrestore(struct generator * g, struct node * p, int keep_token) { /* restore c */
# 223|-> if (p->mode == m_forward) {
# 224| write_string(g, "z->c = c");
# 225| } else {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def7]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestorelimit’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:232:10: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestorelimit’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestorelimit’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘wrestorelimit’
# 230|
# 231| static void wrestorelimit(struct generator * g, struct node * p, int keep_token) { /* restore limit */
# 232|-> if (p->mode == m_forward) {
# 233| w(g, "z->l += mlimit");
# 234| } else {
Error: GCC_ANALYZER_WARNING (CWE-476): [#def8]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:241:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘writef’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘writef’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘writef’
# 239|
# 240| static void winc(struct generator * g, struct node * p) { /* increment c */
# 241|-> write_string(g, p->mode == m_forward ? "z->c++;" :
# 242| "z->c--;");
# 243| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_check_limit’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:284:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_check_limit’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_check_limit’
# 282| static void write_check_limit(struct generator * g, struct node * p) {
# 283|
# 284|-> write_string(g, p->mode == m_forward ? "if (z->c >= z->l) " :
# 285| "if (z->c <= z->lb) ");
# 286| write_failure(g, p);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def10]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_data_address’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:290:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_data_address’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘write_data_address’
# 288|
# 289| static void write_data_address(struct generator * g, struct node * p) {
# 290|-> symbol * b = p->literalstring;
# 291| if (b != 0) {
# 292| write_int(g, SIZE(b)); w(g, ", ");
Error: GCC_ANALYZER_WARNING (CWE-476): [#def11]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘writef’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c:334:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘writef’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator.c: scope_hint: In function ‘writef’
# 332| case '-': g->margin--; continue;
# 333| case '$': /* insert_s, insert_v etc */
# 334|-> write_char(g, p->literalstring == 0 ? 'v' : 's');
# 335| continue;
# 336| case 'p': write_string(g, g->options->externals_prefix); continue;
Error: CPPCHECK_WARNING: [#def12]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_ada.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: COMPILER_WARNING (CWE-457): [#def13]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_ada.c:462:9: warning[-Wmaybe-uninitialized]: ‘savevar’ may be used uninitialized
# 462 | str_delete(savevar);
# | ^~~~~~~~~~~~~~~~~~~
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_ada.c: scope_hint: In function ‘generate.part.0’
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_ada.c:442:18: note: ‘savevar’ was declared here
# 442 | struct str * savevar;
# | ^~~~~~~
# 460|
# 461| if (keep_c) {
# 462|-> str_delete(savevar);
# 463| }
# 464| }
Error: CLANG_WARNING: [#def14]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_ada.c:1488:23: warning[deadcode.DeadStores]: Value stored to 'v' during its initialization is never read
# 1486| static int generate_among_table(struct generator * g, struct among * x, int start_pos, int *operation) {
# 1487| int i;
# 1488|-> struct amongvec * v = x->b;
# 1489|
# 1490| g->I[0] = x->number;
Error: CLANG_WARNING: [#def15]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_ada.c:1567:20: warning[deadcode.DeadStores]: Value stored to 'a' during its initialization is never read
# 1565|
# 1566| static int generate_operations_dispatcher(struct generator * g) {
# 1567|-> struct among * a = g->analyser->amongs;
# 1568| int i;
# 1569| int operation = 0;
Error: CPPCHECK_WARNING: [#def16]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_csharp.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def17]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_go.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def18]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_java.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def19]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_js.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def20]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_pascal.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def21]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_python.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def22]
snowball-2.2.0-build/snowball-2.2.0/compiler/generator_rust.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def23]
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c: scope_hint: In function ‘create_b’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:55:17: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc((long unsigned int)(int)((unsigned int)((long unsigned int)n + 5) * 2))’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:6: included_from: Included from here.
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:54:46: note: in expansion of macro ‘MALLOC’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c: scope_hint: In function ‘create_b’
# 53| extern symbol * create_b(int n) {
# 54| symbol * p = (symbol *) (HEAD + (char *) MALLOC(HEAD + (n + 1) * sizeof(symbol)));
# 55|-> CAPACITY(p) = n;
# 56| SIZE(p) = 0;
# 57| return p;
Error: GCC_ANALYZER_WARNING (CWE-457): [#def24]
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c: scope_hint: In function ‘increase_capacity’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:82:5: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘p’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:54:46: note: in expansion of macro ‘MALLOC’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c: scope_hint: In function ‘increase_capacity’
# 80| extern symbol * increase_capacity(symbol * p, int n) {
# 81| symbol * q = create_b(CAPACITY(p) + n + EXTENDER);
# 82|-> memmove(q, p, CAPACITY(p) * sizeof(symbol));
# 83| SIZE(q) = SIZE(p);
# 84| lose_b(p); return q;
Error: GCC_ANALYZER_WARNING (CWE-476): [#def25]
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c: scope_hint: In function ‘b_to_s’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:130:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘s’
# 128| exit(1);
# 129| }
# 130|-> s[i] = (char)p[i];
# 131| }
# 132| }
Error: GCC_ANALYZER_WARNING (CWE-476): [#def26]
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c: scope_hint: In function ‘str_new’
snowball-2.2.0-build/snowball-2.2.0/compiler/space.c:169:18: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘output’
# 167|
# 168| struct str * output = (struct str *) malloc(sizeof(struct str));
# 169|-> output->data = create_b(0);
# 170| return output;
# 171| }
Error: CPPCHECK_WARNING: [#def27]
snowball-2.2.0-build/snowball-2.2.0/compiler/tokeniser.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING: [#def28]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def29]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c: scope_hint: In function ‘stem_file’
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:44:22: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘b’
# 42| ch = tolower(ch);
# 43|
# 44|-> b[i] = ch;
# 45| i++;
# 46| ch = getc(f_in);
Error: GCC_ANALYZER_WARNING (CWE-688): [#def30]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:58:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘b’ where non-null expected
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:5: included_from: Included from here.
/usr/include/stdio.h:735:15: note: argument 1 of ‘fwrite’ must be non-null
# 56|
# 57| if (pretty == 1) {
# 58|-> fwrite(b, i, 1, f_out);
# 59| fputs(" -> ", f_out);
# 60| } else if (pretty == 2) {
Error: GCC_ANALYZER_WARNING (CWE-688): [#def31]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:61:21: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘b’ where non-null expected
/usr/include/stdio.h:735:15: note: argument 1 of ‘fwrite’ must be non-null
# 59| fputs(" -> ", f_out);
# 60| } else if (pretty == 2) {
# 61|-> fwrite(b, i, 1, f_out);
# 62| if (sb_stemmer_length(stemmer) > 0) {
# 63| int j;
Error: GCC_ANALYZER_WARNING (CWE-775): [#def32]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c: scope_hint: In function ‘main’
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:181:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘<unknown>’
# 179| }
# 180| f_out = (out == 0) ? stdout : fopen(out, "w");
# 181|-> if (f_out == 0) {
# 182| fprintf(stderr, "file %s cannot be opened\n", out);
# 183| exit(1);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def33]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:181:8: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 179| }
# 180| f_out = (out == 0) ? stdout : fopen(out, "w");
# 181|-> if (f_out == 0) {
# 182| fprintf(stderr, "file %s cannot be opened\n", out);
# 183| exit(1);
Error: GCC_ANALYZER_WARNING (CWE-775): [#def34]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:188:8: warning[-Wanalyzer-file-leak]: leak of FILE ‘<unknown>’
# 186| /* do the stemming process: */
# 187| stemmer = sb_stemmer_new(language, charenc);
# 188|-> if (stemmer == 0) {
# 189| if (charenc == NULL) {
# 190| fprintf(stderr, "language `%s' not available for stemming\n", language);
Error: GCC_ANALYZER_WARNING (CWE-401): [#def35]
snowball-2.2.0-build/snowball-2.2.0/examples/stemwords.c:188:8: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 186| /* do the stemming process: */
# 187| stemmer = sb_stemmer_new(language, charenc);
# 188|-> if (stemmer == 0) {
# 189| if (charenc == NULL) {
# 190| fprintf(stderr, "language `%s' not available for stemming\n", language);
Error: CPPCHECK_WARNING: [#def36]
snowball-2.2.0-build/snowball-2.2.0/libstemmer/libstemmer.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: GCC_ANALYZER_WARNING (CWE-476): [#def37]
snowball-2.2.0-build/snowball-2.2.0/runtime/api.c:44:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘*z.S + (long unsigned int)i * 8’
# 42| for (i = 0; i < S_size; i++)
# 43| {
# 44|-> lose_s(z->S[i]);
# 45| }
# 46| free(z->S);
Error: GCC_ANALYZER_WARNING (CWE-476): [#def38]
snowball-2.2.0-build/snowball-2.2.0/runtime/api.c: scope_hint: In function ‘SN_close_env’
snowball-2.2.0-build/snowball-2.2.0/runtime/api.c:44:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 42| for (i = 0; i < S_size; i++)
# 43| {
# 44|-> lose_s(z->S[i]);
# 45| }
# 46| free(z->S);
Error: CLANG_WARNING: [#def39]
snowball-2.2.0-build/snowball-2.2.0/runtime/api.c:44:20: warning[core.NullDereference]: Array access (via field 'S') results in a null pointer dereference
# 42| for (i = 0; i < S_size; i++)
# 43| {
# 44|-> lose_s(z->S[i]);
# 45| }
# 46| free(z->S);
Error: CPPCHECK_WARNING: [#def40]
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.
Error: CPPCHECK_WARNING (CWE-401): [#def41]
snowball-2.2.0-build/snowball-2.2.0/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): [#def42]
snowball-2.2.0-build/snowball-2.2.0/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): [#def43]
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c: scope_hint: In function ‘replace_s’
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c:406:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
# 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): [#def44]
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c: scope_hint: In function ‘slice_to’
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c:462:16: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c:6: included_from: Included from here.
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c:460:13: note: in expansion of macro ‘CAPACITY’
# 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): [#def45]
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c: scope_hint: In function ‘assign_to’
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c:475:12: warning[-Wanalyzer-deref-before-check]: check of ‘p’ for NULL after already dereferencing it
snowball-2.2.0-build/snowball-2.2.0/runtime/utilities.c:473:9: note: in expansion of macro ‘CAPACITY’
# 473| if (CAPACITY(p) < len) {
# 474| p = increase_size(p, len);
# 475|-> if (p == NULL)
# 476| return NULL;
# 477| }
Scan Properties
analyzer-version-clang | 18.1.7 |
analyzer-version-cppcheck | 2.14.2 |
analyzer-version-gcc | 14.1.1 |
analyzer-version-gcc-analyzer | 14.1.1 |
analyzer-version-shellcheck | 0.10.0 |
enabled-plugins | clang, cppcheck, gcc, shellcheck |
exit-code | 0 |
host | ip-172-16-1-230.us-west-2.compute.internal |
mock-config | fedora-41-x86_64 |
project-name | snowball-2.2.0-11.fc41 |
store-results-to | /tmp/tmpbrf6fjpg/snowball-2.2.0-11.fc41.tar.xz |
time-created | 2024-07-03 18:05:42 |
time-finished | 2024-07-03 18:07:43 |
tool | csmock |
tool-args | '/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpbrf6fjpg/snowball-2.2.0-11.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpbrf6fjpg/snowball-2.2.0-11.fc41.src.rpm' |
tool-version | csmock-3.5.3-1.el9 |