Newly introduced findings

List of Findings

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1]
grep-3.12/gnulib-tests/struniq.h:118:10: warning[-Wanalyzer-malloc-leak]: leak of 'new_node'
grep-3.12/gnulib-tests/struniq.h:92:5: acquire_memory: allocated here
grep-3.12/gnulib-tests/struniq.h:93:6: branch_false: following 'false' branch (when 'new_node' is non-NULL)...
grep-3.12/gnulib-tests/struniq.h:96:11: branch_false: ...to here
grep-3.12/gnulib-tests/struniq.h:118:10: danger: 'new_node' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  116|       if (mt) gl_lock_unlock (struniq_lock);
#  117|     }
#  118|->   return new_node->contents;
#  119|   }

Error: COMPILER_WARNING: [#def2]
grep-3.12/lib/dfa.c:2606:12: warning[-Wstringop-overflow=]: writing 1 byte into a region of size 0
# 2606 |   flags[0] |= OPT_QUEUED;
#      |            ^
grep-3.12/lib/ialloc.h:91:10: note: destination object of size 0 allocated by 'calloc'
#   91 |   return calloc (n, s);
#      |          ^
# 2604|       }
# 2605|   
# 2606|->   flags[0] |= OPT_QUEUED;
# 2607|   
# 2608|     position_set merged0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def3]
grep-3.12/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(n)'
grep-3.12/lib/xmalloc.c:55:1: enter_function: entry to 'xcharalloc'
grep-3.12/lib/xmalloc.c:57:10: call_function: calling 'xmalloc' from 'xcharalloc'
#   43|   xmalloc (size_t s)
#   44|   {
#   45|->   return check_nonnull (malloc (s));
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def4]
grep-3.12/lib/xmalloc.c:45:10: warning[-Wanalyzer-malloc-leak]: leak of 'xmalloc(s)'
grep-3.12/lib/xmalloc.c:312:1: enter_function: entry to 'xmemdup'
grep-3.12/lib/xmalloc.c:314:18: call_function: calling 'xmalloc' from 'xmemdup'
#   43|   xmalloc (size_t s)
#   44|   {
#   45|->   return check_nonnull (malloc (s));
#   46|   }
#   47|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def5]
grep-3.12/lib/xmalloc.c:298:10: warning[-Wanalyzer-malloc-leak]: leak of 'xcalloc(s, 1)'
grep-3.12/lib/xmalloc.c:281:1: enter_function: entry to 'xzalloc'
grep-3.12/lib/xmalloc.c:283:10: call_function: calling 'xcalloc' from 'xzalloc'
#  296|   xcalloc (size_t n, size_t s)
#  297|   {
#  298|->   return check_nonnull (calloc (n, s));
#  299|   }
#  300|   

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.86.0
diffbase-analyzer-version-cppcheck2.17.1
diffbase-analyzer-version-gcc15.0.1
diffbase-analyzer-version-gcc-analyzer15.0.1
diffbase-analyzer-version-shellcheck0.10.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-181.us-west-2.compute.internal
diffbase-known-false-positives/usr/share/csmock/known-false-positives.js
diffbase-known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-namegrep-3.11-10.fc42
diffbase-store-results-to/tmp/tmpwj39k_nj/grep-3.11-10.fc42.tar.xz
diffbase-time-created2025-04-25 12:48:58
diffbase-time-finished2025-04-25 12:51:55
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpwj39k_nj/grep-3.11-10.fc42.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpwj39k_nj/grep-3.11-10.fc42.src.rpm'
diffbase-tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-181.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namegrep-3.12-1.fc43
store-results-to/tmp/tmp02knx2vg/grep-3.12-1.fc43.tar.xz
time-created2025-04-25 12:52:04
time-finished2025-04-25 12:54:12
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmp02knx2vg/grep-3.12-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmp02knx2vg/grep-3.12-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9