Newly introduced findings

List of Findings

Error: CPPCHECK_WARNING (CWE-415): [#def1]
elfutils-0.195/libdw/dwarf_begin_elf.c:429: error[doubleFree]: Memory pointed to by 'fake_loc_cu' is freed twice.
#  427|         if (pthread_rwlock_init(&result->mem_rwl, NULL) != 0)
#  428|   	{
#  429|-> 	  free (result->fake_loc_cu);
#  430|   	  free (result->fake_loclists_cu);
#  431|   	  free (result->fake_addr_cu);

Error: CPPCHECK_WARNING (CWE-415): [#def2]
elfutils-0.195/libdw/dwarf_begin_elf.c:430: error[doubleFree]: Memory pointed to by 'fake_loclists_cu' is freed twice.
#  428|   	{
#  429|   	  free (result->fake_loc_cu);
#  430|-> 	  free (result->fake_loclists_cu);
#  431|   	  free (result->fake_addr_cu);
#  432|   	  free (result);

Error: CPPCHECK_WARNING (CWE-416): [#def3]
elfutils-0.195/libdw/dwarf_begin_elf.c:452: error[deallocuse]: Dereferencing 'fake_loc_cu' after it is deallocated / released
#  450|   	{
#  451|   	  eu_search_tree_init (&result->fake_loc_cu->locs_tree);
#  452|-> 	  rwlock_init (result->fake_loc_cu->split_lock);
#  453|   	  mutex_init (result->fake_loc_cu->abbrev_lock);
#  454|   	  mutex_init (result->fake_loc_cu->src_lock);

Error: CPPCHECK_WARNING (CWE-416): [#def4]
elfutils-0.195/libdw/dwarf_begin_elf.c:453: error[deallocuse]: Dereferencing 'fake_loc_cu' after it is deallocated / released
#  451|   	  eu_search_tree_init (&result->fake_loc_cu->locs_tree);
#  452|   	  rwlock_init (result->fake_loc_cu->split_lock);
#  453|-> 	  mutex_init (result->fake_loc_cu->abbrev_lock);
#  454|   	  mutex_init (result->fake_loc_cu->src_lock);
#  455|   	  mutex_init (result->fake_loc_cu->str_off_base_lock);

Error: CPPCHECK_WARNING (CWE-416): [#def5]
elfutils-0.195/libdw/dwarf_begin_elf.c:454: error[deallocuse]: Dereferencing 'fake_loc_cu' after it is deallocated / released
#  452|   	  rwlock_init (result->fake_loc_cu->split_lock);
#  453|   	  mutex_init (result->fake_loc_cu->abbrev_lock);
#  454|-> 	  mutex_init (result->fake_loc_cu->src_lock);
#  455|   	  mutex_init (result->fake_loc_cu->str_off_base_lock);
#  456|   	  mutex_init (result->fake_loc_cu->intern_lock);

Error: CPPCHECK_WARNING (CWE-416): [#def6]
elfutils-0.195/libdw/dwarf_begin_elf.c:455: error[deallocuse]: Dereferencing 'fake_loc_cu' after it is deallocated / released
#  453|   	  mutex_init (result->fake_loc_cu->abbrev_lock);
#  454|   	  mutex_init (result->fake_loc_cu->src_lock);
#  455|-> 	  mutex_init (result->fake_loc_cu->str_off_base_lock);
#  456|   	  mutex_init (result->fake_loc_cu->intern_lock);
#  457|   	}

Error: CPPCHECK_WARNING (CWE-416): [#def7]
elfutils-0.195/libdw/dwarf_begin_elf.c:456: error[deallocuse]: Dereferencing 'fake_loc_cu' after it is deallocated / released
#  454|   	  mutex_init (result->fake_loc_cu->src_lock);
#  455|   	  mutex_init (result->fake_loc_cu->str_off_base_lock);
#  456|-> 	  mutex_init (result->fake_loc_cu->intern_lock);
#  457|   	}
#  458|   

Error: CPPCHECK_WARNING (CWE-476): [#def8]
elfutils-0.195/libdwfl/dwfl_begin.c:53: warning[nullPointerOutOfMemory]: If memory allocation fails, then there is a possible null pointer dereference: dwfl
#   51|       }
#   52|   
#   53|->   mutex_init (dwfl->debuginfod_lock);
#   54|   
#   55|     return dwfl;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def9]
elfutils-0.195/libebl/eblinitreg_sample.c:121:7: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL ‘*ebl.cached_regs_mapping’
elfutils-0.195/libebl/eblinitreg_sample.c:89:6: branch_false: following ‘false’ branch...
elfutils-0.195/libebl/eblinitreg_sample.c:93:7: branch_false: ...to here
elfutils-0.195/libebl/eblinitreg_sample.c:93:6: branch_false: following ‘false’ branch...
elfutils-0.195/libebl/eblinitreg_sample.c:100:7: branch_false: ...to here
elfutils-0.195/libebl/eblinitreg_sample.c:114:37: acquire_memory: this call could return NULL
elfutils-0.195/libebl/eblinitreg_sample.c:119:8: branch_true: following ‘true’ branch (when ‘k != 64’)...
elfutils-0.195/libebl/eblinitreg_sample.c:121:31: branch_true: ...to here
elfutils-0.195/libebl/eblinitreg_sample.c:121:7: danger: ‘calloc(64, 4) + (long unsigned int)k * 4’ could be NULL: unchecked value from [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  119|          k < count; k++, bit <<= 1)
#  120|       {
#  121|->       ebl->cached_regs_mapping[k] = -1;
#  122|         if ((bit & perf_regs_mask)) {
#  123|   	ebl->cached_regs_mapping[j] = k;

Scan Properties

analyzer-version-clippy1.97.1
analyzer-version-cppcheck2.21.1
analyzer-version-gcc16.1.1
analyzer-version-gcc-analyzer16.1.1
analyzer-version-shellcheck0.11.0
analyzer-version-unicontrol0.0.2
diffbase-analyzer-version-clippy1.97.1
diffbase-analyzer-version-cppcheck2.21.1
diffbase-analyzer-version-gcc16.1.1
diffbase-analyzer-version-gcc-analyzer16.1.1
diffbase-analyzer-version-shellcheck0.11.0
diffbase-analyzer-version-unicontrol0.0.2
diffbase-enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
diffbase-exit-code0
diffbase-hostip-172-16-1-235.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.20260524.213755.g3c6d0be.main-1.el9.noarch
diffbase-mock-configfedora-rawhide-x86_64
diffbase-project-nameelfutils-0.194-5.fc44
diffbase-store-results-to/tmp/tmpy0bkxr73/elfutils-0.194-5.fc44.tar.xz
diffbase-time-created2026-08-03 13:56:54
diffbase-time-finished2026-08-03 14:01:35
diffbase-toolcsmock
diffbase-tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpy0bkxr73/elfutils-0.194-5.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpy0bkxr73/elfutils-0.194-5.fc44.src.rpm'
diffbase-tool-versioncsmock-3.8.7.HEAD-1.el9
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-235.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20260524.213755.g3c6d0be.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-nameelfutils-0.195-3.fc45
store-results-to/tmp/tmpcpvmeexw/elfutils-0.195-3.fc45.tar.xz
time-created2026-08-03 14:02:02
time-finished2026-08-03 14:06:01
titleNewly introduced findings
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'gcc,clippy,unicontrol,shellcheck,cppcheck' '-o' '/tmp/tmpcpvmeexw/elfutils-0.195-3.fc45.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpcpvmeexw/elfutils-0.195-3.fc45.src.rpm'
tool-versioncsmock-3.8.7.HEAD-1.el9