Task #121065 - added.err

back to task #121065
download
Error: GCC_ANALYZER_WARNING (CWE-476):
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_xzy_to_ikj’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c:240:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc((long unsigned int)(hmatgridp.size[1] * 3 * hmatgridp.size[0]) * 8)’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c:12: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_private_header.h:11: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_utils.h:21: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.h:14: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c:8: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_xzy_to_ikj’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_xzy_to_ikj’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_xzy_to_ikj’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c:240:7: note: in expansion of macro ‘idx3’
#  238|     for (int i = 0; i < 3; i++) {
#  239|       for (int j = 0; j < 3; j++) {
#  240|->       idx3(hmatgridp, 0, j, i) = 1.0;
#  241|         for (int k = 1; k <= lp; k++) {
#  242|           idx3(hmatgridp, k, j, i) = idx3(hmatgridp, k - 1, j, i) * dh[j][i];

Error: GCC_ANALYZER_WARNING (CWE-476):
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_jik_to_yxz’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c:331:32: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘malloc((long unsigned int)(hmatgridp.size[1] * 3 * hmatgridp.size[0]) * 8)’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_jik_to_yxz’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_jik_to_yxz’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c: scope_hint: In function ‘grid_transform_coef_jik_to_yxz’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_coefficients.c:331:7: note: in expansion of macro ‘idx3’
#  329|     for (int i = 0; i < 3; i++) {
#  330|       for (int j = 0; j < 3; j++) {
#  331|->       idx3(hmatgridp, 0, j, i) = 1.0;
#  332|         for (int k = 1; k <= lp; k++) {
#  333|           idx3(hmatgridp, k, j, i) = idx3(hmatgridp, k - 1, j, i) * dh[j][i];

Error: GCC_ANALYZER_WARNING (CWE-476):
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘exp_i’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c:49:10: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘res’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘exp_i’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.h:13: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c:8: included_from: Included from here.
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h: scope_hint: In function ‘exp_i’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h: scope_hint: In function ‘exp_i’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘exp_i’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘exp_i’
#   47|     const double c_exp_co = exp(alpha);
#   48|     /* const double c_exp_minus_1 = 1/ c_exp; */
#   49|->   res[0] = exp(imin * alpha);
#   50|     for (int i = 1; i < (imax - imin); i++) {
#   51|       res[i] = res[i - 1] *

Error: GCC_ANALYZER_WARNING (CWE-688):
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c:219:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc((long unsigned int)max((upper_corner[2] - lower_corner[2]) * block_size[2], max((*upper_corner - *lower_corner) * *block_size, (upper_corner[1] - lower_corner[1]) * block_size[1])) * 8)’ where non-null expected
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h:14: included_from: Included from here.
/usr/include/string.h:65:14: note: argument 1 of ‘memset’ must be non-null
#  217|       if (!plane[dir]) {
#  218|         const double c_exp_const = exp(c[dir] * r_ab[d1] * r_ab[d2]);
#  219|->       memset(x1, 0, sizeof(double) * max_elem);
#  220|         memset(x2, 0, sizeof(double) * max_elem);
#  221|         /* memset(exp_tmp.data, 0, sizeof(double) * exp_tmp.alloc_size_); */

Error: GCC_ANALYZER_WARNING (CWE-688):
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c:220:7: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL ‘malloc((long unsigned int)max((upper_corner[2] - lower_corner[2]) * block_size[2], max((*upper_corner - *lower_corner) * *block_size, (upper_corner[1] - lower_corner[1]) * block_size[1])) * 8)’ where non-null expected
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_tensor_local.h: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
cp2k-0.0.0/src/grid/dgemm/grid_dgemm_non_orthorombic_corrections.c: scope_hint: In function ‘calculate_non_orthorombic_corrections_tensor_blocked’
/usr/include/string.h:65:14: note: argument 1 of ‘memset’ must be non-null
#  218|         const double c_exp_const = exp(c[dir] * r_ab[d1] * r_ab[d2]);
#  219|         memset(x1, 0, sizeof(double) * max_elem);
#  220|->       memset(x2, 0, sizeof(double) * max_elem);
#  221|         /* memset(exp_tmp.data, 0, sizeof(double) * exp_tmp.alloc_size_); */
#  222|         exp_i(-r_ab[d2] * c[dir], xmin[d1], xmax[d1] + 1, x1 + offset[d1]);