Newly introduced defects

List of Defects

Error: CPPCHECK_WARNING: [#def1]
gmp-6.3.0-build/gmp-6.3.0/gen-sieve.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: GCC_ANALYZER_WARNING (CWE-401): [#def2]
gmp-6.3.0-build/gmp-6.3.0/gen-sieve.c: scope_hint: In function ‘generate’
gmp-6.3.0-build/gmp-6.3.0/gen-sieve.c:93:1: warning[-Wanalyzer-malloc-leak]: leak of ‘limb[0]._mp_d’
gmp-6.3.0-build/gmp-6.3.0/gen-sieve.c:34: included_from: Included from here.
gmp-6.3.0-build/gmp-6.3.0/bootstrap.c:33: included_from: Included from here.
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:371:19: note: in expansion of macro ‘gmp_alloc’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:45: included_from: Included from here.
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:371:19: note: in expansion of macro ‘gmp_alloc’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1473:7: note: in expansion of macro ‘GMP_ABS’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:71:33: note: in definition of macro ‘GMP_ABS’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:3724:12: note: in expansion of macro ‘MPZ_REALLOC’
#   91|   
#   92|     return c;
#   93|-> }
#   94|   
#   95|   void

Error: COMPILER_WARNING (CWE-563): [#def3]
gmp-6.3.0-build/gmp-6.3.0/gmp-impl.h:1759:7: warning[-Wunused-value]: value computed is not used
# 1759 |   (15 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 15)))
#      |   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.3.0-build/gmp-6.3.0/mpn/generic/toom_interpolate_7pts.c:212:3: note: in expansion of macro 'mpn_divexact_by15'
#  212 |   mpn_divexact_by15 (w1, w1, m);
#      |   ^~~~~~~~~~~~~~~~~
# 1757|   #if GMP_NUMB_BITS % 4 == 0
# 1758|   #define mpn_divexact_by15(dst,src,size) \
# 1759|->   (15 & 1 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 15)))
# 1760|   #endif
# 1761|   

Error: COMPILER_WARNING (CWE-563): [#def4]
gmp-6.3.0-build/gmp-6.3.0/gmp-impl.h:1764:7: warning[-Wunused-value]: value computed is not used
# 1764 |   (31 & 15 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 17)))
#      |   ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
gmp-6.3.0-build/gmp-6.3.0/mpn/generic/mulmod_bknp1.c:348:5: note: in expansion of macro 'mpn_divexact_by17'
#  348 |     mpn_divexact_by17 (tp, tp, n + 1);
#      |     ^~~~~~~~~~~~~~~~~
# 1762|   #if GMP_NUMB_BITS % 8 == 0
# 1763|   #define mpn_divexact_by17(dst,src,size) \
# 1764|->   (31 & 15 * mpn_bdiv_dbm1 (dst, src, size, __GMP_CAST (mp_limb_t, GMP_NUMB_MASK / 17)))
# 1765|   #endif
# 1766|   

Error: GCC_ANALYZER_WARNING (CWE-471): [#def5]
gmp-6.3.0-build/gmp-6.3.0/bootstrap.c:33: included_from: Included from here.
gmp-6.3.0-build/gmp-6.3.0/gen-fib.c:32: included_from: Included from here.
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c: scope_hint: In function ‘mpn_add_1’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:458:13: warning[-Wanalyzer-write-to-const]: write to ‘const’ object ‘dummy_limb’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1473:7: note: in expansion of macro ‘GMP_ABS’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:71:33: note: in definition of macro ‘GMP_ABS’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1509:7: note: in expansion of macro ‘MPZ_REALLOC’
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:45: included_from: Included from here.
gmp-6.3.0-build/gmp-6.3.0/mini-gmp/mini-gmp.c:1433:26: note: declared here
#  456|         /* Carry out */
#  457|         b = (r < b);
#  458|->       rp[i] = r;
#  459|       }
#  460|     while (++i < n);

Error: CLANG_WARNING: [#def6]
gmp-6.3.0-build/gmp-6.3.0/mpn/generic/mu_divappr_q.c:269:4: warning[deadcode.DeadStores]: Value stored to 'cy' is never read
#  267|   	  /* This is executed with about 76% probability.  */
#  268|   	  mpn_incr_u (qp, 1);
#  269|-> 	  cy = mpn_sub_n (rp, rp, dp, dn);
#  270|   	  STAT (err++);
#  271|   	}

Error: CPPCHECK_WARNING: [#def7]
gmp-6.3.0-build/gmp-6.3.0/mpn/generic/mulmod_bknp1.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: CLANG_WARNING: [#def8]
gmp-6.3.0-build/gmp-6.3.0/mpz/nextprime.c:229:17: warning[core.uninitialized.Assign]: Assigned value is garbage or undefined
#  227|             for (; m < odds_in_composite_sieve; m += prime)
#  228|               composite[m] = 1;
#  229|->           prime += primegap[i];
#  230|           }
#  231|   

Error: CPPCHECK_WARNING: [#def9]
gmp-6.3.0-build/gmp-6.3.0/mpz/primorial_ui.c: information[normalCheckLevelMaxBranches]: Limiting analysis of branches. Use --check-level=exhaustive to analyze all branches.

Error: COMPILER_WARNING (CWE-563): [#def10]
gmp-6.3.0-build/gmp-6.3.0/scanf/doscan.c: scope_hint: In function '__gmp_doscan'
gmp-6.3.0-build/gmp-6.3.0/scanf/doscan.c:473:33: warning[-Wunused-variable]: unused variable 'end_fmt'
#  473 |   const char  *fmt, *this_fmt, *end_fmt;
#      |                                 ^~~~~~~
#  471|     va_list     ap;
#  472|     char	      *alloc_fmt;
#  473|->   const char  *fmt, *this_fmt, *end_fmt;
#  474|     size_t      orig_fmt_len, alloc_fmt_size, len;
#  475|     int	      new_fields, new_chars;

Scan Properties

analyzer-version-clang18.1.7
analyzer-version-cppcheck2.14.2
analyzer-version-gcc14.1.1
analyzer-version-gcc-analyzer14.1.1
analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-clang18.1.7
diffbase-analyzer-version-cppcheck2.14.2
diffbase-analyzer-version-gcc14.1.1
diffbase-analyzer-version-gcc-analyzer14.1.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-enabled-pluginsclang, cppcheck, gcc, shellcheck
diffbase-exit-code0
diffbase-hostip-172-16-1-102.us-west-2.compute.internal
diffbase-mock-configfedora-41-x86_64
diffbase-project-namegmp-6.2.1-8.fc40
diffbase-store-results-to/tmp/tmpku3sp19n/gmp-6.2.1-8.fc40.tar.xz
diffbase-time-created2024-07-03 12:49:45
diffbase-time-finished2024-07-03 12:54:48
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpku3sp19n/gmp-6.2.1-8.fc40.tar.xz' '--gcc-analyze' '/tmp/tmpku3sp19n/gmp-6.2.1-8.fc40.src.rpm'
diffbase-tool-versioncsmock-3.5.3-1.el9
enabled-pluginsclang, cppcheck, gcc, shellcheck
exit-code0
hostip-172-16-1-102.us-west-2.compute.internal
mock-configfedora-41-x86_64
project-namegmp-6.3.0-1.fc41
store-results-to/tmp/tmpb_ft31fu/gmp-6.3.0-1.fc41.tar.xz
time-created2024-07-03 12:55:14
time-finished2024-07-03 12:59:50
titleNewly introduced defects
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-41-x86_64' '-t' 'cppcheck,gcc,clang,shellcheck' '-o' '/tmp/tmpb_ft31fu/gmp-6.3.0-1.fc41.tar.xz' '--gcc-analyze' '/tmp/tmpb_ft31fu/gmp-6.3.0-1.fc41.src.rpm'
tool-versioncsmock-3.5.3-1.el9