Task #130950 - fixed.err
back to task #130950download
Error: GCC_ANALYZER_WARNING (CWE-476):
gawk-5.3.2/awkgram.y:6106:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gawk-5.3.2/awkgram.y:6077:1: enter_function: entry to ‘mk_getline’
gawk-5.3.2/awkgram.y:6101:12: branch_true: following ‘true’ branch (when ‘var’ is non-NULL)...
gawk-5.3.2/awkgram.y:6102:38: branch_true: ...to here
gawk-5.3.2/awkgram.y:6102:22: call_function: inlined call to ‘make_assignable’ from ‘mk_getline’
gawk-5.3.2/awkgram.y:6106:21: danger: dereference of NULL ‘<unknown>’
# 6104|
# 6105| /* check if we need after_assign bytecode */
# 6106|-> if (tp->opcode == Op_push_lhs
# 6107| && tp->memory->type == Node_var
# 6108| && tp->memory->var_assign
Error: COMPILER_WARNING:
gawk-5.3.2/extension/readdir.c: scope_hint: In function 'dir_get_record'
gawk-5.3.2/extension/readdir.c:221:27: warning[-Warray-bounds=]: array subscript 1 is above array bounds of 'struct awk_field_info[1]'
# 221 | the_dir->fw.fields[1].len = flen-1;
# | ~~~~~~~~~~~~~~~~~~^~~
gawk-5.3.2/extension/readdir.c:65: included_from: Included from here.
gawk-5.3.2/gawkapi.h:142:11: note: while referencing 'fields'
# 142 | } fields[1]; /* actual dimension should be nf */
# | ^~~~~~
# 219| the_dir->fw.fields[0].len = len;
# 220| len += (flen = sprintf(the_dir->buf + len, "/%s", dirent->d_name));
# 221|-> the_dir->fw.fields[1].len = flen-1;
# 222|
# 223| ftstr = ftype(dirent, iobuf->name);
Error: COMPILER_WARNING:
gawk-5.3.2/extension/readdir.c:225:27: warning[-Warray-bounds=]: array subscript 2 is above array bounds of 'struct awk_field_info[1]'
# 225 | the_dir->fw.fields[2].len = flen-1;
# | ~~~~~~~~~~~~~~~~~~^~~
gawk-5.3.2/gawkapi.h:142:11: note: while referencing 'fields'
# 142 | } fields[1]; /* actual dimension should be nf */
# | ^~~~~~
# 223| ftstr = ftype(dirent, iobuf->name);
# 224| len += (flen = sprintf(the_dir->buf + len, "/%s", ftstr));
# 225|-> the_dir->fw.fields[2].len = flen-1;
# 226|
# 227| *out = the_dir->buf;
Error: COMPILER_WARNING:
gawk-5.3.2/extension/readdir.c: scope_hint: In function 'dir_take_control_of'
gawk-5.3.2/extension/readdir.c:303:27: warning[-Warray-bounds=]: array subscript 1 is above array bounds of 'struct awk_field_info[1]'
# 303 | the_dir->fw.fields[1].skip = 1; /* single '/' separator */
# | ~~~~~~~~~~~~~~~~~~^~~
gawk-5.3.2/gawkapi.h:142:11: note: while referencing 'fields'
# 142 | } fields[1]; /* actual dimension should be nf */
# | ^~~~~~
# 301| the_dir->fw.nf = 3;
# 302| the_dir->fw.fields[0].skip = 0; /* no leading space */
# 303|-> the_dir->fw.fields[1].skip = 1; /* single '/' separator */
# 304| the_dir->fw.fields[2].skip = 1; /* single '/' separator */
# 305| size = sizeof(struct dirent) + 21 /* max digits in inode */ + 2 /* slashes */;
Error: COMPILER_WARNING:
gawk-5.3.2/extension/readdir.c:304:27: warning[-Warray-bounds=]: array subscript 2 is above array bounds of 'struct awk_field_info[1]'
# 304 | the_dir->fw.fields[2].skip = 1; /* single '/' separator */
# | ~~~~~~~~~~~~~~~~~~^~~
gawk-5.3.2/gawkapi.h:142:11: note: while referencing 'fields'
# 142 | } fields[1]; /* actual dimension should be nf */
# | ^~~~~~
# 302| the_dir->fw.fields[0].skip = 0; /* no leading space */
# 303| the_dir->fw.fields[1].skip = 1; /* single '/' separator */
# 304|-> the_dir->fw.fields[2].skip = 1; /* single '/' separator */
# 305| size = sizeof(struct dirent) + 21 /* max digits in inode */ + 2 /* slashes */;
# 306| emalloc(the_dir->buf, char *, size, "dir_take_control_of");
Error: GCC_ANALYZER_WARNING (CWE-476):
gawk-5.3.2/gawkapi.c:870:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gawk-5.3.2/gawkapi.c:829:1: enter_function: entry to ‘api_sym_update’
gawk-5.3.2/gawkapi.c:862:16: call_function: calling ‘ns_lookup’ from ‘api_sym_update’
gawk-5.3.2/gawkapi.c:862:16: return_function: returning to ‘api_sym_update’ from ‘ns_lookup’
gawk-5.3.2/gawkapi.c:864:12: branch_true: following ‘true’ branch...
gawk-5.3.2/gawkapi.c:866:21: branch_true: ...to here
gawk-5.3.2/gawkapi.c:866:20: branch_true: following ‘true’ branch...
gawk-5.3.2/gawkapi.c:867:38: branch_true: ...to here
gawk-5.3.2/gawkapi.c:867:38: call_function: calling ‘awk_value_to_node’ from ‘api_sym_update’
gawk-5.3.2/gawkapi.c:867:38: return_function: returning to ‘api_sym_update’ from ‘awk_value_to_node’
gawk-5.3.2/gawkapi.c:870:25: danger: dereference of NULL ‘awk_value_to_node(value)’
# 868| node = install_symbol(full_name, Node_var_array);
# 869| array_node->vname = node->vname;
# 870|-> *node = *array_node;
# 871| freenode(array_node);
# 872| value->array_cookie = node; /* pass new cookie back to extension */
Error: GCC_ANALYZER_WARNING (CWE-476):
gawk-5.3.2/gawkapi.c:902:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
gawk-5.3.2/gawkapi.c:829:1: enter_function: entry to ‘api_sym_update’
gawk-5.3.2/gawkapi.c:862:16: call_function: calling ‘ns_lookup’ from ‘api_sym_update’
gawk-5.3.2/gawkapi.c:862:16: return_function: returning to ‘api_sym_update’ from ‘ns_lookup’
gawk-5.3.2/gawkapi.c:864:12: branch_false: following ‘false’ branch...
gawk-5.3.2/gawkapi.c:887:17: branch_false: ...to here
gawk-5.3.2/gawkapi.c:887:12: branch_false: following ‘false’ branch...
gawk-5.3.2/gawkapi.c:888:16: branch_false: ...to here
gawk-5.3.2/gawkapi.c:887:16: branch_false: following ‘false’ branch...
gawk-5.3.2/gawkapi.c:894:9: branch_false: ...to here
gawk-5.3.2/gawkapi.c:896:12: branch_true: following ‘true’ branch...
gawk-5.3.2/gawkapi.c:897:21: branch_true: ...to here
gawk-5.3.2/gawkapi.c:897:20: branch_true: following ‘true’ branch...
gawk-5.3.2/gawkapi.c:899:38: branch_true: ...to here
gawk-5.3.2/gawkapi.c:899:38: call_function: calling ‘awk_value_to_node’ from ‘api_sym_update’
gawk-5.3.2/gawkapi.c:899:38: return_function: returning to ‘api_sym_update’ from ‘awk_value_to_node’
gawk-5.3.2/gawkapi.c:901:25: call_function: inlined call to ‘unref’ from ‘api_sym_update’
gawk-5.3.2/gawkapi.c:902:25: branch_false: ...to here
gawk-5.3.2/gawkapi.c:902:25: danger: dereference of NULL ‘awk_value_to_node(value)’
# 900| array_node->vname = node->vname;
# 901| unref(node->var_value);
# 902|-> *node = *array_node;
# 903| freenode(array_node);
# 904| value->array_cookie = node; /* pass new cookie back to extension */
Error: GCC_ANALYZER_WARNING (CWE-476):
gawk-5.3.2/gawkapi.c:1105:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1103| tmp = awk_value_to_node(index);
# 1104| elem = awk_value_to_node(value);
# 1105|-> if (elem->type == Node_var_array) {
# 1106| elem->parent_array = array;
# 1107| elem->vname = estrdup(index->str_value.str,
Error: GCC_ANALYZER_WARNING (CWE-775):
gawk-5.3.2/io.c:689:16: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘ret’
gawk-5.3.2/io.c:2822:1: enter_function: entry to ‘do_getline_redir’
gawk-5.3.2/io.c:2835:12: branch_false: following ‘false’ branch (when ‘into_variable == 0’)...
gawk-5.3.2/io.c:2839:21: branch_false: ...to here
gawk-5.3.2/io.c:2840:14: call_function: calling ‘redirect’ from ‘do_getline_redir’
# 687| }
# 688| efree(iop);
# 689|-> return ret == -1 ? 1 : 0;
# 690| }
# 691|
Error: GCC_ANALYZER_WARNING (CWE-775):
gawk-5.3.2/io.c:2704:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup(p[1])’
gawk-5.3.2/io.c:2822:1: enter_function: entry to ‘do_getline_redir’
gawk-5.3.2/io.c:2835:12: branch_false: following ‘false’ branch (when ‘into_variable == 0’)...
gawk-5.3.2/io.c:2839:21: branch_false: ...to here
gawk-5.3.2/io.c:2840:14: call_function: calling ‘redirect’ from ‘do_getline_redir’
# 2702| fatal(_("close of stdout in child failed: %s"),
# 2703| strerror(errno));
# 2704|-> if (dup(p[1]) != 1)
# 2705| fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
# 2706| if (close(p[0]) == -1 || close(p[1]) == -1)
Error: GCC_ANALYZER_WARNING (CWE-457):
gawk-5.3.2/io.c:2704:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘p[1]’
gawk-5.3.2/io.c:2822:1: enter_function: entry to ‘do_getline_redir’
gawk-5.3.2/io.c:2835:12: branch_false: following ‘false’ branch (when ‘into_variable == 0’)...
gawk-5.3.2/io.c:2839:21: branch_false: ...to here
gawk-5.3.2/io.c:2840:14: call_function: calling ‘redirect’ from ‘do_getline_redir’
# 2702| fatal(_("close of stdout in child failed: %s"),
# 2703| strerror(errno));
# 2704|-> if (dup(p[1]) != 1)
# 2705| fatal(_("moving pipe to stdout in child failed (dup: %s)"), strerror(errno));
# 2706| if (close(p[0]) == -1 || close(p[1]) == -1)
Error: GCC_ANALYZER_WARNING (CWE-457):
gawk-5.3.2/io.c:2715:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘p[0]’
gawk-5.3.2/io.c:2822:1: enter_function: entry to ‘do_getline_redir’
gawk-5.3.2/io.c:2835:12: branch_false: following ‘false’ branch (when ‘into_variable == 0’)...
gawk-5.3.2/io.c:2839:21: branch_false: ...to here
gawk-5.3.2/io.c:2840:14: call_function: calling ‘redirect’ from ‘do_getline_redir’
# 2713|
# 2714| if (pid == -1) {
# 2715|-> close(p[0]); close(p[1]);
# 2716| fatal(_("cannot create child process for `%s' (fork: %s)"), cmd, strerror(errno));
# 2717| }
Error: COMPILER_WARNING:
gawk-5.3.2/main.c: scope_hint: In function ‘init_fds’
gawk-5.3.2/main.c:1383:13: warning[-Wunused-but-set-variable=]: variable ‘newfd’ set but not used
# 1383 | int newfd;
# | ^~~~~
# 1381| struct stat sbuf;
# 1382| int fd;
# 1383|-> int newfd;
# 1384| char const *const opposite_mode[] = {"w", "r", "r"};
# 1385|
Error: GCC_ANALYZER_WARNING (CWE-476):
gawk-5.3.2/str_array.c:853:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 851| assert(val != NULL);
# 852|
# 853|-> newval = (*val)->stptr;
# 854| if (newval == NULL)
# 855| newval = "";
Error: COMPILER_WARNING (CWE-704):
gawk-5.3.2/support/dfa.c: scope_hint: In function ‘comsubs’
gawk-5.3.2/support/dfa.c:4060:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 4060 | char *rcp = strchr (right, *lcp);
# | ^~~~~~
# 4058| {
# 4059| idx_t len = 0;
# 4060|-> char *rcp = strchr (right, *lcp);
# 4061| while (rcp != NULL)
# 4062| {
Error: COMPILER_WARNING (CWE-704):
gawk-5.3.2/support/dfa.c:4060:19: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 4058| {
# 4059| idx_t len = 0;
# 4060|-> char *rcp = strchr (right, *lcp);
# 4061| while (rcp != NULL)
# 4062| {
Error: COMPILER_WARNING:
gawk-5.3.2/support/pma.c: scope_hint: In function ‘integrity_check’
gawk-5.3.2/support/pma.c:229:21: warning[-Wunused-but-set-variable=]: variable ‘nrev’ set but not used
# 229 | int nfwd = 0, nrev = 0; // count how many we find going forward and reverse
# | ^~~~
# 227| assert(f->fnext == f);
# 228| else {
# 229|-> int nfwd = 0, nrev = 0; // count how many we find going forward and reverse
# 230| for (p = f->fnext; p != f; p = p->fnext) { nfwd++; assert(VAF(p)); assert(0 == getbit(p, IU)); }
# 231| for (p = f->fprev; p != f; p = p->fprev) { nrev++; assert(VAF(p)); assert(0 == getbit(p, IU)); }