Error: SHELLCHECK_WARNING (CWE-829): [#def1] /usr/libexec/libunwind/check-namespace.sh:69:8: warning[SC2092]: Remove backticks to avoid executing output (or use eval if intentional). # 67| match () { # 68| sym=$1 # 69|-> if `echo "$symtab" | grep -q " ${sym}\$"`; then # 70| symtab=`echo "$symtab" | grep -v " ${sym}\$"` # 71| else Error: SHELLCHECK_WARNING: [#def2] /usr/libexec/libunwind/check-namespace.sh:109:9: warning[SC2195]: This pattern will never match the case statement's word. Double check them. # 107| ignore _gp # 108| ;; # 109|-> loongarch64) # 110| ignore _fbss # 111| ignore _fdata Error: SHELLCHECK_WARNING (CWE-398): [#def3] /usr/libexec/libunwind/check-namespace.sh:237:14: warning[SC2050]: This expression is constant. Did you forget the $ on a variable? # 235| esac # 236| # 237|-> if [ xno = xyes ]; then # 238| match _UL${plat}_dwarf_find_debug_frame # 239| fi Error: SHELLCHECK_WARNING (CWE-398): [#def4] /usr/libexec/libunwind/check-namespace.sh:363:14: warning[SC2050]: This expression is constant. Did you forget the $ on a variable? # 361| esac # 362| # 363|-> if [ xno = xyes ]; then # 364| match _U${plat}_dwarf_find_debug_frame # 365| fi Error: SHELLCHECK_WARNING (CWE-398): [#def5] /usr/libexec/libunwind/check-namespace.sh:425:14: warning[SC2050]: This expression is constant. Did you forget the $ on a variable? # 423| filter_misc # 424| check_local_unw_abi # 425|-> if [ xno = xyes ]; then # 426| check_cxx_abi # 427| fi Error: SHELLCHECK_WARNING: [#def6] /usr/libexec/libunwind/run-coredump-unwind:24:130: warning[SC3020]: In POSIX sh, &> is undefined. # 22| comm -13 "$dynsyms" "$funcsyms" > "$keep_symbols" # 23| # Copy the full debuginfo, keeping only a minimal set of symbols and removing some unnecessary sections # 24|-> objcopy -S --remove-section .gdb_index --remove-section .comment --keep-symbols="$keep_symbols" "$debuginfo" "$mini_debuginfo" &> /dev/null # 25| wait # 26| #Inject the compressed data into the .gnu_debugdata section of the original binary Error: SHELLCHECK_WARNING (CWE-563): [#def7] /usr/libexec/libunwind/run-coredump-unwind:36:1: warning[SC2034]: TESTDIR appears unused. Verify use (or export if used externally). # 34| # 35| # 36|-> TESTDIR=`pwd` # 37| TEMPDIR=`mktemp --tmpdir -d libunwind-test-XXXXXXXXXX` # 38| trap "rm -r -- $TEMPDIR" EXIT Error: SHELLCHECK_WARNING (CWE-569): [#def8] /usr/libexec/libunwind/run-coredump-unwind:38:16: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled. # 36| TESTDIR=`pwd` # 37| TEMPDIR=`mktemp --tmpdir -d libunwind-test-XXXXXXXXXX` # 38|-> trap "rm -r -- $TEMPDIR" EXIT # 39| # 40| cp crasher $TEMPDIR/crasher Error: SHELLCHECK_WARNING (CWE-252): [#def9] /usr/libexec/libunwind/run-coredump-unwind:47:5: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails. # 45| # create core dump # 46| ( # 47|-> cd $TEMPDIR # 48| ulimit -c 10000 # 49| ./crasher backing_files Error: SHELLCHECK_WARNING: [#def10] /usr/libexec/libunwind/run-coredump-unwind:48:12: warning[SC3045]: In POSIX sh, ulimit -c is undefined. # 46| ( # 47| cd $TEMPDIR # 48|-> ulimit -c 10000 # 49| ./crasher backing_files # 50| ) 2>/dev/null Error: SHELLCHECK_WARNING (CWE-569): [#def11] /usr/libexec/libunwind/run-coredump-unwind:51:10: warning[SC2125]: Brace expansions and globs are literal in assignments. Quote it or use an array. # 49| ./crasher backing_files # 50| ) 2>/dev/null # 51|-> COREFILE=$TEMPDIR/core* # 52| if ! test -f "$COREFILE"; then # 53| echo "crasher process did not produce coredump, test skipped" Error: SHELLCHECK_WARNING (CWE-156): [#def12] /usr/libexec/libunwind/run-coredump-unwind:58:44: warning[SC2046]: Quote this to prevent word splitting. # 56| # 57| # magic option -testcase enables checking for the specific contents of the stack # 58|-> ./test-coredump-unwind $COREFILE -testcase `cat $TEMPDIR/backing_files` Error: SHELLCHECK_WARNING (CWE-569): [#def13] /usr/libexec/libunwind/run-ptrace-mapper:24:47: warning[SC2048]: Use "$@" (with quotes) to prevent whitespace problems. # 22| # # 23| dir="$(dirname $0)" # 24|-> "${dir}/test-ptrace" -c -n -t "${dir}/mapper" $* Error: COMPILER_WARNING: [#def14] libunwind-1.8.3/include/dwarf_i.h:10: included_from: Included from here. libunwind-1.8.3/src/dwarf/Gfind_proc_info-lsb.c:33: included_from: Included from here. libunwind-1.8.3/src/dwarf/Lfind_proc_info-lsb.c:4: included_from: Included from here. libunwind-1.8.3/include/libunwind_i.h:146:10: warning: 'unreachable' redefined # 146 | # define unreachable() __builtin_unreachable() # | ^~~~~~~~~~~ libunwind-1.8.3/src/dwarf/Gfind_proc_info-lsb.c:29: included_from: Included from here. /usr/lib/gcc/x86_64-redhat-linux/15/include/stddef.h:468:9: note: this is the location of the previous definition # 468 | #define unreachable() (__builtin_unreachable ()) # | ^~~~~~~~~~~ # 144| # 145| #if defined(HAVE__BUILTIN_UNREACHABLE) # 146|-> # define unreachable() __builtin_unreachable() # 147| #else # 148| # define unreachable() do { } while (1) Error: COMPILER_WARNING: [#def15] libunwind-1.8.3/include/libunwind_i.h:146:10: warning[warning]: 'unreachable' redefined # 144| # 145| #if defined(HAVE__BUILTIN_UNREACHABLE) # 146|-> # define unreachable() __builtin_unreachable() # 147| #else # 148| # define unreachable() do { } while (1) Error: GCC_ANALYZER_WARNING (CWE-401): [#def16] libunwind-1.8.3/include/remote.h:59:9: warning[-Wanalyzer-malloc-leak]: leak of 'region' libunwind-1.8.3/src/mi/Gdyn-remote.c:204:1: enter_function: entry to '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:10: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:230:14: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:11: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:233:12: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:240:15: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:244:15: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:244:14: branch_true: following 'true' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:246:18: branch_true: following 'true' branch (when 'di' is NULL)... libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:252:18: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: call_function: calling 'fetch32' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: return_function: returning to '_Ux86_64_Idyn_remote_find_proc_info' from 'fetch32' libunwind-1.8.3/src/mi/Gdyn-remote.c:252:19: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:256:20: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:258:18: branch_true: following 'true' branch (when 'need_unwind_info != 0')... libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: call_function: calling 'intern_dyn_info' from '_Ux86_64_Idyn_remote_find_proc_info' # 57| *addr += 1; # 58| # 59|-> ret = (*a->access_mem) (as, aligned_addr, &val, 0, arg); # 60| # 61| #if UNW_BYTE_ORDER == UNW_LITTLE_ENDIAN Error: GCC_ANALYZER_WARNING (CWE-401): [#def17] libunwind-1.8.3/include/remote.h:82:9: warning[-Wanalyzer-malloc-leak]: leak of 'region' libunwind-1.8.3/src/mi/Gdyn-remote.c:204:1: enter_function: entry to '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:10: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:230:14: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:11: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:233:12: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:240:15: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:244:15: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:244:14: branch_true: following 'true' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:246:18: branch_true: following 'true' branch (when 'di' is NULL)... libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:252:18: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: call_function: calling 'fetch32' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: return_function: returning to '_Ux86_64_Idyn_remote_find_proc_info' from 'fetch32' libunwind-1.8.3/src/mi/Gdyn-remote.c:252:19: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:256:20: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:258:18: branch_true: following 'true' branch (when 'need_unwind_info != 0')... libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: call_function: calling 'intern_dyn_info' from '_Ux86_64_Idyn_remote_find_proc_info' # 80| *addr += 2; # 81| # 82|-> ret = (*a->access_mem) (as, aligned_addr, &val, 0, arg); # 83| # 84| #if UNW_BYTE_ORDER == UNW_LITTLE_ENDIAN Error: GCC_ANALYZER_WARNING (CWE-401): [#def18] libunwind-1.8.3/include/remote.h:105:9: warning[-Wanalyzer-malloc-leak]: leak of 'region' libunwind-1.8.3/src/mi/Gdyn-remote.c:204:1: enter_function: entry to '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:10: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:230:14: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:11: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:233:12: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:240:15: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:244:15: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:244:14: branch_true: following 'true' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:246:18: branch_true: following 'true' branch (when 'di' is NULL)... libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:252:18: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: call_function: calling 'fetch32' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: return_function: returning to '_Ux86_64_Idyn_remote_find_proc_info' from 'fetch32' libunwind-1.8.3/src/mi/Gdyn-remote.c:252:19: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:256:20: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:258:18: branch_true: following 'true' branch (when 'need_unwind_info != 0')... libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: call_function: calling 'intern_dyn_info' from '_Ux86_64_Idyn_remote_find_proc_info' # 103| *addr += 4; # 104| # 105|-> ret = (*a->access_mem) (as, aligned_addr, &val, 0, arg); # 106| # 107| #if UNW_BYTE_ORDER == UNW_LITTLE_ENDIAN Error: GCC_ANALYZER_WARNING (CWE-401): [#def19] libunwind-1.8.3/include/remote.h:122:9: warning[-Wanalyzer-malloc-leak]: leak of 'di' libunwind-1.8.3/src/mi/Gdyn-remote.c:204:1: enter_function: entry to '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:10: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:230:14: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:11: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:233:12: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:240:15: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:244:15: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:244:14: branch_true: following 'true' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:246:18: branch_true: following 'true' branch (when 'di' is NULL)... libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: acquire_memory: allocated here libunwind-1.8.3/src/mi/Gdyn-remote.c:252:19: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' # 120| int ret; # 121| # 122|-> ret = (*a->access_mem) (as, *addr, valp, 0, arg); # 123| *addr += WSIZE; # 124| return ret; Error: GCC_ANALYZER_WARNING (CWE-401): [#def20] libunwind-1.8.3/include/remote.h:122:9: warning[-Wanalyzer-malloc-leak]: leak of 'region' libunwind-1.8.3/src/mi/Gdyn-remote.c:204:1: enter_function: entry to '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:10: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:230:14: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:11: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:233:12: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:240:15: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:244:15: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:244:14: branch_true: following 'true' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:246:18: branch_true: following 'true' branch (when 'di' is NULL)... libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:252:18: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: call_function: calling 'fetch32' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:253:22: return_function: returning to '_Ux86_64_Idyn_remote_find_proc_info' from 'fetch32' libunwind-1.8.3/src/mi/Gdyn-remote.c:252:19: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:256:20: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:258:18: branch_true: following 'true' branch (when 'need_unwind_info != 0')... libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:259:22: call_function: calling 'intern_dyn_info' from '_Ux86_64_Idyn_remote_find_proc_info' # 120| int ret; # 121| # 122|-> ret = (*a->access_mem) (as, *addr, valp, 0, arg); # 123| *addr += WSIZE; # 124| return ret; Error: GCC_ANALYZER_WARNING (CWE-688): [#def21] libunwind-1.8.3/src/coredump/_UCD_create.c:59:25: warning[-Wanalyzer-possible-null-argument]: use of possibly-NULL 'ui' where non-null expected libunwind-1.8.3/src/coredump/_UCD_create.c:59:25: acquire_memory: this call could return NULL libunwind-1.8.3/src/coredump/_UCD_create.c:59:25: danger: argument 1 ('malloc(288)') from [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0) could be NULL where non-null expected #argument 1 of '__builtin_memset' must be non-null # 57| mi_init (); # 58| # 59|-> struct UCD_info *ui = memset(malloc(sizeof(*ui)), 0, sizeof(*ui)); # 60| ui->edi.di_cache.format = -1; # 61| ui->edi.di_debug.format = -1; Error: GCC_ANALYZER_WARNING (CWE-401): [#def22] libunwind-1.8.3/src/coredump/_UCD_create.c:66:30: warning[-Wanalyzer-malloc-leak]: leak of 'ui' libunwind-1.8.3/src/coredump/_UCD_create.c:59:25: acquire_memory: allocated here libunwind-1.8.3/src/coredump/_UCD_create.c:66:30: danger: 'ui' leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0) # 64| #endif # 65| # 66|-> int fd = ui->coredump_fd = open(filename, O_RDONLY); # 67| if (fd < 0) # 68| goto err; Error: GCC_ANALYZER_WARNING (CWE-476): [#def23] libunwind-1.8.3/src/coredump/_UCD_create.c:138:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'cur' libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:74:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:80:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:80:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:86:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:86:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:109:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:119:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:124:37: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:125:40: acquire_memory: this call could return NULL libunwind-1.8.3/src/coredump/_UCD_create.c:126:6: branch_true: following 'true' branch... branch_true: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:130:14: branch_true: following 'true' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:133:15: branch_true: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:133:14: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:138:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:138:11: danger: 'cur' could be NULL: unchecked value from [(11)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/10) # 136| goto err; # 137| } # 138|-> cur->p_type = hdr64.p_type ; # 139| cur->p_flags = hdr64.p_flags ; # 140| cur->p_offset = hdr64.p_offset; Error: GCC_ANALYZER_WARNING (CWE-476): [#def24] libunwind-1.8.3/src/coredump/_UCD_create.c:162:11: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'cur' libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:74:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:80:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:80:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:86:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:86:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:109:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:111:15: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:119:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:124:37: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:125:40: acquire_memory: this call could return NULL libunwind-1.8.3/src/coredump/_UCD_create.c:126:6: branch_false: following 'false' branch... branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:154:14: branch_true: following 'true' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:157:15: branch_true: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:157:14: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:162:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:162:11: danger: 'cur' could be NULL: unchecked value from [(13)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/12) # 160| goto err; # 161| } # 162|-> cur->p_type = hdr32.p_type ; # 163| cur->p_flags = hdr32.p_flags ; # 164| cur->p_offset = hdr32.p_offset; Error: GCC_ANALYZER_WARNING (CWE-401): [#def25] libunwind-1.8.3/src/coredump/_UCD_create.c:176:15: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: acquire_memory: allocated here libunwind-1.8.3/src/coredump/_UCD_create.c:74:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:80:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:80:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:86:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:86:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:109:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:119:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:124:37: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:130:14: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:176:15: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:176:15: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/2) # 174| } # 175| # 176|-> int ret = _UCD_get_threadinfo(ui, phdrs, size); # 177| if (ret != UNW_ESUCCESS) { # 178| Debug(0, "failure retrieving thread info from core file\n"); Error: GCC_ANALYZER_WARNING (CWE-401): [#def26] libunwind-1.8.3/src/coredump/_UCD_create.c:176:15: warning[-Wanalyzer-malloc-leak]: leak of 'ui' libunwind-1.8.3/src/coredump/_UCD_create.c:59:25: acquire_memory: allocated here libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:74:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:80:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:80:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:86:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:86:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:109:7: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:119:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:124:37: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:130:14: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:176:15: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:176:15: danger: 'ui' leaks here; was allocated at [(1)](sarif:/runs/0/results/7/codeFlows/0/threadFlows/0/locations/0) # 174| } # 175| # 176|-> int ret = _UCD_get_threadinfo(ui, phdrs, size); # 177| if (ret != UNW_ESUCCESS) { # 178| Debug(0, "failure retrieving thread info from core file\n"); Error: GCC_ANALYZER_WARNING (CWE-775): [#def27] libunwind-1.8.3/src/coredump/_UCD_create.c:225:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor libunwind-1.8.3/src/coredump/_UCD_create.c:66:30: acquire_resource: opened here libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:225:3: danger: leaks here; was opened at [(1)](sarif:/runs/0/results/8/codeFlows/0/threadFlows/0/locations/0) # 223| # 224| err: # 225|-> _UCD_destroy(ui); # 226| return NULL; # 227| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def28] libunwind-1.8.3/src/coredump/_UCD_create.c:225:3: warning[-Wanalyzer-malloc-leak]: leak of '<unknown>' libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_false: following 'false' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: branch_false: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:69:27: acquire_memory: allocated here libunwind-1.8.3/src/coredump/_UCD_create.c:225:3: danger: '<unknown>' leaks here; was allocated at [(3)](sarif:/runs/0/results/9/codeFlows/0/threadFlows/0/locations/2) # 223| # 224| err: # 225|-> _UCD_destroy(ui); # 226| return NULL; # 227| } Error: GCC_ANALYZER_WARNING (CWE-401): [#def29] libunwind-1.8.3/src/coredump/_UCD_create.c:225:3: warning[-Wanalyzer-malloc-leak]: leak of 'ui' libunwind-1.8.3/src/coredump/_UCD_create.c:59:25: acquire_memory: allocated here libunwind-1.8.3/src/coredump/_UCD_create.c:67:6: branch_true: following 'true' branch... libunwind-1.8.3/src/coredump/_UCD_create.c:68:5: branch_true: ...to here libunwind-1.8.3/src/coredump/_UCD_create.c:225:3: danger: 'ui' leaks here; was allocated at [(1)](sarif:/runs/0/results/10/codeFlows/0/threadFlows/0/locations/0) # 223| # 224| err: # 225|-> _UCD_destroy(ui); # 226| return NULL; # 227| } Error: COMPILER_WARNING: [#def30] libunwind-1.8.3/src/coredump/_UPT_get_dyn_info_list_addr.c: scope_hint: In function 'get_list_addr' libunwind-1.8.3/src/coredump/_UPT_get_dyn_info_list_addr.c:87:3: warning[-Wcpp]: #warning Implement get_list_addr(), please. # 87 | # warning Implement get_list_addr(), please. # | ^~~~~~~ # 85| int *countp) # 86| { # 87|-> # warning Implement get_list_addr(), please. # 88| *countp = 0; # 89| return 0; Error: COMPILER_WARNING: [#def31] libunwind-1.8.3/src/coredump/_UPT_get_dyn_info_list_addr.c:87:3: warning[-Wcpp]: #warning Implement get_list_addr(), please. # 85| int *countp) # 86| { # 87|-> # warning Implement get_list_addr(), please. # 88| *countp = 0; # 89| return 0; Error: GCC_ANALYZER_WARNING (CWE-835): [#def32] libunwind-1.8.3/src/mi/Gaddress_validator.c:118:15: warning[-Wanalyzer-infinite-loop]: infinite loop libunwind-1.8.3/src/mi/Gaddress_validator.c:118:15: danger: infinite loop here libunwind-1.8.3/src/mi/Gaddress_validator.c:120:11: branch_true: if it ever follows 'true' branch, it will always do so... branch_true: ...to here # 116| { # 117| char buf; # 118|-> bytes = read (_mem_validate_pipe[0], &buf, 1); # 119| } # 120| while ( errno == EINTR ); Error: GCC_ANALYZER_WARNING (CWE-476): [#def33] libunwind-1.8.3/src/mi/Gdyn-remote.c:249:15: warning[-Wanalyzer-possible-null-dereference]: dereference of possibly-NULL 'di' libunwind-1.8.3/src/mi/Gdyn-remote.c:204:1: enter_function: entry to '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:10: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:230:14: call_function: inlined call to 'fetchw' from '_Ux86_64_Idyn_remote_find_proc_info' libunwind-1.8.3/src/mi/Gdyn-remote.c:229:11: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:233:12: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:240:15: branch_false: following 'false' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:244:15: branch_false: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:244:14: branch_true: following 'true' branch... libunwind-1.8.3/src/mi/Gdyn-remote.c:246:18: branch_true: following 'true' branch (when 'di' is NULL)... libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: branch_true: ...to here libunwind-1.8.3/src/mi/Gdyn-remote.c:247:22: acquire_memory: this call could return NULL libunwind-1.8.3/src/mi/Gdyn-remote.c:249:15: danger: 'di' could be NULL: unchecked value from [(13)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/12) # 247| di = calloc (1, sizeof (*di)); # 248| # 249|-> di->start_ip = start_ip; # 250| di->end_ip = end_ip; # 251| Error: GCC_ANALYZER_WARNING (CWE-775): [#def34] libunwind-1.8.3/src/os-linux.h:83:11: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'mi.fd' libunwind-1.8.3/src/os-linux.c:37:1: enter_function: entry to '_Ux86_64_get_elf_image' libunwind-1.8.3/src/os-linux.c:48:7: call_function: calling 'maps_init' from '_Ux86_64_get_elf_image' # 81| if (!cp) # 82| { # 83|-> close(mi->fd); # 84| mi->fd = -1; # 85| return -1; Error: GCC_ANALYZER_WARNING (CWE-775): [#def35] libunwind-1.8.3/src/os-linux.h:304:3: warning[-Wanalyzer-fd-leak]: leak of file descriptor 'mi.fd' libunwind-1.8.3/src/os-linux.c:37:1: enter_function: entry to '_Ux86_64_get_elf_image' libunwind-1.8.3/src/os-linux.c:48:7: call_function: calling 'maps_init' from '_Ux86_64_get_elf_image' libunwind-1.8.3/src/os-linux.c:48:7: return_function: returning to '_Ux86_64_get_elf_image' from 'maps_init' libunwind-1.8.3/src/os-linux.c:48:6: branch_false: following 'false' branch... branch_false: ...to here libunwind-1.8.3/src/os-linux.c:51:10: call_function: calling 'maps_next' from '_Ux86_64_get_elf_image' libunwind-1.8.3/src/os-linux.c:51:10: return_function: returning to '_Ux86_64_get_elf_image' from 'maps_next' libunwind-1.8.3/src/os-linux.c:51:10: branch_false: following 'false' branch... libunwind-1.8.3/src/os-linux.c:58:6: branch_false: ...to here libunwind-1.8.3/src/os-linux.c:58:6: branch_true: following 'true' branch (when 'found == 0')... libunwind-1.8.3/src/os-linux.c:60:7: branch_true: ...to here libunwind-1.8.3/src/os-linux.c:60:7: call_function: calling 'maps_close' from '_Ux86_64_get_elf_image' # 302| if (mi->fd < 0) # 303| return; # 304|-> close (mi->fd); # 305| mi->fd = -1; # 306| if (mi->buf) Error: GCC_ANALYZER_WARNING (CWE-401): [#def36] libunwind-1.8.3/src/ptrace/_UPT_create.c:35:3: warning[-Wanalyzer-malloc-leak]: leak of 'ui' libunwind-1.8.3/src/ptrace/_UPT_create.c:33:25: acquire_memory: allocated here libunwind-1.8.3/src/ptrace/_UPT_create.c:35:3: danger: 'ui' leaks here; was allocated at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0) # 33| struct UPT_info *ui = malloc (sizeof (struct UPT_info)); # 34| # 35|-> mi_init (); # 36| # 37| if (!ui) Error: COMPILER_WARNING: [#def37] libunwind-1.8.3/src/ptrace/_UPT_get_dyn_info_list_addr.c: scope_hint: In function 'get_list_addr' libunwind-1.8.3/src/ptrace/_UPT_get_dyn_info_list_addr.c:85:3: warning[-Wcpp]: #warning Implement get_list_addr(), please. # 85 | # warning Implement get_list_addr(), please. # | ^~~~~~~ # 83| int *countp) # 84| { # 85|-> # warning Implement get_list_addr(), please. # 86| *countp = 0; # 87| return 0; Error: COMPILER_WARNING: [#def38] libunwind-1.8.3/src/ptrace/_UPT_get_dyn_info_list_addr.c:85:3: warning[-Wcpp]: #warning Implement get_list_addr(), please. # 83| int *countp) # 84| { # 85|-> # warning Implement get_list_addr(), please. # 86| *countp = 0; # 87| return 0;
| analyzer-version-clippy | 1.90.0 |
| analyzer-version-cppcheck | 2.18.3 |
| analyzer-version-gcc | 15.2.1 |
| analyzer-version-gcc-analyzer | 16.0.0 |
| analyzer-version-shellcheck | 0.11.0 |
| analyzer-version-unicontrol | 0.0.2 |
| enabled-plugins | clippy, cppcheck, gcc, shellcheck, unicontrol |
| exit-code | 0 |
| host | ip-172-16-1-153.us-west-2.compute.internal |
| known-false-positives | /usr/share/csmock/known-false-positives.js |
| known-false-positives-rpm | known-false-positives-0.0.0.20250521.132812.g8eff701.main-1.el9.noarch |
| mock-config | fedora-rawhide-gcc-latest-x86_64 |
| project-name | libunwind-1.8.3-1.fc44 |
| store-results-to | /tmp/tmpgafm07vk/libunwind-1.8.3-1.fc44.tar.xz |
| time-created | 2025-10-28 19:15:55 |
| time-finished | 2025-10-28 19:17:43 |
| tool | csmock |
| tool-args | '/usr/bin/csmock' '-r' 'fedora-rawhide-gcc-latest-x86_64' '-t' 'gcc,cppcheck,shellcheck,clippy,unicontrol' '-o' '/tmp/tmpgafm07vk/libunwind-1.8.3-1.fc44.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--install=gcc-latest' '--gcc-analyzer-bin=/opt/gcc-latest/bin/gcc' '/tmp/tmpgafm07vk/libunwind-1.8.3-1.fc44.src.rpm' |
| tool-version | csmock-3.8.3.20251027.143044.ge6b947b-1.el9 |