Task #132880 - postgresql18-18.3-1.fc44/scan-results.err
back to task #132880download
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:9:18: warning[SC2154]: var_content is referenced but not assigned.
# 7| for v in PGSETUP_DEBUG PGSETUP_INITDB_OPTIONS PGSETUP_PGUPGRADE_OPTIONS; do
# 8| eval var_content=\$$v
# 9|-> test -z "$var_content" && continue
# 10| cmd+=$v="$(printf %q "$var_content") "
# 11| done
Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/postgresql-setup:218:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 216|
# 217| # must see previous version in PG_VERSION
# 218|-> local old_data_version="`cat "$upgradefrom_data/PG_VERSION"`"
# 219| if [ ! -f "$upgradefrom_data/PG_VERSION" -o \
# 220| x"$old_data_version" != x"$upgradefrom_major" ]
Error: SHELLCHECK_WARNING (CWE-477):
/usr/bin/postgresql-setup:219:46: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
# 217| # must see previous version in PG_VERSION
# 218| local old_data_version="`cat "$upgradefrom_data/PG_VERSION"`"
# 219|-> if [ ! -f "$upgradefrom_data/PG_VERSION" -o \
# 220| x"$old_data_version" != x"$upgradefrom_major" ]
# 221| then
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:220:36: warning[SC2154]: upgradefrom_major is referenced but not assigned.
# 218| local old_data_version="`cat "$upgradefrom_data/PG_VERSION"`"
# 219| if [ ! -f "$upgradefrom_data/PG_VERSION" -o \
# 220|-> x"$old_data_version" != x"$upgradefrom_major" ]
# 221| then
# 222| error $"Cannot upgrade because the database in $upgradefrom_data is of"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:226:16: warning[SC2154]: upgradefrom_engine is referenced but not assigned.
# 224| exit 1
# 225| fi
# 226|-> if [ ! -x "$upgradefrom_engine/postgres" ]; then
# 227| error $"Please install the $upgradefrom_package package."
# 228| exit 5
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:227:36: warning[SC2154]: upgradefrom_package is referenced but not assigned.
# 225| fi
# 226| if [ ! -x "$upgradefrom_engine/postgres" ]; then
# 227|-> error $"Please install the $upgradefrom_package package."
# 228| exit 5
# 229| fi
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:273:14: warning[SC2154]: upgradefrom_scls is referenced but not assigned.
# 271|
# 272| scls_upgrade_hacks=
# 273|-> test -n "$upgradefrom_scls" && {
# 274| debug "scls [$upgradefrom_scls] will be enabled"
# 275| scls_upgrade_hacks="source scl_source enable $upgradefrom_scls"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:278:12: warning[SC2154]: upgradefrom_redhat_sockets_hack is referenced but not assigned.
# 276| }
# 277|
# 278|-> test x"$upgradefrom_redhat_sockets_hack" = xyes && {
# 279| debug "upgrading from redhat server"
# 280| socket_hacks="export REDHAT_PGUPGRADE_FROM_RHEL=yes"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:283:14: warning[SC2154]: upgradefrom_pghost_override is referenced but not assigned.
# 281| }
# 282|
# 283|-> test -n "$upgradefrom_pghost_override" && {
# 284| pghost_override="export PGHOST='$upgradefrom_pghost_override'"
# 285| }
Error: SHELLCHECK_WARNING (CWE-252):
/usr/bin/postgresql-setup:302:9: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
# 300| # After creating the empty new-format database, do the upgrade
# 301| (
# 302|-> cd # pg_upgrade writes to $PWD
# 303| eval "
# 304| $scls_upgrade_hacks
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:319:14: warning[SC2154]: add_options is referenced but not assigned.
# 317| --new-port="$PGPORT" \
# 318| --username=postgres \
# 319|-> "${add_options[@]}" \
# 320| >>"$upgrade_log" 2>>"$upgrade_log"
# 321| )
Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/postgresql-setup:361:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 359| test 0 = 1 && return 0
# 360|
# 361|-> local nr_out="`systemctl show -p $nr_option $option_service.service 2>/dev/null`"
# 362| if [[ "$nr_out" != "$nr_option=no" ]]; then
# 363| error $"Note that systemd configuration for '$option_service' changed."
Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/postgresql-setup:375:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 373| local service="$1"
# 374|
# 375|-> local systemd_env="$(systemctl show -p Environment "${service}.service")" \
# 376| || { return; }
# 377|
Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/postgresql-setup:398:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 396| local line var_name var_value
# 397| debug "Parsing ${service_file}"
# 398|-> local systemd_env="$(cat "${service_file}")" \
# 399| || { return; }
# 400|
Error: SHELLCHECK_WARNING (CWE-571):
/usr/bin/postgresql-setup:454:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
# 452| local service="$2"
# 453|
# 454|-> local envfiles="$(systemctl show -p EnvironmentFiles "${service}.service")"\
# 455| || return
# 456|
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/postgresql-setup:497:11: warning[SC2034]: port appears unused. Verify use (or export if used externally).
# 495| {
# 496| local data=
# 497|-> local port=
# 498| local unit_pgport=
# 499| local unit_pgdata=
Error: SHELLCHECK_WARNING (CWE-563):
/usr/bin/postgresql-setup:674:13: warning[SC2034]: option_debug appears unused. Verify use (or export if used externally).
# 672|
# 673| --debug)
# 674|-> option_debug=1
# 675| shift
# 676| ;;
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:749:23: warning[SC2154]: upgradefrom_data_default is referenced but not assigned.
# 747|
# 748| if test upgrade = "$option_mode"; then
# 749|-> upgradefrom_data="$upgradefrom_data_default"
# 750|
# 751| if test -z "$option_upgradefrom_unit"; then
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-setup:760:37: warning[SC2154]: upgradefrom_id is referenced but not assigned.
# 758| # a different one, e.g. from postgresql92 to postgresql93, or from
# 759| # postgresql (system version) to postgresql94 (scl).
# 760|-> option_upgradefrom_unit=$upgradefrom_id
# 761|
# 762| # Try to predict situations: postgresql93@second -> postgresql94@second
Error: SHELLCHECK_WARNING (CWE-398):
/usr/bin/postgresql-setup:788:13: warning[SC2247]: Flip leading $ and " if this should be a quoted substitution.
# 786| error_q $"In order to use this script, please remove data_directory entry from"
# 787| error_q $"configuration file and make sure that the default location"
# 788|-> error_q $"(PGDATA) in .service file is valid."
# 789| exit 1
# 790| fi
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-upgrade:149:33: warning[SC2154]: upgradefrom_major is referenced but not assigned.
# 147| old_data_version="$(cat "$version_file")"
# 148|
# 149|-> if test "$old_data_version" != "$upgradefrom_major"; then
# 150| error "Cannot upgrade because the database in $option_datadir of"
# 151| error_q "version $old_data_version but it should be $upgradefrom_major"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-upgrade:155:12: warning[SC2154]: upgradefrom_engine is referenced but not assigned.
# 153| fi
# 154|
# 155|-> if [ ! -x "$upgradefrom_engine/postgres" ]; then
# 156| error "Please install the $upgradefrom_package package."
# 157| exit 1
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-upgrade:156:31: warning[SC2154]: upgradefrom_package is referenced but not assigned.
# 154|
# 155| if [ ! -x "$upgradefrom_engine/postgres" ]; then
# 156|-> error "Please install the $upgradefrom_package package."
# 157| exit 1
# 158| fi
Error: SHELLCHECK_WARNING (CWE-457):
/usr/bin/postgresql-upgrade:167:26: warning[SC2154]: data is referenced but not assigned.
# 165| test -r "$conffile" || {
# 166| error "config file $conffile is not readable or does not exist"
# 167|-> die "Old cluster in '$data' does not seem to be initialized"
# 168| }
# 169|
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/pgxs/config/install-sh:53:3: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
# 51| doit=${DOITPROG-}
# 52| if test -z "$doit"; then
# 53|-> doit_exec=exec
# 54| else
# 55| doit_exec=$doit
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/pgxs/config/install-sh:142:33: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.
# 140| shift;;
# 141|
# 142|-> --help) echo "$usage"; exit $?;;
# 143|
# 144| -m) mode=$2
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/pgxs/config/install-sh:167:47: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.
# 165| -T) no_target_directory=true;;
# 166|
# 167|-> --version) echo "$0 $scriptversion"; exit $?;;
# 168|
# 169| --) shift
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/pgxs/config/install-sh:188:11: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 186| if test -n "$dst_arg"; then
# 187| # $@ is not empty: it contains at least $arg.
# 188|-> set fnord "$@" "$dst_arg"
# 189| shift # fnord
# 190| fi
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/pgxs/config/install-sh:212:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 210| if test -z "$dir_arg"; then
# 211| do_exit='(exit $ret); exit $ret'
# 212|-> trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/pgxs/config/install-sh:213:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 211| do_exit='(exit $ret); exit $ret'
# 212| trap "ret=129; $do_exit" 1
# 213|-> trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/pgxs/config/install-sh:214:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 212| trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214|-> trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
# 216|
Error: SHELLCHECK_WARNING (CWE-398):
/usr/lib64/pgsql/pgxs/config/install-sh:214:28: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
# 212| trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214|-> trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
# 216|
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/pgxs/config/install-sh:215:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 213| trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
# 215|-> trap "ret=143; $do_exit" 15
# 216|
# 217| # Set umask so as not to create temps with too-generous modes.
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/pgxs/config/install-sh:348:31: warning[SC3028]: In POSIX sh, RANDOM is undefined.
# 346| ;;
# 347| *)
# 348|-> tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# 349| trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
# 350|
Error: SHELLCHECK_WARNING (CWE-457):
/usr/lib64/pgsql/pgxs/config/install-sh:349:11: warning[SC2154]: ret is referenced but not assigned.
# 347| *)
# 348| tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# 349|-> trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
# 350|
# 351| if (umask $mkdir_umask &&
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/pgxs/config/install-sh:404:11: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 402| IFS=/
# 403| $posix_glob set -f
# 404|-> set fnord $dstdir
# 405| shift
# 406| $posix_glob set +f
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/pgxs/config/install-sh:480:12: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 478| eval "$initialize_posix_glob" &&
# 479| $posix_glob set -f &&
# 480|-> set X $old && old=:$2:$4:$5:$6 &&
# 481| set X $new && new=:$2:$4:$5:$6 &&
# 482| $posix_glob set +f &&
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/pgxs/config/install-sh:481:12: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 479| $posix_glob set -f &&
# 480| set X $old && old=:$2:$4:$5:$6 &&
# 481|-> set X $new && new=:$2:$4:$5:$6 &&
# 482| $posix_glob set +f &&
# 483|
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:53:3: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
# 51| doit=${DOITPROG-}
# 52| if test -z "$doit"; then
# 53|-> doit_exec=exec
# 54| else
# 55| doit_exec=$doit
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:142:33: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.
# 140| shift;;
# 141|
# 142|-> --help) echo "$usage"; exit $?;;
# 143|
# 144| -m) mode=$2
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:167:47: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.
# 165| -T) no_target_directory=true;;
# 166|
# 167|-> --version) echo "$0 $scriptversion"; exit $?;;
# 168|
# 169| --) shift
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:188:11: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 186| if test -n "$dst_arg"; then
# 187| # $@ is not empty: it contains at least $arg.
# 188|-> set fnord "$@" "$dst_arg"
# 189| shift # fnord
# 190| fi
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:212:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 210| if test -z "$dir_arg"; then
# 211| do_exit='(exit $ret); exit $ret'
# 212|-> trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:213:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 211| do_exit='(exit $ret); exit $ret'
# 212| trap "ret=129; $do_exit" 1
# 213|-> trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:214:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 212| trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214|-> trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
# 216|
Error: SHELLCHECK_WARNING (CWE-398):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:214:28: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
# 212| trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214|-> trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
# 216|
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:215:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 213| trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
# 215|-> trap "ret=143; $do_exit" 15
# 216|
# 217| # Set umask so as not to create temps with too-generous modes.
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:348:31: warning[SC3028]: In POSIX sh, RANDOM is undefined.
# 346| ;;
# 347| *)
# 348|-> tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# 349| trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
# 350|
Error: SHELLCHECK_WARNING (CWE-457):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:349:11: warning[SC2154]: ret is referenced but not assigned.
# 347| *)
# 348| tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# 349|-> trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
# 350|
# 351| if (umask $mkdir_umask &&
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:404:11: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 402| IFS=/
# 403| $posix_glob set -f
# 404|-> set fnord $dstdir
# 405| shift
# 406| $posix_glob set +f
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:480:12: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 478| eval "$initialize_posix_glob" &&
# 479| $posix_glob set -f &&
# 480|-> set X $old && old=:$2:$4:$5:$6 &&
# 481| set X $new && new=:$2:$4:$5:$6 &&
# 482| $posix_glob set +f &&
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-16/lib/pgxs/config/install-sh:481:12: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 479| $posix_glob set -f &&
# 480| set X $old && old=:$2:$4:$5:$6 &&
# 481|-> set X $new && new=:$2:$4:$5:$6 &&
# 482| $posix_glob set +f &&
# 483|
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:53:3: warning[SC2209]: Use var=$(command) to assign output (or quote to assign string).
# 51| doit=${DOITPROG-}
# 52| if test -z "$doit"; then
# 53|-> doit_exec=exec
# 54| else
# 55| doit_exec=$doit
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:142:33: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.
# 140| shift;;
# 141|
# 142|-> --help) echo "$usage"; exit $?;;
# 143|
# 144| -m) mode=$2
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:167:47: warning[SC2320]: This $? refers to echo/printf, not a previous command. Assign to variable to avoid it being overwritten.
# 165| -T) no_target_directory=true;;
# 166|
# 167|-> --version) echo "$0 $scriptversion"; exit $?;;
# 168|
# 169| --) shift
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:188:11: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 186| if test -n "$dst_arg"; then
# 187| # $@ is not empty: it contains at least $arg.
# 188|-> set fnord "$@" "$dst_arg"
# 189| shift # fnord
# 190| fi
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:212:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 210| if test -z "$dir_arg"; then
# 211| do_exit='(exit $ret); exit $ret'
# 212|-> trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:213:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 211| do_exit='(exit $ret); exit $ret'
# 212| trap "ret=129; $do_exit" 1
# 213|-> trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:214:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 212| trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214|-> trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
# 216|
Error: SHELLCHECK_WARNING (CWE-398):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:214:28: warning[SC2172]: Trapping signals by number is not well defined. Prefer signal names.
# 212| trap "ret=129; $do_exit" 1
# 213| trap "ret=130; $do_exit" 2
# 214|-> trap "ret=141; $do_exit" 13
# 215| trap "ret=143; $do_exit" 15
# 216|
Error: SHELLCHECK_WARNING (CWE-569):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:215:18: warning[SC2064]: Use single quotes, otherwise this expands now rather than when signalled.
# 213| trap "ret=130; $do_exit" 2
# 214| trap "ret=141; $do_exit" 13
# 215|-> trap "ret=143; $do_exit" 15
# 216|
# 217| # Set umask so as not to create temps with too-generous modes.
Error: SHELLCHECK_WARNING:
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:348:31: warning[SC3028]: In POSIX sh, RANDOM is undefined.
# 346| ;;
# 347| *)
# 348|-> tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# 349| trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
# 350|
Error: SHELLCHECK_WARNING (CWE-457):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:349:11: warning[SC2154]: ret is referenced but not assigned.
# 347| *)
# 348| tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$
# 349|-> trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0
# 350|
# 351| if (umask $mkdir_umask &&
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:404:11: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 402| IFS=/
# 403| $posix_glob set -f
# 404|-> set fnord $dstdir
# 405| shift
# 406| $posix_glob set +f
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:480:12: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 478| eval "$initialize_posix_glob" &&
# 479| $posix_glob set -f &&
# 480|-> set X $old && old=:$2:$4:$5:$6 &&
# 481| set X $new && new=:$2:$4:$5:$6 &&
# 482| $posix_glob set +f &&
Error: SHELLCHECK_WARNING (CWE-456):
/usr/lib64/pgsql/postgresql-17/lib/pgxs/config/install-sh:481:12: warning[SC2121]: To assign a variable, use just 'var=value', no 'set ..'.
# 479| $posix_glob set -f &&
# 480| set X $old && old=:$2:$4:$5:$6 &&
# 481|-> set X $new && new=:$2:$4:$5:$6 &&
# 482| $posix_glob set +f &&
# 483|
Error: SHELLCHECK_WARNING (CWE-758):
/usr/share/postgresql-setup/library.sh:1:1: error[SC2148]: Tips depend on target shell and yours is unknown. Add a shebang or a 'shell' directive.
# 1|-> die() { echo >&2 $"FATAL: $@" ; exit 1 ; }
# 2| error() { echo >&2 $"ERROR: $@" ; }
# 3| error_q() { echo >&2 $" $@" ; }
Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/postgresql-setup/library.sh:8:19: warning[SC2154]: option_debug is referenced but not assigned.
# 6| info() { echo >&2 $" * $@" ; }
# 7| info_q() { echo >&2 $" $@" ; }
# 8|-> debug() { test "$option_debug" != "1" || echo >&2 $"DEBUG: $@"; }
# 9|
# 10|
Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/postgresql-setup/library.sh:67:11: warning[SC2034]: id appears unused. Verify use (or export if used externally).
# 65| local action="$1"
# 66| local expected_id="$2"
# 67|-> local id temp_major temp_engine temp_data_default temp_description
# 68|
# 69| local upgrade_confdir="/etc/postgresql-setup/upgrade"
Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/postgresql-setup/library.sh:67:14: warning[SC2034]: temp_major appears unused. Verify use (or export if used externally).
# 65| local action="$1"
# 66| local expected_id="$2"
# 67|-> local id temp_major temp_engine temp_data_default temp_description
# 68|
# 69| local upgrade_confdir="/etc/postgresql-setup/upgrade"
Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/postgresql-setup/library.sh:67:25: warning[SC2034]: temp_engine appears unused. Verify use (or export if used externally).
# 65| local action="$1"
# 66| local expected_id="$2"
# 67|-> local id temp_major temp_engine temp_data_default temp_description
# 68|
# 69| local upgrade_confdir="/etc/postgresql-setup/upgrade"
Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/postgresql-setup/library.sh:67:37: warning[SC2034]: temp_data_default appears unused. Verify use (or export if used externally).
# 65| local action="$1"
# 66| local expected_id="$2"
# 67|-> local id temp_major temp_engine temp_data_default temp_description
# 68|
# 69| local upgrade_confdir="/etc/postgresql-setup/upgrade"
Error: SHELLCHECK_WARNING (CWE-563):
/usr/share/postgresql-setup/library.sh:67:55: warning[SC2034]: temp_description appears unused. Verify use (or export if used externally).
# 65| local action="$1"
# 66| local expected_id="$2"
# 67|-> local id temp_major temp_engine temp_data_default temp_description
# 68|
# 69| local upgrade_confdir="/etc/postgresql-setup/upgrade"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/postgresql-setup/library.sh:81:19: warning[SC2154]: __pg_conf_id is referenced but not assigned.
# 79|
# 80| if test help = "$action"; then
# 81|-> echo "$__pg_conf_id - $__pg_conf_description"
# 82| elif test list = "$action"; then
# 83| echo "$__pg_conf_id $__pg_conf_major"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/postgresql-setup/library.sh:81:35: warning[SC2154]: __pg_conf_description is referenced but not assigned.
# 79|
# 80| if test help = "$action"; then
# 81|-> echo "$__pg_conf_id - $__pg_conf_description"
# 82| elif test list = "$action"; then
# 83| echo "$__pg_conf_id $__pg_conf_major"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/postgresql-setup/library.sh:83:33: warning[SC2154]: __pg_conf_major is referenced but not assigned.
# 81| echo "$__pg_conf_id - $__pg_conf_description"
# 82| elif test list = "$action"; then
# 83|-> echo "$__pg_conf_id $__pg_conf_major"
# 84| elif test config = "$action"; then
# 85| test "$__pg_conf_id" = "$expected_id" || continue
Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/postgresql-setup/library.sh:95:30: warning[SC2154]: upgrade_from_scls is referenced but not assigned.
# 93| case "$i" in
# 94| scls)
# 95|-> test -z "$upgrade_from_scls" \
# 96| || [[ $upgrade_from_scls =~ ^[-a-zA-Z0-9_\ ]+$ ]] \
# 97| || die "$cm: bad '$i' value '$upgrade_from_scls'"
Error: SHELLCHECK_WARNING (CWE-457):
/usr/share/postgresql-setup/library.sh:100:27: warning[SC2154]: upgradefrom_redhat_sockets_hack is referenced but not assigned.
# 98| ;;
# 99| redhat_sockets_hack)
# 100|-> case "$upgradefrom_redhat_sockets_hack" in
# 101| yes|no|'')
# 102| ;;
Error: SHELLCHECK_WARNING:
/usr/share/postgresql-setup/postgresql_pkg_tests.sh:9:11: warning[SC3028]: In POSIX sh, RANDOM is undefined.
# 7| try_random_port ()
# 8| {
# 9|-> _port=$RANDOM
# 10| if test -n "$_port" && eval '_port=$(( $_port + 32000 ))' 2>/dev/null; then
# 11| echo "$_port"
Error: SHELLCHECK_WARNING:
/usr/share/postgresql-setup/postgresql_pkg_tests.sh:86:9: warning[SC3011]: In POSIX sh, here-strings are undefined.
# 84| {
# 85| psql -d postgres --set=user="$1" --set=pass="$2" -tA \
# 86|-> <<<"ALTER USER :\"user\" WITH ENCRYPTED PASSWORD :'pass';"
# 87| }
# 88|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/bloom/blvacuum.c:149: warning[uninitvar]: Uninitialized variable: notFullPage
# 147|
# 148| metaData = BloomPageGetMeta(page);
# 149|-> memcpy(metaData->notFullPage, notFullPage, sizeof(BlockNumber) * countPage);
# 150| metaData->nStart = 0;
# 151| metaData->nEnd = countPage;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/bloom/blvacuum.c:149:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘¬FullPage’
postgresql-18.3/contrib/bloom/blvacuum.c:54:40: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/bloom/blvacuum.c:60:17: branch_true: ...to here
postgresql-18.3/contrib/bloom/blvacuum.c:119:20: branch_false: following ‘false’ branch (when ‘itup == itupPtr’)...
postgresql-18.3/contrib/bloom/blvacuum.c:132:25: branch_false: ...to here
postgresql-18.3/contrib/bloom/blvacuum.c:149:9: danger: use of uninitialized value ‘¬FullPage’ here
# 147|
# 148| metaData = BloomPageGetMeta(page);
# 149|-> memcpy(metaData->notFullPage, notFullPage, sizeof(BlockNumber) * countPage);
# 150| metaData->nStart = 0;
# 151| metaData->nEnd = countPage;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/btree_gist/btree_utils_num.c:90:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘leaf’
postgresql-18.3/contrib/btree_gist/btree_utils_num.c:18:12: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/btree_gist/btree_utils_num.c:34:56: branch_true: ...to here
postgresql-18.3/contrib/btree_gist/btree_utils_num.c:90:17: danger: use of uninitialized value ‘leaf’ here
# 88| Assert(tinfo->indexsize >= 2 * tinfo->size);
# 89|
# 90|-> memcpy(&r[0], leaf, tinfo->size);
# 91| memcpy(&r[tinfo->size], leaf, tinfo->size);
# 92| retval = palloc(sizeof(GISTENTRY));
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/cube/cubeparse.c:975:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:939:28: branch_true: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:962:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/contrib/cube/cubeparse.c:964:7: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:973:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:975:9: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:975:9: danger: use of uninitialized value ‘yyss’ here
# 973| if (! yyptr)
# 974| YYNOMEM;
# 975|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 976| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 977| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/cube/cubeparse.y:51:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1012:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/cube/cubeparse.c:1021:16: branch_true: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1030:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/cube/cubeparse.c:1042:17: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1049:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:1052:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1069:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1082:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1084:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.y:51:23: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 49| int dim;
# 50|
# 51|-> dim = item_count($2, ',');
# 52| if (item_count($4, ',') != dim)
# 53| {
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/cube/cubeparse.y:52:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951]’
postgresql-18.3/contrib/cube/cubeparse.c:854:1: enter_function: entry to ‘cube_yyparse’
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1012:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/cube/cubeparse.c:1021:16: branch_true: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1030:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/cube/cubeparse.c:1042:17: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1049:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:1052:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1069:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1082:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1084:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.y:51:23: call_function: inlined call to ‘item_count’ from ‘cube_yyparse’
postgresql-18.3/contrib/cube/cubeparse.y:52:21: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.y:52:21: danger: use of uninitialized value ‘yyvsp[2305843009213693951]’ here
# 50|
# 51| dim = item_count($2, ',');
# 52|-> if (item_count($4, ',') != dim)
# 53| {
# 54| errsave(escontext,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/cube/cubeparse.y:81:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1012:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/cube/cubeparse.c:1021:16: branch_true: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1030:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/cube/cubeparse.c:1042:17: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1049:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:1052:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1069:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1082:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1084:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.y:81:23: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 79| int dim;
# 80|
# 81|-> dim = item_count($1, ',');
# 82| if (item_count($3, ',') != dim)
# 83| {
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/cube/cubeparse.y:146:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951]’
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1012:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/cube/cubeparse.c:1021:16: branch_true: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1030:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/cube/cubeparse.c:1042:17: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1049:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:1052:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1069:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1082:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1084:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.y:146:17: danger: use of uninitialized value ‘yyvsp[2305843009213693951]’ here
# 144| paren_list: O_PAREN list C_PAREN
# 145| {
# 146|-> $$ = $2;
# 147| }
# 148| | O_PAREN C_PAREN
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/cube/cubeparse.y:162:17: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1012:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1018:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/cube/cubeparse.c:1021:16: branch_true: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1030:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/cube/cubeparse.c:1042:17: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1049:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:1052:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1062:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1069:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:933:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:997:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/contrib/cube/cubeparse.c:1000:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.c:1082:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/cube/cubeparse.c:1084:3: branch_false: ...to here
postgresql-18.3/contrib/cube/cubeparse.y:162:17: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 160| | list COMMA CUBEFLOAT
# 161| {
# 162|-> $$ = $1;
# 163| strcat($$, ",");
# 164| strcat($$, $3);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/contrib/cube/cubescan.c:1621:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/contrib/cube/cubescan.c:1500:10: enter_function: entry to ‘cube_yyrestart’
postgresql-18.3/contrib/cube/cubescan.c:1505:16: call_function: calling ‘cube_yyensure_buffer_stack’ from ‘cube_yyrestart’
postgresql-18.3/contrib/cube/cubescan.c:1505:16: return_function: returning to ‘cube_yyrestart’ from ‘cube_yyensure_buffer_stack’
postgresql-18.3/contrib/cube/cubescan.c:1507:27: call_function: calling ‘cube_yy_create_buffer’ from ‘cube_yyrestart’
postgresql-18.3/contrib/cube/cubescan.c:1507:27: return_function: returning to ‘cube_yyrestart’ from ‘cube_yy_create_buffer’
postgresql-18.3/contrib/cube/cubescan.c:1510:2: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/cube/cubescan.c:1510:2: branch_false: ...to here
postgresql-18.3/contrib/cube/cubescan.c:1510:2: call_function: calling ‘cube_yy_init_buffer’ from ‘cube_yyrestart’
# 1619|
# 1620| yy_flush_buffer( b , yyscanner);
# 1621|->
# 1622| b->yy_input_file = file;
# 1623| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/dblink/dblink.c:700: error[legacyUninitvar]: Uninitialized variable: conn
# 698|
# 699| /* async query send */
# 700|-> retval = PQsendQuery(conn, sql);
# 701| if (retval != 1)
# 702| elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/dblink/dblink.c:700: error[legacyUninitvar]: Uninitialized variable: sql
# 698|
# 699| /* async query send */
# 700|-> retval = PQsendQuery(conn, sql);
# 701| if (retval != 1)
# 702| elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));
Error: CPPCHECK_WARNING (CWE-768):
postgresql-18.3/contrib/hstore/hstore_io.c:470: error[unknownEvaluationOrder]: Expression '(entry)++->entry' depends on order of evaluation of side effects
# 468|
# 469| for (i = 0; i < pcount; i++)
# 470|-> HS_ADDITEM(entry, buf, ptr, pairs[i]);
# 471|
# 472| HS_FINALIZE(out, pcount, buf, ptr);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/hstore/hstore_io.c:470: warning[uninitvar]: Uninitialized variable: pairs.val
# 468|
# 469| for (i = 0; i < pcount; i++)
# 470|-> HS_ADDITEM(entry, buf, ptr, pairs[i]);
# 471|
# 472| HS_FINALIZE(out, pcount, buf, ptr);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/contrib/hstore/hstore_op.c:341:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/contrib/hstore/hstore_op.c:292:1: enter_function: entry to ‘hstore_delete_array’
postgresql-18.3/contrib/hstore/hstore_op.c:307:33: call_function: calling ‘hstoreArrayToPairs’ from ‘hstore_delete_array’
postgresql-18.3/contrib/hstore/hstore_op.c:307:33: return_function: returning to ‘hstore_delete_array’ from ‘hstoreArrayToPairs’
postgresql-18.3/contrib/hstore/hstore_op.c:317:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/hstore/hstore_op.c:317:12: branch_false: ...to here
postgresql-18.3/contrib/hstore/hstore_op.c:331:25: branch_true: following ‘true’ branch (when ‘i < hs_count’)...
postgresql-18.3/contrib/hstore/hstore_op.c:335:21: branch_true: ...to here
postgresql-18.3/contrib/hstore/hstore_op.c:335:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/hstore/hstore_op.c:339:59: branch_false: ...to here
postgresql-18.3/contrib/hstore/hstore_op.c:341:40: danger: dereference of NULL ‘hstoreArrayToPairs(pg_detoast_datum((char *)*fcinfo.args[1].value), &nkeys) + (long unsigned int)j * 40’
# 339| int skeylen = HSTORE_KEYLEN(es, i);
# 340|
# 341|-> if (skeylen == key_pairs[j].keylen)
# 342| difference = memcmp(HSTORE_KEY(es, ps, i),
# 343| key_pairs[j].key,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/hstore_plpython/hstore_plpython.c:192: warning[uninitvar]: Uninitialized variables: out.vl_len_, out.size_
# 190| PG_END_TRY();
# 191|
# 192|-> PG_RETURN_POINTER(out);
# 193| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/contrib/intarray/_intbig_gist.c:173: warning[nullPointer]: Possible null pointer dereference: ptr
# 171| while (num--)
# 172| {
# 173|-> HASH(GETSIGN(res), *ptr, siglen);
# 174| ptr++;
# 175| }
Error: CPPCHECK_WARNING (CWE-682):
postgresql-18.3/contrib/intarray/_intbig_gist.c:174: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 172| {
# 173| HASH(GETSIGN(res), *ptr, siglen);
# 174|-> ptr++;
# 175| }
# 176|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/contrib/ltree/ltree_gist.c:76:17: warning[-Wanalyzer-null-argument]: use of NULL ‘left’ where non-null expected
postgresql-18.3/contrib/ltree/ltree_gist.c:192:1: enter_function: entry to ‘ltree_union’
postgresql-18.3/contrib/ltree/ltree_gist.c:207:21: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/ltree/ltree_gist.c:240:12: branch_false: ...to here
postgresql-18.3/contrib/ltree/ltree_gist.c:240:12: branch_false: following ‘false’ branch (when ‘isalltrue == 0’)...
postgresql-18.3/contrib/ltree/ltree_gist.c:240:12: branch_false: ...to here
postgresql-18.3/contrib/ltree/ltree_gist.c:253:18: call_function: calling ‘ltree_gist_alloc’ from ‘ltree_union’
# 74| Assert(left);
# 75| result->flag = LTG_ONENODE;
# 76|-> memcpy(LTG_NODE(result), left, VARSIZE(left));
# 77| }
# 78|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/pg_prewarm/autoprewarm.c:859: warning[uninitvar]: Uninitialized variable: num_blocks
# 857| PG_END_ENSURE_ERROR_CLEANUP(apw_detach_shmem, 0);
# 858|
# 859|-> PG_RETURN_INT64((int64) num_blocks);
# 860| }
# 861|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/contrib/pg_trgm/trgm_gin.c:144: warning[nullPointer]: Possible null pointer dereference: (union varattrib_4b*)(trg)
# 142| }
# 143|
# 144|-> trglen = ARRNELEM(trg);
# 145| *nentries = trglen;
# 146|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/contrib/pg_trgm/trgm_regexp.c:2004:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/contrib/pg_trgm/trgm_regexp.c:1974:16: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/pg_trgm/trgm_regexp.c:1974:16: branch_true: ...to here
postgresql-18.3/contrib/pg_trgm/trgm_regexp.c:1990:28: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/pg_trgm/trgm_regexp.c:1994:59: branch_true: ...to here
postgresql-18.3/contrib/pg_trgm/trgm_regexp.c:2004:60: danger: dereference of NULL ‘<unknown>’
# 2002| arcs[arcIndex].sourceState = source->snumber;
# 2003| arcs[arcIndex].targetState = target->snumber;
# 2004|-> arcs[arcIndex].colorTrgm = ctrgm->cnumber;
# 2005| arcIndex++;
# 2006| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:449:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*x’
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:582:1: enter_function: entry to ‘_crypt_blowfish_rn’
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:605:12: branch_false: following ‘false’ branch (when ‘size > 60’)...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:614:13: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:614:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:620:17: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:621:18: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:622:17: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:623:17: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:624:17: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:634:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/pgcrypto/crypt-blowfish.c:641:9: call_function: calling ‘BF_swap’ from ‘_crypt_blowfish_rn’
# 447| do
# 448| {
# 449|-> tmp = *x;
# 450| tmp = (tmp << 16) | (tmp >> 16);
# 451| *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/pgcrypto/crypt-des.c:409:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((const uint32 *)key)[1]’
postgresql-18.3/contrib/pgcrypto/crypt-des.c:651:1: enter_function: entry to ‘px_crypt_des’
postgresql-18.3/contrib/pgcrypto/crypt-des.c:679:13: call_function: calling ‘des_setkey’ from ‘px_crypt_des’
# 407|
# 408| rawkey0 = pg_ntoh32(*(const uint32 *) key);
# 409|-> rawkey1 = pg_ntoh32(*(const uint32 *) (key + 4));
# 410|
# 411| if ((rawkey0 | rawkey1)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/pgcrypto/pgp-pgsql.c:403: error[uninitvar]: Uninitialized variable: tmp
# 401| * reserve room for header
# 402| */
# 403|-> mbuf_append(dst, tmp, VARHDRSZ);
# 404|
# 405| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/pgcrypto/pgp-pgsql.c:482: error[uninitvar]: Uninitialized variable: tmp
# 480| * reserve room for header
# 481| */
# 482|-> mbuf_append(dst, tmp, VARHDRSZ);
# 483|
# 484| /*
Error: CPPCHECK_WARNING (CWE-909):
postgresql-18.3/contrib/postgres_fdw/deparse.c:1922: error[uninitStructMember]: Uninitialized struct member: join_sql_o.len
# 1920| if (fpinfo->jointype == JOIN_SEMI)
# 1921| {
# 1922|-> appendBinaryStringInfo(buf, join_sql_o.data, join_sql_o.len);
# 1923| }
# 1924| else
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/contrib/postgres_fdw/postgres_fdw.c:7633: warning[nullPointer]: Possible null pointer dereference: fsstate
# 7631| {
# 7632| Assert(fsstate);
# 7633|-> tupdesc = fsstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
# 7634| }
# 7635|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/seg/segparse.c:970:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/seg/segparse.c:934:28: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:957:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/contrib/seg/segparse.c:959:7: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:968:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:970:9: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:970:9: danger: use of uninitialized value ‘yyss’ here
# 968| if (! yyptr)
# 969| YYNOMEM;
# 970|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 971| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 972| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:66:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:66:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 64| char strbuf[25];
# 65|
# 66|-> result->lower = $1.val - $3.val;
# 67| result->upper = $1.val + $3.val;
# 68| snprintf(strbuf, sizeof(strbuf), "%g", result->lower);
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:67:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:67:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 65|
# 66| result->lower = $1.val - $3.val;
# 67|-> result->upper = $1.val + $3.val;
# 68| snprintf(strbuf, sizeof(strbuf), "%g", result->lower);
# 69| result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:69:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:69:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 67| result->upper = $1.val + $3.val;
# 68| snprintf(strbuf, sizeof(strbuf), "%g", result->lower);
# 69|-> result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 70| snprintf(strbuf, sizeof(strbuf), "%g", result->upper);
# 71| result->u_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:71:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:71:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 69| result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 70| snprintf(strbuf, sizeof(strbuf), "%g", result->upper);
# 71|-> result->u_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 72| result->l_ext = '\0';
# 73| result->u_ext = '\0';
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:80:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:80:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 78| | boundary RANGE boundary
# 79| {
# 80|-> result->lower = $1.val;
# 81| result->upper = $3.val;
# 82| if ( result->lower > result->upper ) {
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:90:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:82:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.y:90:34: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:90:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 88| YYERROR;
# 89| }
# 90|-> result->l_sigd = $1.sigd;
# 91| result->u_sigd = $3.sigd;
# 92| result->l_ext = ( $1.ext ? $1.ext : '\0' );
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/contrib/seg/segparse.y:92:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:82:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.y:90:34: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:92:57: danger: out-of-bounds read at byte -4 but ‘yyvsa’ starts at byte 0
# 90| result->l_sigd = $1.sigd;
# 91| result->u_sigd = $3.sigd;
# 92|-> result->l_ext = ( $1.ext ? $1.ext : '\0' );
# 93| result->u_ext = ( $3.ext ? $3.ext : '\0' );
# 94| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/seg/segparse.y:98:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].bnd.val’
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:98:33: danger: use of uninitialized value ‘yyvsp[2305843009213693951].bnd.val’ here
# 96| | boundary RANGE
# 97| {
# 98|-> result->lower = $1.val;
# 99| result->upper = HUGE_VAL;
# 100| result->l_sigd = $1.sigd;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/contrib/seg/segparse.y:144:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].text’
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1007:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1013:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/contrib/seg/segparse.c:1016:16: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.c:1025:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/contrib/seg/segparse.c:1037:17: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1044:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:1047:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1057:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/contrib/seg/segparse.c:1064:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:928:6: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:992:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/contrib/seg/segparse.c:995:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.c:1077:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/contrib/seg/segparse.c:1079:3: branch_false: ...to here
postgresql-18.3/contrib/seg/segparse.y:141:20: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/seg/segparse.y:144:35: branch_true: ...to here
postgresql-18.3/contrib/seg/segparse.y:144:35: danger: use of uninitialized value ‘yyvsp[2305843009213693951].text’ here
# 142| YYABORT;
# 143|
# 144|-> $$.ext = $1[0];
# 145| $$.sigd = sig_digits($2);
# 146| $$.val = val;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/contrib/seg/segscan.c:1604:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/contrib/seg/segscan.c:1483:10: enter_function: entry to ‘seg_yyrestart’
postgresql-18.3/contrib/seg/segscan.c:1488:16: call_function: calling ‘seg_yyensure_buffer_stack’ from ‘seg_yyrestart’
postgresql-18.3/contrib/seg/segscan.c:1488:16: return_function: returning to ‘seg_yyrestart’ from ‘seg_yyensure_buffer_stack’
postgresql-18.3/contrib/seg/segscan.c:1490:27: call_function: calling ‘seg_yy_create_buffer’ from ‘seg_yyrestart’
postgresql-18.3/contrib/seg/segscan.c:1490:27: return_function: returning to ‘seg_yyrestart’ from ‘seg_yy_create_buffer’
postgresql-18.3/contrib/seg/segscan.c:1493:2: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/seg/segscan.c:1493:2: branch_false: ...to here
postgresql-18.3/contrib/seg/segscan.c:1493:2: call_function: calling ‘seg_yy_init_buffer’ from ‘seg_yyrestart’
# 1602|
# 1603| yy_flush_buffer( b , yyscanner);
# 1604|->
# 1605| b->yy_input_file = file;
# 1606| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/sepgsql/label.c:605: warning[uninitvar]: Uninitialized variable: result
# 603| PG_END_TRY();
# 604|
# 605|-> PG_RETURN_TEXT_P(cstring_to_text(result));
# 606| }
# 607|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/sepgsql/label.c:643: warning[uninitvar]: Uninitialized variable: result
# 641| PG_END_TRY();
# 642|
# 643|-> PG_RETURN_TEXT_P(cstring_to_text(result));
# 644| }
# 645|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/contrib/sepgsql/selinux.c:887: warning[uninitvar]: Uninitialized variable: result
# 885| PG_END_TRY();
# 886|
# 887|-> return result;
# 888| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/contrib/spi/refint.c:165:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-18.3/contrib/spi/refint.c:78:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:83:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:87:14: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:87:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:92:13: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:108:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:112:9: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:134:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:138:9: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:138:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-18.3/contrib/spi/refint.c:141:76: branch_true: ...to here
postgresql-18.3/contrib/spi/refint.c:144:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:151:22: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:158:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:164:21: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:164:20: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/spi/refint.c:165:33: branch_true: ...to here
postgresql-18.3/contrib/spi/refint.c:165:25: danger: dereference of NULL ‘argtypes + (long unsigned int)i * 4’
# 163|
# 164| if (plan->nplans <= 0) /* Get typeId of column */
# 165|-> argtypes[i] = SPI_gettypeid(tupdesc, fnumber);
# 166| }
# 167|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/contrib/spi/refint.c:414:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-18.3/contrib/spi/refint.c:280:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:285:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:290:13: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:290:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:294:14: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:294:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:299:9: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:306:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:311:9: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:315:12: branch_false: following ‘false’ branch (when ‘nargs > 4’)...
postgresql-18.3/contrib/spi/refint.c:320:17: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:321:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:324:18: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:331:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:352:9: branch_false: following ‘false’ branch (when ‘is_update == 0’)...
postgresql-18.3/contrib/spi/refint.c:352:9: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:356:12: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:362:17: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:362:17: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:368:9: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:368:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-18.3/contrib/spi/refint.c:371:76: branch_true: ...to here
postgresql-18.3/contrib/spi/refint.c:374:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:381:22: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:388:20: branch_false: following ‘false’ branch...
postgresql-18.3/contrib/spi/refint.c:399:20: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:399:20: branch_false: following ‘false’ branch (when ‘newtuple’ is NULL)...
postgresql-18.3/contrib/spi/refint.c:399:20: branch_false: ...to here
postgresql-18.3/contrib/spi/refint.c:413:20: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/spi/refint.c:414:33: branch_true: ...to here
postgresql-18.3/contrib/spi/refint.c:414:25: danger: dereference of NULL ‘argtypes + (long unsigned int)i * 4’
# 412|
# 413| if (plan->nplans <= 0) /* Get typeId of column */
# 414|-> argtypes[i] = SPI_gettypeid(tupdesc, fnumber);
# 415| }
# 416| args_temp = args;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘X509_NAME_field_to_text’
postgresql-18.3/contrib/sslinfo/sslinfo.c:215:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 215 | data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# | ^
# 213| if (index < 0)
# 214| return (Datum) 0;
# 215|-> data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# 216| return ASN1_STRING_to_text(data);
# 217| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c:215:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 213| if (index < 0)
# 214| return (Datum) 0;
# 215|-> data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# 216| return ASN1_STRING_to_text(data);
# 217| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_client_dn_field’
postgresql-18.3/contrib/sslinfo/sslinfo.c:246:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 246 | result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/contrib/sslinfo/sslinfo.c:197:36: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 197 | X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
# | ~~~~~~~~~~~^~~~
# 244| PG_RETURN_NULL();
# 245|
# 246|-> result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# 247|
# 248| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c:246:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 244| PG_RETURN_NULL();
# 245|
# 246|-> result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# 247|
# 248| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_issuer_field’
postgresql-18.3/contrib/sslinfo/sslinfo.c:281:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 281 | result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/contrib/sslinfo/sslinfo.c:197:36: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 197 | X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
# | ~~~~~~~~~~~^~~~
# 279| PG_RETURN_NULL();
# 280|
# 281|-> result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# 282|
# 283| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c:281:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 279| PG_RETURN_NULL();
# 280|
# 281|-> result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# 282|
# 283| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_extension_info’
postgresql-18.3/contrib/sslinfo/sslinfo.c:437:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 437 | ext = X509_get_ext(cert, call_cntr);
# | ^
# 435|
# 436| /* Get the extension from the certificate */
# 437|-> ext = X509_get_ext(cert, call_cntr);
# 438| obj = X509_EXTENSION_get_object(ext);
# 439|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c:437:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 435|
# 436| /* Get the extension from the certificate */
# 437|-> ext = X509_get_ext(cert, call_cntr);
# 438| obj = X509_EXTENSION_get_object(ext);
# 439|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c:438:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 438 | obj = X509_EXTENSION_get_object(ext);
# | ^
# 436| /* Get the extension from the certificate */
# 437| ext = X509_get_ext(cert, call_cntr);
# 438|-> obj = X509_EXTENSION_get_object(ext);
# 439|
# 440| /* Get the extension name */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/contrib/sslinfo/sslinfo.c:438:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 436| /* Get the extension from the certificate */
# 437| ext = X509_get_ext(cert, call_cntr);
# 438|-> obj = X509_EXTENSION_get_object(ext);
# 439|
# 440| /* Get the extension name */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/contrib/unaccent/unaccent.c:257: warning[nullPointer]: Possible null pointer dereference: trg
# 255| trgstore = (char *) palloc(sizeof(char) * trglen);
# 256| trgstorelen = trglen;
# 257|-> memcpy(trgstore, trg, trgstorelen);
# 258| }
# 259|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/contrib/unaccent/unaccent.c:257:41: warning[-Wanalyzer-null-argument]: use of NULL ‘trg’ where non-null expected
postgresql-18.3/contrib/unaccent/unaccent.c:338:1: enter_function: entry to ‘unaccent_init’
postgresql-18.3/contrib/unaccent/unaccent.c:345:9: branch_true: following ‘true’ branch...
postgresql-18.3/contrib/unaccent/unaccent.c:349:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/contrib/unaccent/unaccent.c:351:28: branch_true: ...to here
postgresql-18.3/contrib/unaccent/unaccent.c:351:28: branch_false: following ‘false’ branch (when ‘fileloaded == 0’)...
postgresql-18.3/contrib/unaccent/unaccent.c:355:45: branch_false: ...to here
postgresql-18.3/contrib/unaccent/unaccent.c:355:36: call_function: calling ‘initTrie’ from ‘unaccent_init’
# 255| trgstore = (char *) palloc(sizeof(char) * trglen);
# 256| trgstorelen = trglen;
# 257|-> memcpy(trgstore, trg, trgstorelen);
# 258| }
# 259|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:153: warning[uninitvar]: Uninitialized variable: notFullPage
# 151|
# 152| metaData = BloomPageGetMeta(page);
# 153|-> memcpy(metaData->notFullPage, notFullPage, sizeof(BlockNumber) * countPage);
# 154| metaData->nStart = 0;
# 155| metaData->nEnd = countPage;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:153:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘¬FullPage’
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:58:40: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:64:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:123:20: branch_false: following ‘false’ branch (when ‘itup == itupPtr’)...
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:136:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/bloom/blvacuum.c:153:9: danger: use of uninitialized value ‘¬FullPage’ here
# 151|
# 152| metaData = BloomPageGetMeta(page);
# 153|-> memcpy(metaData->notFullPage, notFullPage, sizeof(BlockNumber) * countPage);
# 154| metaData->nStart = 0;
# 155| metaData->nEnd = countPage;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/btree_gist/btree_utils_num.c:90:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘leaf’
postgresql-18.3/postgresql-16.11/contrib/btree_gist/btree_utils_num.c:18:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/btree_gist/btree_utils_num.c:34:56: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/btree_gist/btree_utils_num.c:90:17: danger: use of uninitialized value ‘leaf’ here
# 88| Assert(tinfo->indexsize >= 2 * tinfo->size);
# 89|
# 90|-> memcpy(&r[0], leaf, tinfo->size);
# 91| memcpy(&r[tinfo->size], leaf, tinfo->size);
# 92| retval = palloc(sizeof(GISTENTRY));
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:971:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:935:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:958:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:960:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:969:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:971:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:971:9: danger: use of uninitialized value ‘yyss’ here
# 969| if (! yyptr)
# 970| YYNOMEM;
# 971|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 972| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 973| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:50:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -4’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:50:23: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 48| int dim;
# 49|
# 50|-> dim = item_count($2, ',');
# 51| if (item_count($4, ',') != dim)
# 52| {
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:51:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951]’
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:863:1: enter_function: entry to ‘cube_yyparse’
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -4’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:50:23: call_function: inlined call to ‘item_count’ from ‘cube_yyparse’
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:51:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:51:21: danger: use of uninitialized value ‘yyvsp[2305843009213693951]’ here
# 49|
# 50| dim = item_count($2, ',');
# 51|-> if (item_count($4, ',') != dim)
# 52| {
# 53| errsave(escontext,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:78:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -4’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubeparse.y:78:23: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 76| int dim;
# 77|
# 78|-> dim = item_count($1, ',');
# 79| if (item_count($3, ',') != dim)
# 80| {
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1583:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1570:21: enter_function: entry to ‘cube_yy_create_buffer’
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1574:31: call_function: inlined call to ‘cube_yyalloc’ from ‘cube_yy_create_buffer’
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1575:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1578:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1583:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1581| * we need to put in 2 end-of-buffer characters.
# 1582| */
# 1583|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1584| if ( ! b->yy_ch_buf )
# 1585| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1624: warning[nullPointer]: Possible null pointer dereference: b
# 1622| yy_flush_buffer( b );
# 1623|
# 1624|-> b->yy_input_file = file;
# 1625| b->yy_fill_buffer = 1;
# 1626|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1625: warning[nullPointer]: Possible null pointer dereference: b
# 1623|
# 1624| b->yy_input_file = file;
# 1625|-> b->yy_fill_buffer = 1;
# 1626|
# 1627| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1838:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1822:17: enter_function: entry to ‘cube_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1831:24: call_function: inlined call to ‘cube_yyalloc’ from ‘cube_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1832:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1832:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/cube/cubescan.c:1840:13: call_function: calling ‘cube_yy_scan_buffer’ from ‘cube_yy_scan_bytes’
# 1836| buf[i] = yybytes[i];
# 1837|
# 1838|-> buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1839|
# 1840| b = yy_scan_buffer( buf, n );
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/dblink/dblink.c:676: error[legacyUninitvar]: Uninitialized variable: conn
# 674|
# 675| /* async query send */
# 676|-> retval = PQsendQuery(conn, sql);
# 677| if (retval != 1)
# 678| elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/dblink/dblink.c:676: error[legacyUninitvar]: Uninitialized variable: sql
# 674|
# 675| /* async query send */
# 676|-> retval = PQsendQuery(conn, sql);
# 677| if (retval != 1)
# 678| elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));
Error: CPPCHECK_WARNING (CWE-768):
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_io.c:466: error[unknownEvaluationOrder]: Expression '(entry)++->entry' depends on order of evaluation of side effects
# 464|
# 465| for (i = 0; i < pcount; i++)
# 466|-> HS_ADDITEM(entry, buf, ptr, pairs[i]);
# 467|
# 468| HS_FINALIZE(out, pcount, buf, ptr);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_io.c:466: warning[uninitvar]: Uninitialized variable: pairs.val
# 464|
# 465| for (i = 0; i < pcount; i++)
# 466|-> HS_ADDITEM(entry, buf, ptr, pairs[i]);
# 467|
# 468| HS_FINALIZE(out, pcount, buf, ptr);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:341:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:292:1: enter_function: entry to ‘hstore_delete_array’
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:307:33: call_function: calling ‘hstoreArrayToPairs’ from ‘hstore_delete_array’
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:307:33: return_function: returning to ‘hstore_delete_array’ from ‘hstoreArrayToPairs’
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:317:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:317:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:331:25: branch_true: following ‘true’ branch (when ‘i < hs_count’)...
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:335:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:335:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:339:59: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/hstore/hstore_op.c:341:40: danger: dereference of NULL ‘hstoreArrayToPairs(pg_detoast_datum((char *)*fcinfo.args[1].value), &nkeys) + (long unsigned int)j * 40’
# 339| int skeylen = HSTORE_KEYLEN(es, i);
# 340|
# 341|-> if (skeylen == key_pairs[j].keylen)
# 342| difference = memcmp(HSTORE_KEY(es, ps, i),
# 343| key_pairs[j].key,
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/intarray/_intbig_gist.c:172: warning[nullPointer]: Possible null pointer dereference: ptr
# 170| while (num--)
# 171| {
# 172|-> HASH(GETSIGN(res), *ptr, siglen);
# 173| ptr++;
# 174| }
Error: CPPCHECK_WARNING (CWE-682):
postgresql-18.3/postgresql-16.11/contrib/intarray/_intbig_gist.c:173: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 171| {
# 172| HASH(GETSIGN(res), *ptr, siglen);
# 173|-> ptr++;
# 174| }
# 175|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:76:17: warning[-Wanalyzer-null-argument]: use of NULL ‘left’ where non-null expected
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:192:1: enter_function: entry to ‘ltree_union’
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:207:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:240:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:240:12: branch_false: following ‘false’ branch (when ‘isalltrue == 0’)...
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:240:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/ltree/ltree_gist.c:253:18: call_function: calling ‘ltree_gist_alloc’ from ‘ltree_union’
# 74| Assert(left);
# 75| result->flag = LTG_ONENODE;
# 76|-> memcpy(LTG_NODE(result), left, VARSIZE(left));
# 77| }
# 78|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_gin.c:144: warning[nullPointer]: Possible null pointer dereference: (union varattrib_4b*)(trg)
# 142| }
# 143|
# 144|-> trglen = ARRNELEM(trg);
# 145| *nentries = trglen;
# 146|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_regexp.c:1999:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_regexp.c:1969:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_regexp.c:1969:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_regexp.c:1985:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_regexp.c:1989:59: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/pg_trgm/trgm_regexp.c:1999:60: danger: dereference of NULL ‘<unknown>’
# 1997| arcs[arcIndex].sourceState = source->snumber;
# 1998| arcs[arcIndex].targetState = target->snumber;
# 1999|-> arcs[arcIndex].colorTrgm = ctrgm->cnumber;
# 2000| arcIndex++;
# 2001| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:449:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*x’
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:582:1: enter_function: entry to ‘_crypt_blowfish_rn’
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:605:12: branch_false: following ‘false’ branch (when ‘size > 60’)...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:614:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:614:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:620:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:621:18: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:622:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:623:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:624:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:634:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-blowfish.c:641:9: call_function: calling ‘BF_swap’ from ‘_crypt_blowfish_rn’
# 447| do
# 448| {
# 449|-> tmp = *x;
# 450| tmp = (tmp << 16) | (tmp >> 16);
# 451| *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-des.c:409:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((const uint32 *)key)[1]’
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-des.c:651:1: enter_function: entry to ‘px_crypt_des’
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/crypt-des.c:679:13: call_function: calling ‘des_setkey’ from ‘px_crypt_des’
# 407|
# 408| rawkey0 = pg_ntoh32(*(const uint32 *) key);
# 409|-> rawkey1 = pg_ntoh32(*(const uint32 *) (key + 4));
# 410|
# 411| if ((rawkey0 | rawkey1)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/pgp-pgsql.c:403: error[uninitvar]: Uninitialized variable: tmp
# 401| * reserve room for header
# 402| */
# 403|-> mbuf_append(dst, tmp, VARHDRSZ);
# 404|
# 405| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/pgcrypto/pgp-pgsql.c:482: error[uninitvar]: Uninitialized variable: tmp
# 480| * reserve room for header
# 481| */
# 482|-> mbuf_append(dst, tmp, VARHDRSZ);
# 483|
# 484| /*
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:3416:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘aggcosts.transCost.per_tuple’
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6903:1: enter_function: entry to ‘add_foreign_final_paths’
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6924:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6931:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6935:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6939:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6956:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7030:13: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7063:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7077:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7077:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7084:56: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7084:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7085:60: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7084:13: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7089:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7109:12: branch_false: following ‘false’ branch (when ‘has_final_sort == 0’)...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7111:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7114:9: call_function: calling ‘estimate_path_cost_size’ from ‘add_foreign_final_paths’
# 3414| startup_cost += outerrel->reltarget->cost.startup;
# 3415| startup_cost += aggcosts.transCost.startup;
# 3416|-> startup_cost += aggcosts.transCost.per_tuple * input_rows;
# 3417| startup_cost += aggcosts.finalCost.startup;
# 3418| startup_cost += (cpu_operator_cost * numGroupCols) * input_rows;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:3417:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘aggcosts.finalCost.startup’
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6770:1: enter_function: entry to ‘add_foreign_ordered_paths’
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6789:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6793:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6811:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6833:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:6871:9: call_function: calling ‘estimate_path_cost_size’ from ‘add_foreign_ordered_paths’
# 3415| startup_cost += aggcosts.transCost.startup;
# 3416| startup_cost += aggcosts.transCost.per_tuple * input_rows;
# 3417|-> startup_cost += aggcosts.finalCost.startup;
# 3418| startup_cost += (cpu_operator_cost * numGroupCols) * input_rows;
# 3419|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/postgres_fdw/postgres_fdw.c:7489: warning[nullPointer]: Possible null pointer dereference: fsstate
# 7487| {
# 7488| Assert(fsstate);
# 7489|-> tupdesc = fsstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
# 7490| }
# 7491|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:971:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:935:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:958:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:960:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:969:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:971:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:971:9: danger: use of uninitialized value ‘yyss’ here
# 969| if (! yyptr)
# 970| YYNOMEM;
# 971|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 972| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 973| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:68:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:68:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 66| range: boundary PLUMIN deviation
# 67| {
# 68|-> result->lower = $1.val - $3.val;
# 69| result->upper = $1.val + $3.val;
# 70| sprintf(strbuf, "%g", result->lower);
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:69:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:69:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 67| {
# 68| result->lower = $1.val - $3.val;
# 69|-> result->upper = $1.val + $3.val;
# 70| sprintf(strbuf, "%g", result->lower);
# 71| result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:71:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:71:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 69| result->upper = $1.val + $3.val;
# 70| sprintf(strbuf, "%g", result->lower);
# 71|-> result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 72| sprintf(strbuf, "%g", result->upper);
# 73| result->u_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:73:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:73:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 71| result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 72| sprintf(strbuf, "%g", result->upper);
# 73|-> result->u_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 74| result->l_ext = '\0';
# 75| result->u_ext = '\0';
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:80:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:80:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 78| | boundary RANGE boundary
# 79| {
# 80|-> result->lower = $1.val;
# 81| result->upper = $3.val;
# 82| if ( result->lower > result->upper ) {
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:90:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:82:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:90:34: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:90:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 88| YYERROR;
# 89| }
# 90|-> result->l_sigd = $1.sigd;
# 91| result->u_sigd = $3.sigd;
# 92| result->l_ext = ( $1.ext ? $1.ext : '\0' );
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:92:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:82:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:90:34: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:92:57: danger: out-of-bounds read at byte -4 but ‘yyvsa’ starts at byte 0
# 90| result->l_sigd = $1.sigd;
# 91| result->u_sigd = $3.sigd;
# 92|-> result->l_ext = ( $1.ext ? $1.ext : '\0' );
# 93| result->u_ext = ( $3.ext ? $3.ext : '\0' );
# 94| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:98:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].bnd.val’
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:98:33: danger: use of uninitialized value ‘yyvsp[2305843009213693951].bnd.val’ here
# 96| | boundary RANGE
# 97| {
# 98|-> result->lower = $1.val;
# 99| result->upper = HUGE_VAL;
# 100| result->l_sigd = $1.sigd;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:144:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].text’
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:141:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:144:35: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segparse.y:144:35: danger: use of uninitialized value ‘yyvsp[2305843009213693951].text’ here
# 142| YYABORT;
# 143|
# 144|-> $$.ext = $1[0];
# 145| $$.sigd = sig_digits($2);
# 146| $$.val = val;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1565:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1552:21: enter_function: entry to ‘seg_yy_create_buffer’
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1556:31: call_function: inlined call to ‘seg_yyalloc’ from ‘seg_yy_create_buffer’
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1557:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1560:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1565:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1563| * we need to put in 2 end-of-buffer characters.
# 1564| */
# 1565|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1566| if ( ! b->yy_ch_buf )
# 1567| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1606: warning[nullPointer]: Possible null pointer dereference: b
# 1604| yy_flush_buffer( b );
# 1605|
# 1606|-> b->yy_input_file = file;
# 1607| b->yy_fill_buffer = 1;
# 1608|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1607: warning[nullPointer]: Possible null pointer dereference: b
# 1605|
# 1606| b->yy_input_file = file;
# 1607|-> b->yy_fill_buffer = 1;
# 1608|
# 1609| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1820:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1804:17: enter_function: entry to ‘seg_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1813:24: call_function: inlined call to ‘seg_yyalloc’ from ‘seg_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1814:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1814:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/seg/segscan.c:1822:13: call_function: calling ‘seg_yy_scan_buffer’ from ‘seg_yy_scan_bytes’
# 1818| buf[i] = yybytes[i];
# 1819|
# 1820|-> buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1821|
# 1822| b = yy_scan_buffer( buf, n );
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:160:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:75:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:80:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:85:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:101:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:105:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:111:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:119:27: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:129:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:133:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:133:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:136:76: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:139:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:146:22: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:153:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:159:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:159:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:160:33: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:160:25: danger: dereference of NULL ‘argtypes + (long unsigned int)i * 4’
# 158|
# 159| if (plan->nplans <= 0) /* Get typeId of column */
# 160|-> argtypes[i] = SPI_gettypeid(tupdesc, fnumber);
# 161| }
# 162|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:407:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:275:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:280:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:285:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:285:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:290:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:297:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:302:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:306:12: branch_false: following ‘false’ branch (when ‘nargs > 4’)...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:311:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:312:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:315:18: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:322:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:331:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:339:27: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:349:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:355:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:355:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:361:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:361:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:364:76: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:367:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:374:22: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:381:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:392:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:392:20: branch_false: following ‘false’ branch (when ‘newtuple’ is NULL)...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:392:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:406:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:407:33: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/spi/refint.c:407:25: danger: dereference of NULL ‘argtypes + (long unsigned int)i * 4’
# 405|
# 406| if (plan->nplans <= 0) /* Get typeId of column */
# 407|-> argtypes[i] = SPI_gettypeid(tupdesc, fnumber);
# 408| }
# 409| args_temp = args;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘X509_NAME_field_to_text’
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:223:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 223 | data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# | ^
# 221| if (index < 0)
# 222| return (Datum) 0;
# 223|-> data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# 224| return ASN1_STRING_to_text(data);
# 225| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:223:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 221| if (index < 0)
# 222| return (Datum) 0;
# 223|-> data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# 224| return ASN1_STRING_to_text(data);
# 225| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_client_dn_field’
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:254:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 254 | result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:205:36: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 205 | X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
# | ~~~~~~~~~~~^~~~
# 252| PG_RETURN_NULL();
# 253|
# 254|-> result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# 255|
# 256| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:254:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 252| PG_RETURN_NULL();
# 253|
# 254|-> result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# 255|
# 256| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_issuer_field’
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:289:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 289 | result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:205:36: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 205 | X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
# | ~~~~~~~~~~~^~~~
# 287| PG_RETURN_NULL();
# 288|
# 289|-> result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# 290|
# 291| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:289:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 287| PG_RETURN_NULL();
# 288|
# 289|-> result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# 290|
# 291| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_extension_info’
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:445:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 445 | ext = X509_get_ext(cert, call_cntr);
# | ^
# 443|
# 444| /* Get the extension from the certificate */
# 445|-> ext = X509_get_ext(cert, call_cntr);
# 446| obj = X509_EXTENSION_get_object(ext);
# 447|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:445:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 443|
# 444| /* Get the extension from the certificate */
# 445|-> ext = X509_get_ext(cert, call_cntr);
# 446| obj = X509_EXTENSION_get_object(ext);
# 447|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:446:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 446 | obj = X509_EXTENSION_get_object(ext);
# | ^
# 444| /* Get the extension from the certificate */
# 445| ext = X509_get_ext(cert, call_cntr);
# 446|-> obj = X509_EXTENSION_get_object(ext);
# 447|
# 448| /* Get the extension name */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/contrib/sslinfo/sslinfo.c:446:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 444| /* Get the extension from the certificate */
# 445| ext = X509_get_ext(cert, call_cntr);
# 446|-> obj = X509_EXTENSION_get_object(ext);
# 447|
# 448| /* Get the extension name */
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:78:25: warning[-Wanalyzer-null-argument]: use of NULL ‘replaceTo’ where non-null expected
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:271:1: enter_function: entry to ‘unaccent_init’
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:278:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:282:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:284:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:284:28: branch_false: following ‘false’ branch (when ‘fileloaded == 0’)...
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:288:45: branch_false: ...to here
postgresql-18.3/postgresql-16.11/contrib/unaccent/unaccent.c:288:36: call_function: calling ‘initTrie’ from ‘unaccent_init’
# 76| curnode->replacelen = replacelen;
# 77| curnode->replaceTo = (char *) palloc(replacelen);
# 78|-> memcpy(curnode->replaceTo, replaceTo, replacelen);
# 79| }
# 80| }
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:814:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2990:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:3016:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 812| range->values[i] = PointerGetDatum(dataptr);
# 813|
# 814|-> memcpy(dataptr, ptr, typlen);
# 815| dataptr += MAXALIGN(typlen);
# 816|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:823:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2990:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:3016:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 821| range->values[i] = PointerGetDatum(dataptr);
# 822|
# 823|-> memcpy(dataptr, ptr, VARSIZE_ANY(ptr));
# 824| dataptr += MAXALIGN(VARSIZE_ANY(ptr));
# 825| ptr += VARSIZE_ANY(ptr);
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:833:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2990:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:3016:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 831| range->values[i] = PointerGetDatum(dataptr);
# 832|
# 833|-> memcpy(dataptr, ptr, slen);
# 834| dataptr += MAXALIGN(slen);
# 835| ptr += slen;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:1518:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘distances’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2730:1: enter_function: entry to ‘brin_minmax_multi_union’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2818:21: call_function: calling ‘build_distances’ from ‘brin_minmax_multi_union’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2818:21: return_function: returning to ‘brin_minmax_multi_union’ from ‘build_distances’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_minmax_multi.c:2831:20: call_function: calling ‘reduce_expanded_ranges’ from ‘brin_minmax_multi_union’
# 1516| {
# 1517| /* index of the gap between (index) and (index+1) ranges */
# 1518|-> int index = distances[i].index;
# 1519|
# 1520| Assert((index >= 0) && ((index + 1) < neranges));
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:971: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 969| len += targetDataLen;
# 970|
# 971|-> *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 972| (*targetMinimalTuple)->t_len = len;
# 973| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:972: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 970|
# 971| *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 972|-> (*targetMinimalTuple)->t_len = len;
# 973| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 974| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:973: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 971| *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 972| (*targetMinimalTuple)->t_len = len;
# 973|-> (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 974| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 975| /* Same macro works for MinimalTuples */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:974: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 972| (*targetMinimalTuple)->t_len = len;
# 973| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 974|-> (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 975| /* Same macro works for MinimalTuples */
# 976| HeapTupleHeaderSetNatts(*targetMinimalTuple, natts);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:976: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 974| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 975| /* Same macro works for MinimalTuples */
# 976|-> HeapTupleHeaderSetNatts(*targetMinimalTuple, natts);
# 977| if (targetNullLen > 0)
# 978| nullBits = (bits8 *) ((char *) *targetMinimalTuple
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:980: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 978| nullBits = (bits8 *) ((char *) *targetMinimalTuple
# 979| + offsetof(MinimalTupleData, t_bits));
# 980|-> targetData = (char *) *targetMinimalTuple + hoff;
# 981| infoMask = &((*targetMinimalTuple)->t_infomask);
# 982| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/common/heaptuple.c:981: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 979| + offsetof(MinimalTupleData, t_bits));
# 980| targetData = (char *) *targetMinimalTuple + hoff;
# 981|-> infoMask = &((*targetMinimalTuple)->t_infomask);
# 982| }
# 983|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:97:39: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:576:1: enter_function: entry to ‘index_truncate_tuple’
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:587:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:591:28: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:596:9: call_function: calling ‘index_deform_tuple’ from ‘index_truncate_tuple’
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:596:9: return_function: returning to ‘index_truncate_tuple’ from ‘index_deform_tuple’
postgresql-18.3/postgresql-16.11/src/backend/access/common/indextuple.c:597:21: call_function: inlined call to ‘index_form_tuple’ from ‘index_truncate_tuple’
# 95| Form_pg_attribute att = TupleDescAttr(tupleDescriptor, i);
# 96|
# 97|-> untoasted_values[i] = values[i];
# 98| untoasted_free[i] = false;
# 99|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:579:25: warning[-Wanalyzer-null-argument]: use of NULL ‘newrootpg’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:818:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 577| /* Splitting the root, three pages to update */
# 578| MarkBufferDirty(lbuffer);
# 579|-> memcpy(page, newrootpg, BLCKSZ);
# 580| memcpy(BufferGetPage(lbuffer), newlpage, BLCKSZ);
# 581| memcpy(BufferGetPage(rbuffer), newrpage, BLCKSZ);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginentrypage.c:628: error[legacyUninitvar]: Uninitialized variable: tupstore
# 626| */
# 627| maxoff = PageGetMaxOffsetNumber(lpage);
# 628|-> ptr = tupstore[0].data;
# 629| for (i = FirstOffsetNumber; i <= maxoff; i++)
# 630| {
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1516:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1521:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1529:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1530:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1531:24: release_memory: using NULL here
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1531:17: danger: argument 1 (‘*rel.rd_amcache’) NULL where non-null expected
# 1529| if (rel->rd_amcache == NULL)
# 1530| rel->rd_amcache = cache;
# 1531|-> memcpy(rel->rd_amcache, HashPageGetMeta(page),
# 1532| sizeof(HashMetaPageData));
# 1533|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL ‘*rel.rd_amcache’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1559:1: enter_function: entry to ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1573:17: call_function: calling ‘_hash_getcachedmetap’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1573:17: return_function: returning to ‘_hash_getbucketbuf_from_hashkey’ from ‘_hash_getcachedmetap’
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1592:23: call_function: calling ‘_hash_getbuf’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1592:23: return_function: returning to ‘_hash_getbucketbuf_from_hashkey’ from ‘_hash_getbuf’
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1601:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1605:17: call_function: inlined call to ‘_hash_relbuf’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-16.11/src/backend/access/hash/hashpage.c:1606:25: call_function: calling ‘_hash_getcachedmetap’ from ‘_hash_getbucketbuf_from_hashkey’
# 1529| if (rel->rd_amcache == NULL)
# 1530| rel->rd_amcache = cache;
# 1531|-> memcpy(rel->rd_amcache, HashPageGetMeta(page),
# 1532| sizeof(HashMetaPageData));
# 1533|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:5712: error[legacyUninitvar]: Uninitialized variable: status
# 5710| }
# 5711|
# 5712|-> result = test_lockmode_for_conflict(status, rawxmax, mode,
# 5713| &mytup, &needwait);
# 5714|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:6253: error[legacyUninitvar]: Uninitialized variable: ret
# 6251| * don't bother optimizing that.
# 6252| */
# 6253|-> if (!ret)
# 6254| {
# 6255| UnlockTuple(relation, &oldtup.t_self, InplaceUpdateTupleLock);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10157:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10031:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10072:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10103:12: branch_true: following ‘true’ branch (when ‘newaction == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10110:27: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10116:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10119:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10119:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10122:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10125:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10132:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10146:20: branch_true: following ‘true’ branch (when ‘prefixlen != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10151:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam.c:10157:63: danger: dereference of NULL ‘oldtup.t_data’
#10155|
#10156| /* copy prefix from old tuple */
#10157|-> memcpy(newp, (char *) oldtup.t_data + oldtup.t_data->t_hoff, prefixlen);
#10158| newp += prefixlen;
#10159|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:1168:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:939:1: enter_function: entry to ‘_bt_strategy’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:959:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:966:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:966:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:966:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:967:20: release_memory: ‘leftinterval’ is NULL
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:967:20: call_function: calling ‘_bt_split_lastleft’ from ‘_bt_strategy’
# 1166| ItemId itemid;
# 1167|
# 1168|-> if (split->newitemonleft && split->firstrightoff == state->newitemoff)
# 1169| return state->newitem;
# 1170|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:1184:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:939:1: enter_function: entry to ‘_bt_strategy’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:959:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:966:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:966:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:966:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:968:21: release_memory: ‘rightinterval’ is NULL
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtsplitloc.c:968:21: call_function: calling ‘_bt_split_firstright’ from ‘_bt_strategy’
# 1182| ItemId itemid;
# 1183|
# 1184|-> if (!split->newitemonleft && split->firstrightoff == state->newitemoff)
# 1185| return state->newitem;
# 1186|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtxlog.c:389:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nposting’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtxlog.c:1016:1: enter_function: entry to ‘btree_redo’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtxlog.c:1034:25: call_function: calling ‘btree_xlog_split’ from ‘btree_redo’
# 387| Assert(newitemonleft ||
# 388| xlrec->firstrightoff == xlrec->newitemoff);
# 389|-> if (PageAddItem(leftpage, (Item) nposting,
# 390| MAXALIGN(IndexTupleSize(nposting)), leftoff,
# 391| false, false) == InvalidOffsetNumber)
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgscan.c:123:17: warning[-Wanalyzer-null-argument]: use of NULL ‘distances’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgscan.c:943:1: enter_function: entry to ‘spggetbitmap’
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgscan.c:953:9: call_function: calling ‘spgWalk’ from ‘spggetbitmap’
# 121|
# 122| if (!isnull && so->numberOfNonNullOrderBys > 0)
# 123|-> memcpy(item->distances, distances,
# 124| sizeof(item->distances[0]) * so->numberOfNonNullOrderBys);
# 125|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:793:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:992:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1035:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1035:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1035:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1041:34: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1047:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1048:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1048:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1048:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
# 791| if (att->attbyval)
# 792| {
# 793|-> memcpy(target, &datum, sizeof(Datum));
# 794| }
# 795| else
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:798:17: warning[-Wanalyzer-null-argument]: use of NULL ‘target’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:992:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1035:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1035:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1035:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1041:34: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1047:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1048:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1048:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/spgist/spgutils.c:1048:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
# 796| {
# 797| size = (att->attlen > 0) ? att->attlen : VARSIZE_ANY(datum);
# 798|-> memcpy(target, DatumGetPointer(datum), size);
# 799| }
# 800| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/access/transam/twophase.c:1031: error[ctunullpointer]: Null pointer dereference: data
# 1029| }
# 1030|
# 1031|-> memcpy(((char *) records.tail->data) + records.tail->len, data, len);
# 1032| records.tail->len += padlen;
# 1033| records.bytes_free -= padlen;
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xact.c:5936:76: warning[-Wanalyzer-null-argument]: use of NULL ‘twophase_gid’ where non-null expected
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xact.c:5058:1: enter_function: entry to ‘AbortSubTransaction’
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xact.c:5151:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xact.c:5153:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xact.c:5163:24: call_function: calling ‘RecordTransactionAbort’ from ‘AbortSubTransaction’
# 5934| XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
# 5935| if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
# 5936|-> XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1);
# 5937| }
# 5938|
Error: CPPCHECK_WARNING (CWE-682):
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xlog.c:1557: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 1555| Assert(((XLogPageHeader) cachedPos)->xlp_magic == XLOG_PAGE_MAGIC);
# 1556| Assert(((XLogPageHeader) cachedPos)->xlp_pageaddr == ptr - (ptr % XLOG_BLCKSZ));
# 1557|-> return cachedPos + ptr % XLOG_BLCKSZ;
# 1558| }
# 1559|
Error: GCC_ANALYZER_WARNING (CWE-131):
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xloginsert.c:233:9: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xloginsert.c:1225:1: enter_function: entry to ‘log_newpage_buffer’
postgresql-18.3/postgresql-16.11/src/backend/access/transam/xloginsert.c:1237:16: call_function: calling ‘log_newpage’ from ‘log_newpage_buffer’
# 231| max_registered_block_id = 0;
# 232| mainrdata_len = 0;
# 233|-> mainrdata_last = (XLogRecData *) &mainrdata_head;
# 234| curinsert_flags = 0;
# 235| begininsert_called = false;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1142:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1106:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1129:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1131:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1140:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1142:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1142:9: danger: use of uninitialized value ‘yyss’ here
# 1140| if (! yyptr)
# 1141| YYNOMEM;
# 1142|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1143| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1144| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:155:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:155:41: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:155:41: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:155:41: danger: out-of-bounds read from byte -24 till byte -21 but ‘yyvsa’ starts at byte 0
# 153| do_start();
# 154| numattr = 0;
# 155|-> elog(DEBUG4, "creating%s%s relation %s %u",
# 156| $4 ? " bootstrap" : "",
# 157| $5 ? " shared" : "",
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:175:59: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:175:59: danger: out-of-bounds read from byte -40 till byte -37 but ‘yyvsa’ starts at byte 0
# 173| tupdesc = CreateTupleDesc(numattr, attrtypes);
# 174|
# 175|-> shared_relation = $5;
# 176|
# 177| /*
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:186:60: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:186:60: danger: out-of-bounds read from byte -48 till byte -45 but ‘yyvsa’ starts at byte 0
# 184| * in relcache.c) must be mapped.
# 185| */
# 186|-> mapped_relation = ($4 || shared_relation);
# 187|
# 188| if ($4)
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:199:64: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:188:44: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:193:53: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:199:64: danger: out-of-bounds read from byte -56 till byte -53 but ‘yyvsa’ starts at byte 0
# 197| }
# 198|
# 199|-> boot_reldesc = heap_create($2,
# 200| PG_CATALOG_NAMESPACE,
# 201| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:199:76: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:188:44: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:193:53: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:199:76: danger: out-of-bounds read from byte -64 till byte -57 but ‘yyvsa’ starts at byte 0
# 197| }
# 198|
# 199|-> boot_reldesc = heap_create($2,
# 200| PG_CATALOG_NAMESPACE,
# 201| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:220:54: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:188:44: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:220:54: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:220:54: danger: out-of-bounds read from byte -32 till byte -29 but ‘yyvsa’ starts at byte 0
# 218| Oid id;
# 219|
# 220|-> id = heap_create_with_catalog($2,
# 221| PG_CATALOG_NAMESPACE,
# 222| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:220:79: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:188:44: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:220:54: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:220:79: danger: out-of-bounds read from byte -64 till byte -57 but ‘yyvsa’ starts at byte 0
# 218| Oid id;
# 219|
# 220|-> id = heap_create_with_catalog($2,
# 221| PG_CATALOG_NAMESPACE,
# 222| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:272:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:272:41: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:272:41: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:272:41: danger: out-of-bounds read from byte -56 till byte -49 but ‘yyvsa’ starts at byte 0
# 270| Oid relationId;
# 271|
# 272|-> elog(DEBUG4, "creating index \"%s\"", $3);
# 273|
# 274| do_start();
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:325:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:325:41: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:325:41: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:325:41: danger: out-of-bounds read from byte -56 till byte -49 but ‘yyvsa’ starts at byte 0
# 323| Oid relationId;
# 324|
# 325|-> elog(DEBUG4, "creating unique index \"%s\"", $4);
# 326|
# 327| do_start();
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:379:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootparse.y:379:41: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 377| do_start();
# 378|
# 379|-> BootstrapToastTable($6, $3, $4);
# 380| do_end();
# 381| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1779:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1766:21: enter_function: entry to ‘boot_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1770:31: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1771:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1774:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1779:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1777| * we need to put in 2 end-of-buffer characters.
# 1778| */
# 1779|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1780| if ( ! b->yy_ch_buf )
# 1781| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1820: warning[nullPointer]: Possible null pointer dereference: b
# 1818| yy_flush_buffer( b );
# 1819|
# 1820|-> b->yy_input_file = file;
# 1821| b->yy_fill_buffer = 1;
# 1822|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:1821: warning[nullPointer]: Possible null pointer dereference: b
# 1819|
# 1820| b->yy_input_file = file;
# 1821|-> b->yy_fill_buffer = 1;
# 1822|
# 1823| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:2034:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:2018:17: enter_function: entry to ‘boot_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:2027:24: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:2028:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:2028:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/bootstrap/bootscanner.c:2036:13: call_function: calling ‘boot_yy_scan_buffer’ from ‘boot_yy_scan_bytes’
# 2032| buf[i] = yybytes[i];
# 2033|
# 2034|-> buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2035|
# 2036| b = yy_scan_buffer( buf, n );
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:287:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:254:1: enter_function: entry to ‘has_partition_attrs’
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:262:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:269:26: call_function: inlined call to ‘list_head’ from ‘has_partition_attrs’
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:270:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:270:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:272:45: call_function: inlined call to ‘get_partition_col_attnum’ from ‘has_partition_attrs’
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:274:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:287:37: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/catalog/partition.c:287:37: danger: dereference of NULL ‘partexprs_item’
# 285| {
# 286| /* Arbitrary expression */
# 287|-> Node *expr = (Node *) lfirst(partexprs_item);
# 288| Bitmapset *expr_attrs = NULL;
# 289|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1103:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1057:1: enter_function: entry to ‘pg_get_publication_tables’
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1064:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1075:27: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1089:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1095:57: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1095:36: call_function: calling ‘GetPublicationByName’ from ‘pg_get_publication_tables’
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1095:36: return_function: returning to ‘pg_get_publication_tables’ from ‘GetPublicationByName’
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_publication.c:1103:29: danger: dereference of NULL ‘GetPublicationByName(text_to_cstring((char *)*<unknown>), 0)’
# 1101| * those. Otherwise, get the partitioned table itself.
# 1102| */
# 1103|-> if (pub_elem->alltables)
# 1104| pub_elem_tables = GetAllTablesPublicationRelations(pub_elem->pubviaroot);
# 1105| else
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_type.c: scope_hint: In function ‘makeMultirangeTypeName’
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_type.c:936:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 936 | rangestr = strstr(rangeTypeName, "range");
# | ^
# 934| * "multirange". Otherwise add "_multirange" to the end.
# 935| */
# 936|-> rangestr = strstr(rangeTypeName, "range");
# 937| if (rangestr)
# 938| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/catalog/pg_type.c:936:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 934| * "multirange". Otherwise add "_multirange" to the end.
# 935| */
# 936|-> rangestr = strstr(rangeTypeName, "range");
# 937| if (rangestr)
# 938| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:610:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:291:1: enter_function: entry to ‘do_analyze_rel’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:411:29: branch_false: following ‘false’ branch (when ‘i > attr_cnt’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:429:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:450:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:504:23: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:520:19: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:529:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:529:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:532:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:537:27: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:547:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:552:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:560:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:589:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:589:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:595:17: call_function: inlined call to ‘MemoryContextSwitchTo’ from ‘do_analyze_rel’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:603:17: call_function: inlined call to ‘update_attstats’ from ‘do_analyze_rel’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:606:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:606:31: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:608:60: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:610:25: danger: dereference of NULL ‘thisdata’
# 608| AnlIndexData *thisdata = &indexdata[ind];
# 609|
# 610|-> update_attstats(RelationGetRelid(Irel[ind]), false,
# 611| thisdata->attr_cnt, thisdata->vacattrstats);
# 612| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:660:47: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:411:29: branch_false: following ‘false’ branch (when ‘i > attr_cnt’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:429:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:450:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:504:23: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:520:19: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:529:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:529:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:532:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:537:27: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:633:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:637:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:655:31: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:657:60: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:660:47: danger: dereference of NULL ‘thisdata’
# 658| double totalindexrows;
# 659|
# 660|-> totalindexrows = ceil(thisdata->tupleFract * totalrows);
# 661| vac_update_relstats(Irel[ind],
# 662| RelationGetNumberOfBlocks(Irel[ind]),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:855:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:291:1: enter_function: entry to ‘do_analyze_rel’
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:411:29: branch_false: following ‘false’ branch (when ‘i > attr_cnt’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:429:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:450:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:499:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:504:23: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:520:19: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:529:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:529:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:532:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:537:27: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:547:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:552:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:560:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:589:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:589:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:590:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/analyze.c:590:25: call_function: calling ‘compute_index_stats’ from ‘do_analyze_rel’
# 853| {
# 854| AnlIndexData *thisdata = &indexdata[ind];
# 855|-> IndexInfo *indexInfo = thisdata->indexInfo;
# 856| int attr_cnt = thisdata->attr_cnt;
# 857| TupleTableSlot *slot;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/commands/conversioncmds.c:117: error[uninitvar]: Uninitialized variable: result
# 115| * perform the requested conversion.
# 116| */
# 117|-> funcresult = OidFunctionCall6(funcoid,
# 118| Int32GetDatum(from_encoding),
# 119| Int32GetDatum(to_encoding),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:345:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:324:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:329:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:338:12: branch_true: following ‘true’ branch (when ‘is_from != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:345:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:345:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:345:38: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/commands/copy.c:345:38: danger: dereference of NULL ‘rel’
# 343|
# 344| /* check read-only transaction and parallel mode */
# 345|-> if (XactReadOnly && !rel->rd_islocaltemp)
# 346| PreventCommandIfReadOnly("COPY FROM");
# 347|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/extension.c:314: error[ctunullpointer]: Null pointer dereference: versionname
# 312| check_valid_version_name(const char *versionname)
# 313| {
# 314|-> int namelen = strlen(versionname);
# 315|
# 316| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/extension.c:314: warning[nullPointer]: Possible null pointer dereference: versionname
# 312| check_valid_version_name(const char *versionname)
# 313| {
# 314|-> int namelen = strlen(versionname);
# 315|
# 316| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/commands/extension.c:3099: warning[nullPointer]: Possible null pointer dereference: versionName
# 3097| * If we're already at that version, just say so
# 3098| */
# 3099|-> if (strcmp(oldVersionName, versionName) == 0)
# 3100| {
# 3101| ereport(NOTICE,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/commands/policy.c:131: error[legacyUninitvar]: Uninitialized variable: polcmd
# 129| elog(ERROR, "unrecognized policy command");
# 130|
# 131|-> return polcmd;
# 132| }
# 133|
Error: CPPCHECK_WARNING (CWE-786):
postgresql-18.3/postgresql-16.11/src/backend/commands/tablecmds.c:4988: error[negativeIndex]: Array 'tab->subcmds[11]' accessed at index -1, which is out of bounds.
# 4986|
# 4987| /* Add the subcommand to the appropriate list for phase 2 */
# 4988|-> tab->subcmds[pass] = lappend(tab->subcmds[pass], cmd);
# 4989| }
# 4990|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/commands/tablecmds.c:12295: error[legacyUninitvar]: Uninitialized variable: contype
#12293| * the dependency mechanism, so we're done here.
#12294| */
#12295|-> if (contype != CONSTRAINT_CHECK &&
#12296| rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
#12297| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:176:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:137:1: enter_function: entry to ‘ExecInitJunkFilterConversion’
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:166:12: branch_true: following ‘true’ branch (when ‘cleanLength > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:168:43: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:169:21: call_function: inlined call to ‘list_head’ from ‘ExecInitJunkFilterConversion’
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:170:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:170:29: branch_true: following ‘true’ branch (when ‘i < cleanLength’)...
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:172:29: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/execJunk.c:176:46: danger: dereference of NULL ‘t’
# 174| for (;;)
# 175| {
# 176|-> TargetEntry *tle = lfirst(t);
# 177|
# 178| t = lnext(targetList, t);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/execProcnode.c:391: warning[nullPointer]: Possible null pointer dereference: result
# 389| }
# 390|
# 391|-> ExecSetExecProcNode(result, result->ExecProcNode);
# 392|
# 393| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/execProcnode.c:407: warning[nullPointer]: Possible null pointer dereference: result
# 405| subps = lappend(subps, sstate);
# 406| }
# 407|-> result->initPlan = subps;
# 408|
# 409| /* Set up instrumentation for this node if requested */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/execProcnode.c:433: error[ctunullpointer]: Null pointer dereference: node
# 431| * means we'll superfluously execute ExecProcNodeFirst, but that seems ok.
# 432| */
# 433|-> node->ExecProcNodeReal = function;
# 434| node->ExecProcNode = ExecProcNodeFirst;
# 435| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/execProcnode.c:433: warning[nullPointer]: Possible null pointer dereference: node
# 431| * means we'll superfluously execute ExecProcNodeFirst, but that seems ok.
# 432| */
# 433|-> node->ExecProcNodeReal = function;
# 434| node->ExecProcNode = ExecProcNodeFirst;
# 435| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/execProcnode.c:434: warning[nullPointer]: Possible null pointer dereference: node
# 432| */
# 433| node->ExecProcNodeReal = function;
# 434|-> node->ExecProcNode = ExecProcNodeFirst;
# 435| }
# 436|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/executor/execScan.c:346: error[legacyUninitvar]: Uninitialized variable: relids
# 344| (int) nodeTag(node->ps.plan));
# 345|
# 346|-> while ((rtindex = bms_next_member(relids, rtindex)) >= 0)
# 347| {
# 348| Assert(rtindex > 0);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2286:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘isnull’
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2304:1: enter_function: entry to ‘do_text_output_multiline’
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2309:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2314:23: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2315:20: branch_true: following ‘true’ branch (when ‘eol’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2317:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/execTuples.c:2327:17: call_function: calling ‘do_tup_output’ from ‘do_text_output_multiline’
# 2284| /* insert data */
# 2285| memcpy(slot->tts_values, values, natts * sizeof(Datum));
# 2286|-> memcpy(slot->tts_isnull, isnull, natts * sizeof(bool));
# 2287|
# 2288| /* mark slot as containing a virtual tuple */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:1350:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:3547:1: enter_function: entry to ‘ExecParallelHashTuplePrealloc’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:3560:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:3565:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:3566:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:3567:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeHash.c:3567:25: call_function: calling ‘ExecParallelHashIncreaseNumBatches’ from ‘ExecParallelHashTuplePrealloc’
# 1348| HJTUPLE_OVERHEAD + tuple->t_len,
# 1349| &shared);
# 1350|-> copyTuple->hashvalue = hashTuple->hashvalue;
# 1351| memcpy(HJTUPLE_MINTUPLE(copyTuple), tuple, tuple->t_len);
# 1352| ExecParallelHashPushTuple(&hashtable->buckets.shared[bucketno],
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1227:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1208:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1214:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1227:31: danger: dereference of NULL ‘leftop’
# 1225| Assert(leftop != NULL);
# 1226|
# 1227|-> if (!(IsA(leftop, Var) &&
# 1228| ((Var *) leftop)->varno == INDEX_VAR))
# 1229| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1259:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1152:1: enter_function: entry to ‘ExecIndexBuildScanKeys’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1208:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1214:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1220:43: call_function: inlined call to ‘get_leftop’ from ‘ExecIndexBuildScanKeys’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1222:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1222:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1227:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1228:35: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1227:29: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1231:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1232:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1259:29: danger: dereference of NULL ‘rightop’
# 1257| Assert(rightop != NULL);
# 1258|
# 1259|-> if (IsA(rightop, Const))
# 1260| {
# 1261| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1344:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1323:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1344:39: danger: dereference of NULL ‘leftop’
# 1342| Assert(leftop != NULL);
# 1343|
# 1344|-> if (!(IsA(leftop, Var) &&
# 1345| ((Var *) leftop)->varno == INDEX_VAR))
# 1346| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1383:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1323:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1339:36: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1339:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1344:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1345:43: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1344:37: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1348:33: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1354:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1354:37: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1357:44: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1364:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1367:44: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1371:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1378:36: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1383:37: danger: dereference of NULL ‘rightop’
# 1381| Assert(rightop != NULL);
# 1382|
# 1383|-> if (IsA(rightop, Const))
# 1384| {
# 1385| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1468:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1445:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1455:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1463:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1468:31: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1468:31: danger: dereference of NULL ‘leftop’
# 1466| Assert(leftop != NULL);
# 1467|
# 1468|-> if (!(IsA(leftop, Var) &&
# 1469| ((Var *) leftop)->varno == INDEX_VAR))
# 1470| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1501:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1445:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1455:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1463:28: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1463:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1468:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1469:35: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1468:29: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1472:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1473:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1492:28: branch_false: following ‘false’ branch (when ‘rightop’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1497:29: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1497:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1501:37: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1501:37: danger: dereference of NULL ‘rightop’
# 1499| /* Index AM will handle this like a simple operator */
# 1500| flags |= SK_SEARCHARRAY;
# 1501|-> if (IsA(rightop, Const))
# 1502| {
# 1503| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1582:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1564:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1564:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1575:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1577:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1582:31: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/executor/nodeIndexscan.c:1582:31: danger: dereference of NULL ‘leftop’
# 1580| Assert(leftop != NULL);
# 1581|
# 1582|-> if (!(IsA(leftop, Var) &&
# 1583| ((Var *) leftop)->varno == INDEX_VAR))
# 1584| elog(ERROR, "NullTest indexqual has wrong key");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/lib/pairingheap.c:275:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pairs’
postgresql-18.3/postgresql-16.11/src/backend/lib/pairingheap.c:251:20: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/lib/pairingheap.c:275:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/lib/pairingheap.c:275:9: danger: dereference of NULL ‘pairs’
# 273| */
# 274| newroot = pairs;
# 275|-> next = pairs->next_sibling;
# 276| while (next)
# 277| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth-scram.c:1181: warning[uninitvar]: Uninitialized variable: ClientKey
# 1179|
# 1180| /* Hash it one more time, and compare with StoredKey */
# 1181|-> if (scram_H(ClientKey, state->hash_type, state->key_length,
# 1182| client_StoredKey, &errstr) < 0)
# 1183| elog(ERROR, "could not hash stored key: %s", errstr);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2858:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2958:1: enter_function: entry to ‘PerformRadiusTransaction’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2998:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:3012:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:3019:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:3036:21: branch_false: following ‘false’ branch (when ‘i >= encryptedpasswordlen’)...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:3067:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:3069:9: call_function: calling ‘radius_add_attribute’ from ‘PerformRadiusTransaction’
# 2856| attr->attribute = type;
# 2857| attr->length = len + 2; /* total size includes type and length */
# 2858|-> memcpy(attr->data, data, len);
# 2859| packet->length += attr->length;
# 2860| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2913:100: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘secrets’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2863:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2875:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2882:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2882:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2890:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2890:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2890:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2892:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2892:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2893:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2896:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2896:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2907:29: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2907:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2908:33: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2908:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2909:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2910:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2910:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2912:47: branch_false: following ‘false’ branch (when ‘identifiers’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2912:47: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2912:47: branch_true: following ‘true’ branch (when ‘radiusports’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2912:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:2913:100: danger: dereference of NULL ‘secrets’
# 2911| {
# 2912| int ret = PerformRadiusTransaction(lfirst(server),
# 2913|-> lfirst(secrets),
# 2914| radiusports ? lfirst(radiusports) : NULL,
# 2915| identifiers ? lfirst(identifiers) : NULL,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/libpq/auth.c:3069: warning[uninitvar]: Uninitialized variable: encryptedpassword
# 3067| pfree(cryptvector);
# 3068|
# 3069|-> radius_add_attribute(packet, RADIUS_PASSWORD, encryptedpassword, encryptedpasswordlen);
# 3070|
# 3071| /* Length needs to be in network order on the wire */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_open_server’
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:595:40: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 595 | X509_NAME *x509name = X509_get_subject_name(port->peer);
# | ^~~~~~~~~~~~~~~~~~~~~
# 593| {
# 594| int len;
# 595|-> X509_NAME *x509name = X509_get_subject_name(port->peer);
# 596| char *peer_dn;
# 597| BIO *bio = NULL;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:595:40: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 593| {
# 594| int len;
# 595|-> X509_NAME *x509name = X509_get_subject_name(port->peer);
# 596| char *peer_dn;
# 597| BIO *bio = NULL;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘verify_cb’
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1193:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1193 | subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:74:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 74 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1191| * it either.
# 1192| */
# 1193|-> subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# 1194| sub_prepared = prepare_cert_name(subject);
# 1195| pfree(subject);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1193:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1191| * it either.
# 1192| */
# 1193|-> subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# 1194| sub_prepared = prepare_cert_name(subject);
# 1195| pfree(subject);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1197:47: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1197 | issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:74:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 74 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1195| pfree(subject);
# 1196|
# 1197|-> issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# 1198| iss_prepared = prepare_cert_name(issuer);
# 1199| pfree(issuer);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1197:47: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1195| pfree(subject);
# 1196|
# 1197|-> issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# 1198| iss_prepared = prepare_cert_name(issuer);
# 1199| pfree(issuer);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_get_peer_subject_name’
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1433:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1433 | strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:74:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 74 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1431| {
# 1432| if (port->peer)
# 1433|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# 1434| else
# 1435| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1433:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1431| {
# 1432| if (port->peer)
# 1433|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# 1434| else
# 1435| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_get_peer_issuer_name’
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1442:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1442 | strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:74:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 74 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1440| {
# 1441| if (port->peer)
# 1442|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# 1443| else
# 1444| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1442:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1440| {
# 1441| if (port->peer)
# 1442|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# 1443| else
# 1444| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘X509_NAME_to_cstring’
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1557:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1557 | e = X509_NAME_get_entry(name, i);
# | ^
# 1555| for (i = 0; i < count; i++)
# 1556| {
# 1557|-> e = X509_NAME_get_entry(name, i);
# 1558| nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(e));
# 1559| if (nid == NID_undef)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1557:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1555| for (i = 0; i < count; i++)
# 1556| {
# 1557|-> e = X509_NAME_get_entry(name, i);
# 1558| nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(e));
# 1559| if (nid == NID_undef)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1563:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1563 | v = X509_NAME_ENTRY_get_data(e);
# | ^
# 1561| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
# 1562| errmsg("could not get NID for ASN1_OBJECT object")));
# 1563|-> v = X509_NAME_ENTRY_get_data(e);
# 1564| field_name = OBJ_nid2sn(nid);
# 1565| if (field_name == NULL)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/libpq/be-secure-openssl.c:1563:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1561| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
# 1562| errmsg("could not get NID for ASN1_OBJECT object")));
# 1563|-> v = X509_NAME_ENTRY_get_data(e);
# 1564| field_name = OBJ_nid2sn(nid);
# 1565| if (field_name == NULL)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:1352:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2600:1: enter_function: entry to ‘load_hba’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2610:16: call_function: calling ‘open_auth_file’ from ‘load_hba’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2610:16: return_function: returning to ‘load_hba’ from ‘open_auth_file’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2611:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2617:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2617:9: call_function: calling ‘tokenize_auth_file’ from ‘load_hba’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2617:9: return_function: returning to ‘load_hba’ from ‘tokenize_auth_file’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2625:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2637:32: call_function: calling ‘parse_hba_line’ from ‘load_hba’
# 1350| Assert(tok_line->fields != NIL);
# 1351| field = list_head(tok_line->fields);
# 1352|-> tokens = lfirst(field);
# 1353| if (tokens->length > 1)
# 1354| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2723:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2706:1: enter_function: entry to ‘parse_ident_line’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2717:17: call_function: inlined call to ‘list_head’ from ‘parse_ident_line’
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2719:22: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/libpq/hba.c:2723:9: danger: dereference of NULL ‘<unknown>’
# 2721|
# 2722| /* Get the map token (must exist) */
# 2723|-> tokens = lfirst(field);
# 2724| IDENT_MULTI_VALUE(tokens);
# 2725| token = linitial(tokens);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:197:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(get_user_name_or_exit(progname))’
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:148:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:153:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:186:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:186:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:186:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:188:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:188:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:194:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:194:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:196:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:196:18: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:198:60: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:198:60: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/backend/main/main.c:197:17: danger: ‘strdup(get_user_name_or_exit(progname))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
# 195| GucInfoMain();
# 196| else if (argc > 1 && strcmp(argv[1], "--single") == 0)
# 197|-> PostgresSingleUserMain(argc, argv,
# 198| strdup(get_user_name_or_exit(progname)));
# 199| else
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:631:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:620:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:629:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:631:41: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:631:41: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 629| if (bms_is_subset(iclause->rinfo->clause_relids, relids))
# 630| clauseset.indexclauses[indexcol] =
# 631|-> lappend(clauseset.indexclauses[indexcol], iclause);
# 632| }
# 633|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:647:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:620:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:640:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:640:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:644:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:647:41: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:647:41: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 645| {
# 646| clauseset.indexclauses[indexcol] =
# 647|-> lappend(clauseset.indexclauses[indexcol], iclause);
# 648| break;
# 649| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:654:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:620:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:625:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:640:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:654:25: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 652| /* Add restriction clauses */
# 653| clauseset.indexclauses[indexcol] =
# 654|-> list_concat(clauseset.indexclauses[indexcol],
# 655| rclauseset->indexclauses[indexcol]);
# 656|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:901:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*clauses.indexclauses[indexcol]’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:601:1: enter_function: entry to ‘get_join_index_paths’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:620:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:665:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/indxpath.c:665:9: call_function: calling ‘get_index_paths’ from ‘get_join_index_paths’
# 899| ListCell *lc;
# 900|
# 901|-> foreach(lc, clauses->indexclauses[indexcol])
# 902| {
# 903| IndexClause *iclause = (IndexClause *) lfirst(lc);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1551:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr1’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1479:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1495:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1505:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1523:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1523:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1537:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1549:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1549:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1551:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1551:25: danger: dereference of NULL ‘lcr1’
# 1549| if (joinrel->partbounds_merged)
# 1550| {
# 1551|-> child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1552| child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1553| lcr1 = lnext(parts1, lcr1);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1552:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr2’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1479:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1495:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1505:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1523:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1523:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1526:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1528:24: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1528:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1529:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1537:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1537:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1549:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1549:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1551:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/joinrels.c:1552:25: danger: dereference of NULL ‘lcr2’
# 1550| {
# 1551| child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1552|-> child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1553| lcr1 = lnext(parts1, lcr1);
# 1554| lcr2 = lnext(parts2, lcr2);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/pathkeys.c:159:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘new_pathkey’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/pathkeys.c:1168:1: enter_function: entry to ‘make_pathkeys_for_sortclauses_extended’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/pathkeys.c:1178:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/pathkeys.c:1190:27: call_function: calling ‘make_pathkey_from_sortop’ from ‘make_pathkeys_for_sortclauses_extended’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/pathkeys.c:1190:27: return_function: returning to ‘make_pathkeys_for_sortclauses_extended’ from ‘make_pathkey_from_sortop’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/path/pathkeys.c:1198:22: call_function: calling ‘pathkey_is_redundant’ from ‘make_pathkeys_for_sortclauses_extended’
# 157| pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys)
# 158| {
# 159|-> EquivalenceClass *new_ec = new_pathkey->pk_eclass;
# 160| ListCell *lc;
# 161|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/analyzejoins.c:1100:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/analyzejoins.c:849:1: enter_function: entry to ‘rel_is_distinct_for’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/analyzejoins.c:927:21: call_function: calling ‘query_is_distinct_for’ from ‘rel_is_distinct_for’
# 1098| /* non-resjunk columns should have grouping clauses */
# 1099| Assert(lg != NULL);
# 1100|-> sgc = (SortGroupClause *) lfirst(lg);
# 1101| lg = lnext(topop->groupClauses, lg);
# 1102|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5062:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5051:1: enter_function: entry to ‘fix_indexqual_clause’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5060:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5060:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5062:13: danger: dereference of NULL ‘replace_nestloop_params_mutator(clause, root)’
# 5060| clause = replace_nestloop_params(root, clause);
# 5061|
# 5062|-> if (IsA(clause, OpExpr))
# 5063| {
# 5064| OpExpr *op = (OpExpr *) clause;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5131:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:4981:1: enter_function: entry to ‘fix_indexqual_references’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:4991:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:4997:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:4997:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5003:34: call_function: calling ‘fix_indexqual_clause’ from ‘fix_indexqual_references’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5003:34: return_function: returning to ‘fix_indexqual_references’ from ‘fix_indexqual_clause’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/createplan.c:5003:34: call_function: calling ‘fix_indexqual_clause’ from ‘fix_indexqual_references’
# 5129| * Remove any binary-compatible relabeling of the indexkey
# 5130| */
# 5131|-> if (IsA(node, RelabelType))
# 5132| node = (Node *) ((RelabelType *) node)->arg;
# 5133|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/initsplan.c:2550:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sjinfo’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/initsplan.c:1273:1: enter_function: entry to ‘process_security_barrier_quals’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/initsplan.c:1286:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/initsplan.c:1296:17: call_function: calling ‘distribute_quals_to_rels’ from ‘process_security_barrier_quals’
# 2548| return;
# 2549| }
# 2550|-> if (sjinfo->jointype == JOIN_FULL)
# 2551| {
# 2552| /* FULL JOIN (above tests cannot match in this case) */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/planner.c:4082:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partially_grouped_rel’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/planner.c:7801:1: enter_function: entry to ‘create_partitionwise_grouping_paths’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/planner.c:7822:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/planner.c:7824:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/planner.c:7881:17: call_function: calling ‘create_ordinary_grouping_paths’ from ‘create_partitionwise_grouping_paths’
# 4080| Assert(partially_grouped_rel);
# 4081|
# 4082|-> if (partially_grouped_rel->pathlist)
# 4083| set_cheapest(partially_grouped_rel);
# 4084|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/setrefs.c:2013:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*root.grouping_map’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/setrefs.c:3519:1: enter_function: entry to ‘extract_query_dependencies’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/setrefs.c:3535:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/setrefs.c:3536:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/setrefs.c:3539:16: call_function: calling ‘extract_query_dependencies_walker’ from ‘extract_query_dependencies’
# 2011| {
# 2012| GroupingFunc *g = (GroupingFunc *) node;
# 2013|-> AttrNumber *grouping_map = root->grouping_map;
# 2014|
# 2015| /* If there are no grouping sets, we don't need this. */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/plan/setrefs.c:2109: warning[nullPointer]: Possible null pointer dereference: bestplan
# 2107|
# 2108| /* Mark the subplan we selected */
# 2109|-> root->isUsedSubplan[bestplan->plan_id - 1] = true;
# 2110|
# 2111| return (Node *) bestplan;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:121:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘target_rte’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:80:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:105:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:106:12: branch_false: following ‘false’ branch (when ‘command_type != 3’)...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:108:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:108:17: branch_false: following ‘false’ branch (when ‘command_type != 2’)...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:119:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:121:18: danger: dereference of NULL ‘target_rte’
# 119| if ((command_type == CMD_UPDATE || command_type == CMD_DELETE ||
# 120| command_type == CMD_MERGE) &&
# 121|-> !target_rte->inh)
# 122| {
# 123| /* row-identity logic expects to add stuff to processed_tlist */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:374:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:64:1: enter_function: entry to ‘preprocess_targetlist’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:80:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:105:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:106:12: branch_true: following ‘true’ branch (when ‘command_type == 3’)...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:107:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/preptlist.c:107:25: call_function: calling ‘expand_insert_targetlist’ from ‘preprocess_targetlist’
# 372| * sure we have all the user attributes in the right order.
# 373| */
# 374|-> numattrs = RelationGetNumberOfAttributes(rel);
# 375|
# 376| for (attrno = 1; attrno <= numattrs; attrno++)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1316:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘curColType’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1302:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1309:17: branch_true: following ‘true’ branch (when ‘subtlist’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1309:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1316:64: danger: dereference of NULL ‘curColType’
# 1314| continue;
# 1315| Assert(curColType != NULL);
# 1316|-> if (exprType((Node *) subtle->expr) == lfirst_oid(curColType))
# 1317| {
# 1318| /* If first subplan, copy the typmod; else compare */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1430:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1406:1: enter_function: entry to ‘generate_setop_grouplist’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1412:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_grouplist’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1413:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1413:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1418:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1430:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/optimizer/prep/prepunion.c:1430:17: danger: dereference of NULL ‘lg’
# 1428| /* non-resjunk columns should have grouping clauses */
# 1429| Assert(lg != NULL);
# 1430|-> sgc = (SortGroupClause *) lfirst(lg);
# 1431| lg = lnext(grouplist, lg);
# 1432| Assert(sgc->tleSortGroupRef == 0);
Error: COMPILER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/optimizer/util/clauses.c: scope_hint: In function ‘recheck_cast_function_args.isra.0’
postgresql-18.3/postgresql-16.11/src/backend/optimizer/util/clauses.c:4384:19: warning[-Wmaybe-uninitialized]: ‘actual_arg_types’ may be used uninitialized
# 4384 | rettype = enforce_generic_type_consistency(actual_arg_types,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 4385 | declared_arg_types,
# | ~~~~~~~~~~~~~~~~~~~
# 4386 | nargs,
# | ~~~~~~
# 4387 | funcform->prorettype,
# | ~~~~~~~~~~~~~~~~~~~~~
# 4388 | false);
# | ~~~~~~
postgresql-18.3/postgresql-16.11/src/backend/optimizer/util/clauses.c:45: included_from: Included from here.
postgresql-18.3/postgresql-16.11/src/include/parser/parse_coerce.h:85:17: note: by argument 1 of type ‘const Oid *’ to ‘enforce_generic_type_consistency’ declared here
# 85 | extern Oid enforce_generic_type_consistency(const Oid *actual_arg_types,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/src/backend/optimizer/util/clauses.c:4370:33: note: ‘actual_arg_types’ declared here
# 4370 | Oid actual_arg_types[FUNC_MAX_ARGS];
# | ^~~~~~~~~~~~~~~~
# 4382| Assert(nargs == pronargs);
# 4383| memcpy(declared_arg_types, proargtypes, pronargs * sizeof(Oid));
# 4384|-> rettype = enforce_generic_type_consistency(actual_arg_types,
# 4385| declared_arg_types,
# 4386| nargs,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/parser/gram.y:16795: error[legacyUninitvar]: Uninitialized variable: n
#16793| n->rolename = pstrdup($1);
#16794| }
#16795|-> $$ = n;
#16796| }
#16797| | CURRENT_ROLE
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:972:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h_cell’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:955:1: enter_function: entry to ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:958:30: call_function: inlined call to ‘list_head’ from ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:959:40: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:959:30: call_function: inlined call to ‘list_head’ from ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:964:34: call_function: inlined call to ‘list_length’ from ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:970:16: branch_true: following ‘true’ branch (when ‘extra_args > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:972:58: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_collate.c:972:58: danger: dereference of NULL ‘h_cell’
# 970| while (extra_args-- > 0)
# 971| {
# 972|-> (void) assign_collations_walker((Node *) lfirst(h_cell), loccontext);
# 973| h_cell = lnext(aggref->aggdirectargs, h_cell);
# 974| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_cte.c:1128:74: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_cte.c:1213:1: enter_function: entry to ‘checkWellFormedSelectStmt’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_cte.c:1237:33: call_function: calling ‘checkWellFormedRecursionWalker’ from ‘checkWellFormedSelectStmt’
# 1126| /* note that recursion could mutate innerwiths list */
# 1127| cell1 = list_head(cstate->innerwiths);
# 1128|-> lfirst(cell1) = lappend((List *) lfirst(cell1), cte);
# 1129| }
# 1130| checkWellFormedSelectStmt(stmt, cstate);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2013:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2007:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2009:20: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2009:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2011:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2007:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2009:20: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2013:70: danger: dereference of NULL ‘lc’
# 2011| if (i >= numposargs)
# 2012| {
# 2013|-> appendStringInfo(&argbuf, "%s => ", (char *) lfirst(lc));
# 2014| lc = lnext(argnames, lc);
# 2015| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_func.c:2270: warning[uninitvar]: Uninitialized variable: argoids
# 2268| */
# 2269| oid = LookupFuncNameInternal(func->args_unspecified ? objtype : OBJECT_ROUTINE,
# 2270|-> func->objname, nargs, argoids,
# 2271| false, missing_ok,
# 2272| &lookupError);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2972:77: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘aliasp_item’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2665:1: enter_function: entry to ‘expandRTE’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2671:12: branch_true: following ‘true’ branch (when ‘colnames’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2672:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2673:12: branch_false: following ‘false’ branch (when ‘colvars’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2676:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2951:59: call_function: inlined call to ‘list_head’ from ‘expandRTE’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2957:33: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2957:33: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2967:44: branch_true: following ‘true’ branch (when ‘colnames’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2970:52: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2970:52: branch_true: following ‘true’ branch (when ‘coltype != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2972:77: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_relation.c:2972:77: danger: dereference of NULL ‘aliasp_item’
# 2970| if (OidIsValid(coltype))
# 2971| {
# 2972|-> char *label = strVal(lfirst(aliasp_item));
# 2973|
# 2974| *colnames = lappend(*colnames,
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10859:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10738:10: enter_function: entry to ‘core_yyrestart’
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10743:9: call_function: calling ‘core_yyensure_buffer_stack’ from ‘core_yyrestart’
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10743:9: return_function: returning to ‘core_yyrestart’ from ‘core_yyensure_buffer_stack’
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10745:13: call_function: calling ‘core_yy_create_buffer’ from ‘core_yyrestart’
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10745:13: return_function: returning to ‘core_yyrestart’ from ‘core_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10748:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10748:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/scan.c:10748:9: call_function: calling ‘core_yy_init_buffer’ from ‘core_yyrestart’
#10857| yy_flush_buffer( b , yyscanner);
#10858|
#10859|-> b->yy_input_file = file;
#10860| b->yy_fill_buffer = 1;
#10861|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4040:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:3984:1: enter_function: entry to ‘get_qual_for_hash’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4021:26: call_function: inlined call to ‘list_head’ from ‘get_qual_for_hash’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4024:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4024:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4029:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4029:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4040:43: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4040:43: danger: dereference of NULL ‘partexprs_item’
# 4038| else
# 4039| {
# 4040|-> keyCol = (Node *) copyObject(lfirst(partexprs_item));
# 4041| partexprs_item = lnext(key->partexprs, partexprs_item);
# 4042| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2505:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘start’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2485:1: enter_function: entry to ‘get_steps_using_prefix_recurse’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2509:12: branch_true: following ‘true’ branch (when ‘cur_keyno < final_keyno’)...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2519:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2523:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2519:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2535:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2535:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2535:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2542:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2545:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:2559:37: call_function: calling ‘get_steps_using_prefix_recurse’ from ‘get_steps_using_prefix_recurse’
# 2503|
# 2504| Assert(start != NULL);
# 2505|-> cur_keyno = ((PartClauseInfo *) lfirst(start))->keyno;
# 2506| final_keyno = ((PartClauseInfo *) llast(prefix))->keyno;
# 2507|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3477:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc2’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3405:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3422:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3423:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3429:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3429:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3436:42: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3443:20: branch_false: following ‘false’ branch (when ‘keyno <= nvalues’)...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3446:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3446:20: branch_true: following ‘true’ branch (when ‘lc1’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3453:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3464:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3477:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3477:25: danger: dereference of NULL ‘lc2’
# 3475|
# 3476| /* Set up the stepcmpfuncs entry, unless we already did */
# 3477|-> cmpfn = lfirst_oid(lc2);
# 3478| Assert(OidIsValid(cmpfn));
# 3479| if (cmpfn != context->stepcmpfuncs[stateidx].fn_oid)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partprune.c:3521:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[0]’
# 3519|
# 3520| case PARTITION_STRATEGY_LIST:
# 3521|-> return get_matching_list_bounds(context,
# 3522| opstep->opstrategy,
# 3523| values[0], nvalues,
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:946:1: warning[-Wanalyzer-malloc-leak]: leak of ‘rw’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:895:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:898:13: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:898:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:913:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:913:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:929:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:929:14: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:930:12: branch_false: following ‘false’ branch (when ‘rw’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:938:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/bgworker.c:946:1: danger: ‘rw’ leaks here; was allocated at [(7)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/6)
# 944|
# 945| slist_push_head(&BackgroundWorkerList, &rw->rw_lnode);
# 946|-> }
# 947|
# 948| /*
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:2292:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:4279:1: enter_function: entry to ‘BackendInitialize’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:4405:18: call_function: calling ‘ProcessStartupPacket’ from ‘BackendInitialize’
# 2290| if (strchr(port->user_name, '@') ==
# 2291| port->user_name + strlen(port->user_name) - 1)
# 2292|-> *strchr(port->user_name, '@') = '\0';
# 2293| else
# 2294| {
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5599:16: warning[-Wanalyzer-malloc-leak]: leak of ‘bn’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5084:1: enter_function: entry to ‘process_pm_pmsignal’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5187:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5188:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5187:13: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5188:46: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5187:13: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5191:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/postmaster.c:5191:17: call_function: calling ‘StartAutovacuumWorker’ from ‘process_pm_pmsignal’
# 5597| MaxLivePostmasterChildren(void)
# 5598| {
# 5599|-> return 2 * (MaxConnections + autovacuum_max_workers + 1 +
# 5600| max_wal_senders + max_worker_processes);
# 5601| }
Error: GCC_ANALYZER_WARNING:
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:212:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:567:1: enter_function: entry to ‘SysLogger_Start’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:572:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:593:13: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:635:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:635:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:693:25: call_function: calling ‘SysLoggerMain’ from ‘SysLogger_Start’
# 210| if (fd != -1)
# 211| {
# 212|-> (void) dup2(fd, STDOUT_FILENO);
# 213| (void) dup2(fd, STDERR_FILENO);
# 214| close(fd);
Error: GCC_ANALYZER_WARNING:
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:213:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:567:1: enter_function: entry to ‘SysLogger_Start’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:572:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:593:13: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:635:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:635:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-18.3/postgresql-16.11/src/backend/postmaster/syslogger.c:693:25: call_function: calling ‘SysLoggerMain’ from ‘SysLogger_Start’
# 211| {
# 212| (void) dup2(fd, STDOUT_FILENO);
# 213|-> (void) dup2(fd, STDERR_FILENO);
# 214| close(fd);
# 215| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:1021:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:985:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:990:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:1002:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:1004:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:1006:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:1009:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/regex/rege_dfa.c:1021:25: danger: dereference of NULL ‘lastap.ss’
# 1019| lastap = ap;
# 1020| assert(ap.ss != NULL);
# 1021|-> lastap.ss->inchain[lastap.co] = ss->inchain[i];
# 1022| }
# 1023| ss->outs[i] = NULL;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/logical/reorderbuffer.c:4835: error[legacyUninitvar]: Uninitialized variable: chunksize
# 4833| elog(ERROR, "unexpected type of toast chunk");
# 4834|
# 4835|-> ent->size += chunksize;
# 4836| ent->last_chunk_seq = chunk_seq;
# 4837| ent->num_chunks++;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1094:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1058:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1081:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1083:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1092:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1094:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1094:9: danger: use of uninitialized value ‘yyss’ here
# 1092| if (! yyptr)
# 1093| YYNOMEM;
# 1094|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1095| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1096| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:99:68: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].node’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:99:68: danger: use of uninitialized value ‘yyvsp[2305843009213693951].node’ here
# 97| firstcmd: command opt_semicolon
# 98| {
# 99|-> replication_parse_result = $1;
# 100| }
# 101| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:154:77: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:154:77: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 152| var_name: IDENT { $$ = $1; }
# 153| | var_name '.' IDENT
# 154|-> { $$ = psprintf("%s.%s", $1, $3); }
# 155| ;
# 156|
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:181:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:181:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 179| cmd = makeNode(CreateReplicationSlotCmd);
# 180| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 181|-> cmd->slotname = $2;
# 182| cmd->temporary = $3;
# 183| cmd->options = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:182:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:182:58: danger: out-of-bounds read at bit -64 but ‘yyvsa’ starts at bit 0
# 180| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 181| cmd->slotname = $2;
# 182|-> cmd->temporary = $3;
# 183| cmd->options = $5;
# 184| $$ = (Node *) cmd;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:192:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:192:57: danger: out-of-bounds read from byte -24 till byte -17 but ‘yyvsa’ starts at byte 0
# 190| cmd = makeNode(CreateReplicationSlotCmd);
# 191| cmd->kind = REPLICATION_KIND_LOGICAL;
# 192|-> cmd->slotname = $2;
# 193| cmd->temporary = $3;
# 194| cmd->plugin = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:193:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:193:58: danger: out-of-bounds read at bit -128 but ‘yyvsa’ starts at bit 0
# 191| cmd->kind = REPLICATION_KIND_LOGICAL;
# 192| cmd->slotname = $2;
# 193|-> cmd->temporary = $3;
# 194| cmd->plugin = $5;
# 195| cmd->options = $6;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:201:129: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:201:129: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 199|
# 200| create_slot_options:
# 201|-> '(' generic_option_list ')' { $$ = $2; }
# 202| | create_slot_legacy_opt_list { $$ = $1; }
# 203| ;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:207:78: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:207:78: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 205| create_slot_legacy_opt_list:
# 206| create_slot_legacy_opt_list create_slot_legacy_opt
# 207|-> { $$ = lappend($1, $2); }
# 208| | /* EMPTY */
# 209| { $$ = NIL; }
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:270:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:270:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 268| cmd = makeNode(StartReplicationCmd);
# 269| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 270|-> cmd->slotname = $2;
# 271| cmd->startpoint = $4;
# 272| cmd->timeline = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:284:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:284:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 282| cmd = makeNode(StartReplicationCmd);
# 283| cmd->kind = REPLICATION_KIND_LOGICAL;
# 284|-> cmd->slotname = $3;
# 285| cmd->startpoint = $5;
# 286| cmd->options = $6;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:341:117: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:341:117: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 339|
# 340| plugin_options:
# 341|-> '(' plugin_opt_list ')' { $$ = $2; }
# 342| | /* EMPTY */ { $$ = NIL; }
# 343| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:352:56: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:352:56: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 350| | plugin_opt_list ',' plugin_opt_elem
# 351| {
# 352|-> $$ = lappend($1, $3);
# 353| }
# 354| ;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:359:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:359:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 357| IDENT plugin_opt_arg
# 358| {
# 359|-> $$ = makeDefElem($1, $2, -1);
# 360| }
# 361| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:370:78: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:370:78: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 368| generic_option_list:
# 369| generic_option_list ',' generic_option
# 370|-> { $$ = lappend($1, $3); }
# 371| | generic_option
# 372| { $$ = list_make1($1); }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:382:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:382:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 380| | ident_or_keyword IDENT
# 381| {
# 382|-> $$ = makeDefElem($1, (Node *) makeString($2), -1);
# 383| }
# 384| | ident_or_keyword SCONST
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:386:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:386:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 384| | ident_or_keyword SCONST
# 385| {
# 386|-> $$ = makeDefElem($1, (Node *) makeString($2), -1);
# 387| }
# 388| | ident_or_keyword UCONST
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:390:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_false: following ‘false’ branch (when ‘yyn != -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1137:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1140:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1149:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1161:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1168:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1171:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1188:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1052:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1116:6: branch_false: following ‘false’ branch (when ‘yystate != 29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1119:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1131:6: branch_true: following ‘true’ branch (when ‘yyn == -29’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1132:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1201:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.c:1203:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_gram.y:390:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 388| | ident_or_keyword UCONST
# 389| {
# 390|-> $$ = makeDefElem($1, (Node *) makeInteger($2), -1);
# 391| }
# 392| ;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_scanner.c:1970:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_scanner.l:294:1: enter_function: entry to ‘replication_scanner_is_replication_command’
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_scanner.l:296:22: call_function: calling ‘replication_yylex’ from ‘replication_scanner_is_replication_command’
# 1968| * we need to put in 2 end-of-buffer characters.
# 1969| */
# 1970|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1971| if ( ! b->yy_ch_buf )
# 1972| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_scanner.c:2011: warning[nullPointer]: Possible null pointer dereference: b
# 2009| yy_flush_buffer( b );
# 2010|
# 2011|-> b->yy_input_file = file;
# 2012| b->yy_fill_buffer = 1;
# 2013|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/replication/repl_scanner.c:2012: warning[nullPointer]: Possible null pointer dereference: b
# 2010|
# 2011| b->yy_input_file = file;
# 2012|-> b->yy_fill_buffer = 1;
# 2013|
# 2014| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:980:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:938:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:944:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:967:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:969:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:978:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:980:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:980:9: danger: use of uninitialized value ‘yyss’ here
# 978| if (! yyptr)
# 979| YYNOMEM;
# 980|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 981| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 982| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.y:62:102: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:938:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1002:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1002:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1005:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1017:6: branch_false: following ‘false’ branch (when ‘yyn != -10’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1023:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1023:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1026:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1035:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1047:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1054:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1057:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1067:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1067:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1074:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:938:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1002:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1002:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1005:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1017:6: branch_true: following ‘true’ branch (when ‘yyn == -10’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1018:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1087:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.c:1089:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_gram.y:62:102: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 60| standby_config:
# 61| standby_list { $$ = create_syncrep_config("1", $1, SYNC_REP_PRIORITY); }
# 62|-> | NUM '(' standby_list ')' { $$ = create_syncrep_config($1, $3, SYNC_REP_PRIORITY); }
# 63| | ANY NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_QUORUM); }
# 64| | FIRST NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_PRIORITY); }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1645:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1632:21: enter_function: entry to ‘syncrep_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1636:31: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1637:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1640:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1645:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1643| * we need to put in 2 end-of-buffer characters.
# 1644| */
# 1645|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1646| if ( ! b->yy_ch_buf )
# 1647| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1686: warning[nullPointer]: Possible null pointer dereference: b
# 1684| yy_flush_buffer( b );
# 1685|
# 1686|-> b->yy_input_file = file;
# 1687| b->yy_fill_buffer = 1;
# 1688|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1687: warning[nullPointer]: Possible null pointer dereference: b
# 1685|
# 1686| b->yy_input_file = file;
# 1687|-> b->yy_fill_buffer = 1;
# 1688|
# 1689| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1900:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1884:17: enter_function: entry to ‘syncrep_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1893:24: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1894:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1894:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/replication/syncrep_scanner.c:1902:13: call_function: calling ‘syncrep_yy_scan_buffer’ from ‘syncrep_yy_scan_bytes’
# 1898| buf[i] = yybytes[i];
# 1899|
# 1900|-> buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1901|
# 1902| b = yy_scan_buffer( buf, n );
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:797:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1372:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1399:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1403:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1431:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1440:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1447:29: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1447:29: call_function: calling ‘dependency_is_compatible_clause’ from ‘dependencies_clauselist_selectivity’
# 795| /* OK to proceed with checking "var" */
# 796| }
# 797|-> else if (IsA(clause, ScalarArrayOpExpr))
# 798| {
# 799| /* If it's an scalar array operator, check for Var IN Const. */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1225:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1170:1: enter_function: entry to ‘dependency_is_compatible_expression’
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1176:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1181:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1181:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1185:36: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1185:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1188:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1191:13: call_function: inlined call to ‘is_opclause’ from ‘dependency_is_compatible_expression’
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1225:18: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/statistics/dependencies.c:1225:18: danger: dereference of NULL ‘clause’
# 1223| /* OK to proceed with checking "var" */
# 1224| }
# 1225|-> else if (IsA(clause, ScalarArrayOpExpr))
# 1226| {
# 1227| /* If it's an scalar array operator, check for Var IN Const. */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/statistics/mcv.c:1714:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/postgresql-16.11/src/backend/statistics/mcv.c:2130:1: enter_function: entry to ‘mcv_clause_selectivity_or’
postgresql-18.3/postgresql-16.11/src/backend/statistics/mcv.c:2144:23: call_function: calling ‘mcv_get_match_bitmap’ from ‘mcv_clause_selectivity_or’
# 1712| }
# 1713| }
# 1714|-> else if (IsA(clause, ScalarArrayOpExpr))
# 1715| {
# 1716| ScalarArrayOpExpr *expr = (ScalarArrayOpExpr *) clause;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/statistics/mvdistinct.c:366:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/statistics/mvdistinct.c:356:1: enter_function: entry to ‘pg_ndistinct_out’
postgresql-18.3/postgresql-16.11/src/backend/statistics/mvdistinct.c:359:30: call_function: calling ‘statext_ndistinct_deserialize’ from ‘pg_ndistinct_out’
postgresql-18.3/postgresql-16.11/src/backend/statistics/mvdistinct.c:359:30: return_function: returning to ‘pg_ndistinct_out’ from ‘statext_ndistinct_deserialize’
postgresql-18.3/postgresql-16.11/src/backend/statistics/mvdistinct.c:366:25: danger: dereference of NULL ‘statext_ndistinct_deserialize(pg_detoast_datum_packed((char *)*fcinfo.args[0].value))’
# 364| appendStringInfoChar(&str, '{');
# 365|
# 366|-> for (i = 0; i < ndist->nitems; i++)
# 367| {
# 368| int j;
Error: CPPCHECK_WARNING (CWE-909):
postgresql-18.3/postgresql-16.11/src/backend/storage/lmgr/lmgr.c:728: error[uninitStructMember]: Uninitialized struct member: callback.previous
# 726|
# 727| if (oper != XLTW_None)
# 728|-> error_context_stack = callback.previous;
# 729| }
# 730|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:524:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:736:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:736:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
# 522| {
# 523| itemidptr = &itemidbase[i];
# 524|-> if (upper != itemidptr->itemoff + itemidptr->alignedlen)
# 525| break;
# 526| upper -= itemidptr->alignedlen;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:497:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1402:1: enter_function: entry to ‘_mdfd_getseg’
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1417:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1424:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1424:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1434:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1444:18: branch_true: following ‘true’ branch (when ‘nextsegno <= targetseg’)...
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1446:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1446:39: call_function: calling ‘_mdnblocks’ from ‘_mdfd_getseg’
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1446:39: return_function: returning to ‘_mdfd_getseg’ from ‘_mdnblocks’
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1451:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1454:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/storage/smgr/md.c:1476:33: call_function: calling ‘mdextend’ from ‘_mdfd_getseg’
# 495| Assert(seekpos < (off_t) BLCKSZ * RELSEG_SIZE);
# 496|
# 497|-> if ((nbytes = FileWrite(v->mdfd_vfd, buffer, BLCKSZ, seekpos, WAIT_EVENT_DATA_FILE_EXTEND)) != BLCKSZ)
# 498| {
# 499| if (nbytes < 0)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/dict_synonym.c:230: error[uninitvar]: Uninitialized variables: &key.outlen, &key.flags
# 228| key.out = NULL;
# 229|
# 230|-> found = (Syn *) bsearch(&key, d->syn, d->len, sizeof(Syn), compareSyn);
# 231| pfree(key.in);
# 232|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/ts_parse.c:82:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘res’
postgresql-18.3/postgresql-16.11/src/backend/tsearch/ts_parse.c:540:1: enter_function: entry to ‘hlparsetext’
postgresql-18.3/postgresql-16.11/src/backend/tsearch/ts_parse.c:590:38: call_function: calling ‘LexizeExec’ from ‘hlparsetext’
# 80| else
# 81| list->head = list->tail = newpl;
# 82|-> newpl->next = NULL;
# 83| }
# 84|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser.c:198: error[nullPointer]: Null pointer dereference: lex
# 196| }
# 197| st->list[st->cur].lexeme = palloc(llen + 1);
# 198|-> memcpy(st->list[st->cur].lexeme, lex, llen);
# 199| st->list[st->cur].lexeme[llen] = '\0';
# 200| st->list[st->cur].type = type;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:453: error[ctunullpointer]: Null pointer dereference: prs
# 451| * an alpha character, but not a member of other char classes.
# 452| */
# 453|-> p_iswhat(alnum, 1)
# 454| p_iswhat(alpha, 1)
# 455| p_iswhat(digit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:453: warning[nullPointer]: Possible null pointer dereference: prs
# 451| * an alpha character, but not a member of other char classes.
# 452| */
# 453|-> p_iswhat(alnum, 1)
# 454| p_iswhat(alpha, 1)
# 455| p_iswhat(digit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:454: error[ctunullpointer]: Null pointer dereference: prs
# 452| */
# 453| p_iswhat(alnum, 1)
# 454|-> p_iswhat(alpha, 1)
# 455| p_iswhat(digit, 0)
# 456| p_iswhat(lower, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:454: warning[nullPointer]: Possible null pointer dereference: prs
# 452| */
# 453| p_iswhat(alnum, 1)
# 454|-> p_iswhat(alpha, 1)
# 455| p_iswhat(digit, 0)
# 456| p_iswhat(lower, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:455: error[ctunullpointer]: Null pointer dereference: prs
# 453| p_iswhat(alnum, 1)
# 454| p_iswhat(alpha, 1)
# 455|-> p_iswhat(digit, 0)
# 456| p_iswhat(lower, 0)
# 457| p_iswhat(print, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:455: warning[nullPointer]: Possible null pointer dereference: prs
# 453| p_iswhat(alnum, 1)
# 454| p_iswhat(alpha, 1)
# 455|-> p_iswhat(digit, 0)
# 456| p_iswhat(lower, 0)
# 457| p_iswhat(print, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:456: error[ctunullpointer]: Null pointer dereference: prs
# 454| p_iswhat(alpha, 1)
# 455| p_iswhat(digit, 0)
# 456|-> p_iswhat(lower, 0)
# 457| p_iswhat(print, 0)
# 458| p_iswhat(punct, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:456: warning[nullPointer]: Possible null pointer dereference: prs
# 454| p_iswhat(alpha, 1)
# 455| p_iswhat(digit, 0)
# 456|-> p_iswhat(lower, 0)
# 457| p_iswhat(print, 0)
# 458| p_iswhat(punct, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:457: error[ctunullpointer]: Null pointer dereference: prs
# 455| p_iswhat(digit, 0)
# 456| p_iswhat(lower, 0)
# 457|-> p_iswhat(print, 0)
# 458| p_iswhat(punct, 0)
# 459| p_iswhat(space, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:457: warning[nullPointer]: Possible null pointer dereference: prs
# 455| p_iswhat(digit, 0)
# 456| p_iswhat(lower, 0)
# 457|-> p_iswhat(print, 0)
# 458| p_iswhat(punct, 0)
# 459| p_iswhat(space, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:458: error[ctunullpointer]: Null pointer dereference: prs
# 456| p_iswhat(lower, 0)
# 457| p_iswhat(print, 0)
# 458|-> p_iswhat(punct, 0)
# 459| p_iswhat(space, 0)
# 460| p_iswhat(upper, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:458: warning[nullPointer]: Possible null pointer dereference: prs
# 456| p_iswhat(lower, 0)
# 457| p_iswhat(print, 0)
# 458|-> p_iswhat(punct, 0)
# 459| p_iswhat(space, 0)
# 460| p_iswhat(upper, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:459: error[ctunullpointer]: Null pointer dereference: prs
# 457| p_iswhat(print, 0)
# 458| p_iswhat(punct, 0)
# 459|-> p_iswhat(space, 0)
# 460| p_iswhat(upper, 0)
# 461| p_iswhat(xdigit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:459: warning[nullPointer]: Possible null pointer dereference: prs
# 457| p_iswhat(print, 0)
# 458| p_iswhat(punct, 0)
# 459|-> p_iswhat(space, 0)
# 460| p_iswhat(upper, 0)
# 461| p_iswhat(xdigit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:460: error[ctunullpointer]: Null pointer dereference: prs
# 458| p_iswhat(punct, 0)
# 459| p_iswhat(space, 0)
# 460|-> p_iswhat(upper, 0)
# 461| p_iswhat(xdigit, 0)
# 462|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:460: warning[nullPointer]: Possible null pointer dereference: prs
# 458| p_iswhat(punct, 0)
# 459| p_iswhat(space, 0)
# 460|-> p_iswhat(upper, 0)
# 461| p_iswhat(xdigit, 0)
# 462|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:461: error[ctunullpointer]: Null pointer dereference: prs
# 459| p_iswhat(space, 0)
# 460| p_iswhat(upper, 0)
# 461|-> p_iswhat(xdigit, 0)
# 462|
# 463| /* p_iseq should be used only for ascii symbols */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:461: warning[nullPointer]: Possible null pointer dereference: prs
# 459| p_iswhat(space, 0)
# 460| p_iswhat(upper, 0)
# 461|-> p_iswhat(xdigit, 0)
# 462|
# 463| /* p_iseq should be used only for ascii symbols */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:469: error[ctunullpointer]: Null pointer dereference: prs
# 467| {
# 468| Assert(prs->state);
# 469|-> return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
# 470| }
# 471|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:469: warning[nullPointer]: Possible null pointer dereference: prs
# 467| {
# 468| Assert(prs->state);
# 469|-> return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
# 470| }
# 471|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:476: error[ctunullpointer]: Null pointer dereference: prs
# 474| {
# 475| Assert(prs->state);
# 476|-> return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
# 477| }
# 478|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:476: warning[nullPointer]: Possible null pointer dereference: prs
# 474| {
# 475| Assert(prs->state);
# 476|-> return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
# 477| }
# 478|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:482: warning[nullPointer]: Possible null pointer dereference: prs
# 480| p_iseqC(TParser *prs)
# 481| {
# 482|-> return p_iseq(prs, prs->c);
# 483| }
# 484|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/tsearch/wparser_def.c:488: warning[nullPointer]: Possible null pointer dereference: prs
# 486| p_isneC(TParser *prs)
# 487| {
# 488|-> return !p_iseq(prs, prs->c);
# 489| }
# 490|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/activity/backend_status.c:1127: error[uninitvar]: Uninitialized variables: &key.backendStatus, &key.backend_xid, &key.backend_xmin, &key.backend_subxact_count, &key.backend_subxact_overflowed
# 1125| */
# 1126| key.backend_id = beid;
# 1127|-> return bsearch(&key, localBackendStatusTable, localNumBackends,
# 1128| sizeof(LocalPgBackendStatus), cmp_lbestatus);
# 1129| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:1376: warning[uninitvar]: Uninitialized variable: dim
# 1374|
# 1375| /* This checks for overflow of array dimensions */
# 1376|-> nitems = ArrayGetNItems(ndim, dim);
# 1377| ArrayCheckBounds(ndim, dim, lBound);
# 1378|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:1377: warning[uninitvar]: Uninitialized variable: lBound
# 1375| /* This checks for overflow of array dimensions */
# 1376| nitems = ArrayGetNItems(ndim, dim);
# 1377|-> ArrayCheckBounds(ndim, dim, lBound);
# 1378|
# 1379| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:1733: warning[uninitvar]: Uninitialized variable: buf
# 1731| }
# 1732|
# 1733|-> PG_RETURN_TEXT_P(cstring_to_text(buf));
# 1734| }
# 1735|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:2938: warning[uninitvar]: Uninitialized variable: dim
# 2936|
# 2937| /* complain if too few source items; we ignore extras, however */
# 2938|-> if (nelems < ArrayGetNItems(nSubscripts, dim))
# 2939| ereport(ERROR,
# 2940| (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3808:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3803:18: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3803:18: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3806:16: branch_true: following ‘true’ branch (when ‘nelems > 7’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3808:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3808:21: danger: dereference of NULL ‘bitmap’
# 3806| while (nelems >= 8)
# 3807| {
# 3808|-> if (*bitmap != 0xFF)
# 3809| return true;
# 3810| bitmap++;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3818:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3803:18: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3803:18: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3806:16: branch_false: following ‘false’ branch (when ‘nelems <= 7’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3806:16: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3816:16: branch_true: following ‘true’ branch (when ‘nelems > 0’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3818:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:3818:22: danger: dereference of NULL ‘bitmap’
# 3816| while (nelems > 0)
# 3817| {
# 3818|-> if ((*bitmap & bitmask) == 0)
# 3819| return true;
# 3820| bitmask <<= 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5004:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘destbitmap’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5721:1: enter_function: entry to ‘makeArrayResultArr’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5731:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5742:54: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5768:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5769:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5769:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5769:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/arrayfuncs.c:5769:25: call_function: calling ‘array_bitmap_copy’ from ‘makeArrayResultArr’
# 5002| destbitmap += destoffset / 8;
# 5003| destbitmask = 1 << (destoffset % 8);
# 5004|-> destbitval = *destbitmap;
# 5005| if (srcbitmap)
# 5006| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/dbsize.c:608: warning[uninitvar]: Uninitialized variable: buf
# 606| }
# 607|
# 608|-> PG_RETURN_TEXT_P(cstring_to_text(buf));
# 609| }
# 610|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/inet_cidr_ntop.c:285: warning[uninitvar]: Uninitialized variable: outbuf
# 283| /* Format CIDR /width. */
# 284| (void) SPRINTF((cp, "/%u", bits));
# 285|-> if (strlen(outbuf) + 1 > size)
# 286| goto emsgsize;
# 287| strcpy(dst, outbuf);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonb.c:127: error[legacyUninitvar]: Uninitialized variable: nbytes
# 125| elog(ERROR, "unsupported jsonb version number %d", version);
# 126|
# 127|-> return jsonb_from_cstring(str, nbytes, NULL);
# 128| }
# 129|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonb.c:127: error[legacyUninitvar]: Uninitialized variable: str
# 125| elog(ERROR, "unsupported jsonb version number %d", version);
# 126|
# 127|-> return jsonb_from_cstring(str, nbytes, NULL);
# 128| }
# 129|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonbsubs.c:155: error[legacyUninitvar]: Uninitialized variable: subExpr
# 153| }
# 154|
# 155|-> upperIndexpr = lappend(upperIndexpr, subExpr);
# 156| }
# 157|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonfuncs.c:5538: warning[nullPointer]: Possible null pointer dereference: res
# 5536| }
# 5537|
# 5538|-> if (res->type == jbvArray)
# 5539| res->val.array.rawScalar = is_scalar;
# 5540|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath.c:125: error[legacyUninitvar]: Uninitialized variable: nbytes
# 123| elog(ERROR, "unsupported jsonpath version number: %d", version);
# 124|
# 125|-> return jsonPathFromCstring(str, nbytes, NULL);
# 126| }
# 127|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath.c:125: error[legacyUninitvar]: Uninitialized variable: str
# 123| elog(ERROR, "unsupported jsonpath version number: %d", version);
# 124|
# 125|-> return jsonPathFromCstring(str, nbytes, NULL);
# 126| }
# 127|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1196:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1154:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1160:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1183:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1194:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1196:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1196:9: danger: use of uninitialized value ‘yyss’ here
# 1194| if (! yyptr)
# 1195| YYNOMEM;
# 1196|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1197| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1198| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1323:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1154:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1218:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1218:6: branch_false: following ‘false’ branch (when ‘yystate != 5’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1221:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1233:6: branch_false: following ‘false’ branch (when ‘yyn != -44’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1239:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1239:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1242:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1273:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1277:7: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_gram.c:1323:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1321| unconditionally makes the parser a bit smaller, and it avoids a
# 1322| GCC warning that YYVAL may be used uninitialized. */
# 1323|-> yyval = yyvsp[1-yylen];
# 1324|
# 1325|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5370: warning[nullPointer]: Possible null pointer dereference: b
# 5368| yy_flush_buffer( b );
# 5369|
# 5370|-> b->yy_input_file = file;
# 5371| b->yy_fill_buffer = 1;
# 5372|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5370:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5254:10: enter_function: entry to ‘jsonpath_yyrestart’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5258:9: call_function: calling ‘jsonpath_yyensure_buffer_stack’ from ‘jsonpath_yyrestart’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5258:9: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yyensure_buffer_stack’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5260:13: call_function: calling ‘jsonpath_yy_create_buffer’ from ‘jsonpath_yyrestart’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5260:13: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5263:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5263:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5263:9: call_function: calling ‘jsonpath_yy_init_buffer’ from ‘jsonpath_yyrestart’
# 5368| yy_flush_buffer( b );
# 5369|
# 5370|-> b->yy_input_file = file;
# 5371| b->yy_fill_buffer = 1;
# 5372|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/jsonpath_scan.c:5371: warning[nullPointer]: Possible null pointer dereference: b
# 5369|
# 5370| b->yy_input_file = file;
# 5371|-> b->yy_fill_buffer = 1;
# 5372|
# 5373| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:510: warning[nullPointer]: Possible null pointer dereference: blocked_instance
# 508|
# 509| lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
# 510|-> conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
# 511|
# 512| /* Now scan the PROCLOCK data for conflicting procs */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:510:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘blocked_instance’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:483:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:485:43: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:497:29: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:509:58: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/lockfuncs.c:510:61: danger: dereference of NULL ‘blocked_instance’
# 508|
# 509| lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
# 510|-> conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
# 511|
# 512| /* Now scan the PROCLOCK data for conflicting procs */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/pg_locale.c:2048: error[legacyUninitvar]: Uninitialized variable: result
# 2046| PGLOCALE_SUPPORT_ERROR(locale->provider);
# 2047|
# 2048|-> return result;
# 2049| }
# 2050|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/pg_locale.c:2084: error[legacyUninitvar]: Uninitialized variable: result
# 2082| PGLOCALE_SUPPORT_ERROR(locale->provider);
# 2083|
# 2084|-> return result;
# 2085| }
# 2086|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/rangetypes.c:2487: error[ctunullpointer]: Null pointer dereference: value
# 2485|
# 2486| /* Detect whether we need double quotes for this value */
# 2487|-> nq = (value[0] == '\0'); /* force quotes for empty string */
# 2488| for (ptr = value; *ptr; ptr++)
# 2489| {
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/varlena.c:461: warning[nullPointer]: Possible null pointer dereference: rp
# 459| rp = result = NULL; /* keep compiler quiet */
# 460| }
# 461|-> *rp = '\0';
# 462| PG_RETURN_CSTRING(result);
# 463| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/xid8funcs.c: scope_hint: In function ‘is_visible_fxid’
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/xid8funcs.c:237:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 237 | res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# | ^
# 235| void *res;
# 236|
# 237|-> res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# 238| cmp_fxid);
# 239| /* if found, transaction is still in progress */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/backend/utils/adt/xid8funcs.c:237:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 235| void *res;
# 236|
# 237|-> res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# 238| cmp_fxid);
# 239| /* if found, transaction is still in progress */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/catcache.c:2222: warning[nullPointer]: Possible null pointer dereference: srckeys
# 2220| int attnum = attnos[i];
# 2221| Form_pg_attribute att = TupleDescAttr(tupdesc, attnum - 1);
# 2222|-> Datum src = srckeys[i];
# 2223| NameData srcname;
# 2224|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:2383:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5452:1: enter_function: entry to ‘RelationGetIdentityKeyBitmap’
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5461:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5465:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5465:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5471:23: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5474:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5478:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/relcache.c:5478:21: call_function: calling ‘RelationIdGetRelation’ from ‘RelationGetIdentityKeyBitmap’
# 2381| pg_class_tuple = ScanPgRelation(RelationGetRelid(relation),
# 2382| true, false);
# 2383|-> relp = (Form_pg_class) GETSTRUCT(pg_class_tuple);
# 2384| memcpy(relation->rd_rel, relp, CLASS_TUPLE_SIZE);
# 2385| heap_freetuple(pg_class_tuple);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:503:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&mapdicts’
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:424:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:427:43: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:432:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:435:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:497:36: branch_false: following ‘false’ branch (when ‘ndicts <= 0’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:507:47: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/ts_cache.c:503:41: danger: use of uninitialized value ‘&mapdicts’ here
# 501| MemoryContextAlloc(CacheMemoryContext,
# 502| sizeof(Oid) * ndicts);
# 503|-> memcpy(maplists[maxtokentype].dictIds, mapdicts,
# 504| sizeof(Oid) * ndicts);
# 505| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/cache/typcache.c:2711: warning[uninitvar]: Uninitialized variable: &srch.sort_order
# 2709|
# 2710| srch.enum_oid = arg;
# 2711|-> return bsearch(&srch, enumdata->enum_values, enumdata->num_values,
# 2712| sizeof(EnumItem), enum_oid_cmp);
# 2713| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/init/postinit.c:1300:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/utils/init/postinit.c:1249:1: enter_function: entry to ‘process_startup_options’
postgresql-18.3/postgresql-16.11/src/backend/utils/init/postinit.c:1291:19: call_function: inlined call to ‘list_head’ from ‘process_startup_options’
postgresql-18.3/postgresql-16.11/src/backend/utils/init/postinit.c:1292:16: branch_true: following ‘true’ branch (when ‘gucopts’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/utils/init/postinit.c:1297:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/init/postinit.c:1300:17: danger: dereference of NULL ‘<unknown>’
# 1298| gucopts = lnext(port->guc_options, gucopts);
# 1299|
# 1300|-> value = lfirst(gucopts);
# 1301| gucopts = lnext(port->guc_options, gucopts);
# 1302|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.c:1630:54: warning[-Wanalyzer-malloc-leak]: leak of ‘GUC_yy_create_buffer(fp, 16384)’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:586:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1628| * we need to put in 2 end-of-buffer characters.
# 1629| */
# 1630|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1631| if ( ! b->yy_ch_buf )
# 1632| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.c:1630:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:586:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1628| * we need to put in 2 end-of-buffer characters.
# 1629| */
# 1630|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1631| if ( ! b->yy_ch_buf )
# 1632| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.c:1671: warning[nullPointer]: Possible null pointer dereference: b
# 1669| yy_flush_buffer( b );
# 1670|
# 1671|-> b->yy_input_file = file;
# 1672| b->yy_fill_buffer = 1;
# 1673|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.c:1672: warning[nullPointer]: Possible null pointer dereference: b
# 1670|
# 1671| b->yy_input_file = file;
# 1672|-> b->yy_fill_buffer = 1;
# 1673|
# 1674| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:586:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 382| errorcount = 0;
# 383|
# 384|-> lex_buffer = yy_create_buffer(fp, YY_BUF_SIZE);
# 385| yy_switch_to_buffer(lex_buffer);
# 386|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6522:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eqsgn’
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6494:12: branch_false: following ‘false’ branch (when ‘array’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6498:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6498:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6502:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6504:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6511:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/misc/guc.c:6522:17: danger: dereference of NULL ‘eqsgn’
# 6520|
# 6521| eqsgn = strchr(val, '=');
# 6522|-> *eqsgn = '\0';
# 6523|
# 6524| /* skip if we have permission to delete it */
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:699:1: enter_function: entry to ‘AllocSetAlloc’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:714:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:790:16: call_function: inlined call to ‘AllocSetFreeIndex’ from ‘AllocSetAlloc’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:792:12: branch_false: following ‘false’ branch (when ‘chunk’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:830:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:933:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:933:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: danger: ‘block’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 933| if (blksize < required_size)
# 934| break;
# 935|-> block = (AllocBlock) malloc(blksize);
# 936| }
# 937|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:991:1: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:699:1: enter_function: entry to ‘AllocSetAlloc’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:714:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:790:16: call_function: inlined call to ‘AllocSetFreeIndex’ from ‘AllocSetAlloc’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:792:12: branch_false: following ‘false’ branch (when ‘chunk’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:830:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:933:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:935:46: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:938:20: branch_true: following ‘true’ branch (when ‘block’ is NULL)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:938:20: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:991:1: danger: ‘block’ leaks here; was allocated at [(11)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/10)
# 989|
# 990| return MemoryChunkGetPointer(chunk);
# 991|-> }
# 992|
# 993| /*
Error: CPPCHECK_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/aset.c:1159: error[memleakOnRealloc]: Common realloc mistake: 'block' nulled but not freed upon failure
# 1157| oldblksize = block->endptr - ((char *) block);
# 1158|
# 1159|-> block = (AllocBlock) realloc(block, blksize);
# 1160| if (block == NULL)
# 1161| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:852:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1821:1: enter_function: entry to ‘destroy_superblock’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1823:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1823:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1872:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1873:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1885:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1886:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1886:17: call_function: calling ‘dsa_free’ from ‘destroy_superblock’
# 850| span_pointer = segment_map->pagemap[pageno];
# 851| span = dsa_get_address(area, span_pointer);
# 852|-> superblock = dsa_get_address(area, span->start);
# 853| object = dsa_get_address(area, dp);
# 854| size_class = span->size_class;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1824:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1821:1: enter_function: entry to ‘destroy_superblock’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1823:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1823:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1824:46: danger: dereference of NULL ‘dsa_get_address(area, span_pointer)’
# 1822| {
# 1823| dsa_area_span *span = dsa_get_address(area, span_pointer);
# 1824|-> int size_class = span->size_class;
# 1825| dsa_segment_map *segment_map;
# 1826|
Error: GCC_ANALYZER_WARNING (CWE-1335):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:2013:33: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘4294967295’) >= precision of type (‘64’)
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1994:1: enter_function: entry to ‘get_best_segment’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1999:9: call_function: calling ‘check_for_freed_segments_locked’ from ‘get_best_segment’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:1999:9: return_function: returning to ‘get_best_segment’ from ‘check_for_freed_segments_locked’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:2005:20: call_function: inlined call to ‘contiguous_pages_to_segment_bin’ from ‘get_best_segment’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:2006:18: branch_true: following ‘true’ branch (when ‘bin != 16’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:2013:59: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/dsa.c:2013:33: danger: shift by count ‘4294967295’ here
# 2011| * have. We'll re-bin if we see segments with fewer.
# 2012| */
# 2013|-> size_t threshold = (size_t) 1 << (bin - 1);
# 2014| dsa_segment_index segment_index;
# 2015|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1441:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘result.index’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1476:1: enter_function: entry to ‘FreePageManagerPutInternal’
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1489:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1491:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1491:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1499:26: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1499:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1509:26: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1509:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1525:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1525:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: following ‘false’ branch (when ‘soft == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1529:34: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1529:34: call_function: calling ‘FreePageManagerGetInternal’ from ‘FreePageManagerPutInternal’
# 1439| Assert(result.found);
# 1440| if (victim->npages == npages)
# 1441|-> FreePageBtreeRemove(fpm, result.page, result.index);
# 1442| else
# 1443| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/mmgr/freepage.c:1538: error[legacyUninitvar]: Uninitialized variable: root
# 1536|
# 1537| /* Create the btree and move the preexisting range into it. */
# 1538|-> root->hdr.magic = FREE_PAGE_LEAF_MAGIC;
# 1539| root->hdr.nused = 1;
# 1540| relptr_store(base, root->hdr.parent, (FreePageBtree *) NULL);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:546:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘read_page’
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:584:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:586:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/utils/sort/sharedtuplestore.c:546:29: danger: use of uninitialized value ‘read_page’ here
# 544|
# 545| /* Seek and load the chunk header. */
# 546|-> if (BufFileSeekBlock(accessor->read_file, read_page) != 0)
# 547| ereport(ERROR,
# 548| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:363:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "wb")’
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:358:16: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:359:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:363:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:363:12: danger: ‘fopen(filename, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 361|
# 362| #ifndef WIN32
# 363|-> if (chmod(filename, mode))
# 364| pg_fatal("could not set permissions on file \"%s\": %m",
# 365| filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:363:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "wb")’
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:358:16: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:359:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:363:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_basebackup/bbstreamer_file.c:363:12: danger: ‘fopen(filename, "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 361|
# 362| #ifndef WIN32
# 363|-> if (chmod(filename, mode))
# 364| pg_fatal("could not set permissions on file \"%s\": %m",
# 365| filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2157:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(psprintf("\"%s\" -C data_directory %s%s", my_exec_path, <unknown>, <unknown>), "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2193:1: enter_function: entry to ‘main’
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2232:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2237:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2248:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2259:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2272:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2272:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2274:24: branch_false: following ‘false’ branch (when ‘c == -1’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2366:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2368:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2375:40: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2375:28: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2377:33: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2422:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2430:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_ctl/pg_ctl.c:2439:9: call_function: calling ‘adjust_data_dir’ from ‘main’
# 2155|
# 2156| fd = popen(cmd, "r");
# 2157|-> if (fd == NULL || fgets(filename, sizeof(filename), fd) == NULL || pclose(fd) != 0)
# 2158| {
# 2159| write_stderr(_("%s: could not determine the data directory using command \"%s\"\n"), progname, cmd);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/parallel.c:504: warning[nullPointer]: Possible null pointer dereference: slot
# 502| /* On all platforms, update workerStatus and te[] as well */
# 503| Assert(j < pstate->numWorkers);
# 504|-> slot->workerStatus = WRKR_TERMINATED;
# 505| pstate->te[j] = NULL;
# 506| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_backup_archiver.c:2183: warning[nullPointer]: Possible null pointer dereference: fh
# 2181| }
# 2182|
# 2183|-> if ((cnt = fread(sig, 1, 5, fh)) != 5)
# 2184| {
# 2185| if (ferror(fh))
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:1399: error[legacyUninitvar]: Uninitialized variable: archiveFormat
# 1397| else
# 1398| pg_fatal("invalid output format \"%s\" specified", format);
# 1399|-> return archiveFormat;
# 1400| }
# 1401|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12103:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘probin’
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:11984:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:11987:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:11992:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12062:43: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12067:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12077:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12099:12: branch_false: following ‘false’ branch (when ‘prosqlbody’ is NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12103:18: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:12103:18: danger: dereference of NULL ‘probin’
#12101| appendPQExpBufferStr(asPart, prosqlbody);
#12102| }
#12103|-> else if (probin[0] != '\0')
#12104| {
#12105| appendPQExpBufferStr(asPart, "AS ");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13575:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collcollate’
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13499:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13502:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13559:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13564:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13564:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13573:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13573:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13575:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13575:21: danger: dereference of NULL ‘collcollate’
#13573| if (fout->remoteVersion < 150000)
#13574| {
#13575|-> if (collcollate[0] == '\0')
#13576| collcollate = NULL;
#13577| if (collctype[0] == '\0')
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13577:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collctype’
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13499:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13502:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13559:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13560:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13564:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13573:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13573:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13575:21: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13575:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13575:20: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_dump/pg_dump.c:13577:21: danger: dereference of NULL ‘collctype’
#13575| if (collcollate[0] == '\0')
#13576| collcollate = NULL;
#13577|-> if (collctype[0] == '\0')
#13578| collctype = NULL;
#13579| }
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:524:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:524:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:524:22: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 522| if (!fgets(rawline, sizeof(rawline), ver_fd))
# 523| {
# 524|-> if (!ferror(ver_fd))
# 525| pg_fatal("unexpected empty file \"%s\"", ver_file);
# 526| else
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:524:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:524:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:524:22: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 522| if (!fgets(rawline, sizeof(rawline), ver_fd))
# 523| {
# 524|-> if (!ferror(ver_fd))
# 525| pg_fatal("unexpected empty file \"%s\"", ver_file);
# 526| else
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:533:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:531:16: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:533:12: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 531| (void) pg_strip_crlf(rawline);
# 532|
# 533|-> if (strcmp(rawline, PG_MAJORVERSION) != 0)
# 534| {
# 535| pg_log_error("data directory is of wrong version");
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:533:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:531:16: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_resetwal/pg_resetwal.c:533:12: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 531| (void) pg_strip_crlf(rawline);
# 532|
# 533|-> if (strcmp(rawline, PG_MAJORVERSION) != 0)
# 534| {
# 535| pg_log_error("data directory is of wrong version");
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: danger: infinite loop here
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:314:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:312:57: branch_false: ...to here
# 310| {
# 311| START_TIMER;
# 312|-> for (ops = 0; alarm_triggered == false; ops++)
# 313| {
# 314| for (writes = 0; writes < writes_per_op; writes++)
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: danger: infinite loop here
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:417:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:415:57: branch_false: ...to here
# 413| {
# 414| START_TIMER;
# 415|-> for (ops = 0; alarm_triggered == false; ops++)
# 416| {
# 417| for (writes = 0; writes < writes_per_op; writes++)
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: danger: infinite loop here
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:482:42: branch_false: if it ever follows ‘false’ branch, it will always do so...
postgresql-18.3/postgresql-16.11/src/bin/pg_test_fsync/pg_test_fsync.c:480:57: branch_false: ...to here
# 478| {
# 479| START_TIMER;
# 480|-> for (ops = 0; alarm_triggered == false; ops++)
# 481| {
# 482| for (writes = 0; writes < 16 / writes_size; writes++)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:36: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:133:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:135:34: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:135:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:137:37: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:36: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
# 137| p = strchr(p, ':');
# 138|
# 139|-> if (p == NULL || strlen(p) <= 1)
# 140| pg_fatal("%d: database cluster state problem", __LINE__);
# 141|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:37: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:133:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:135:34: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:135:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:137:37: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:36: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:50: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:37: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
# 137| p = strchr(p, ':');
# 138|
# 139|-> if (p == NULL || strlen(p) <= 1)
# 140| pg_fatal("%d: database cluster state problem", __LINE__);
# 141|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:153:40: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:128:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:133:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:135:34: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:135:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:137:37: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:139:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:153:40: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:155:37: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:153:40: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
# 151| */
# 152| /* remove leading spaces */
# 153|-> while (*p == ' ')
# 154| p++;
# 155| if (strcmp(p, "shut down in recovery\n") == 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:203:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:121:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:121:13: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:121:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:188:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:192:9: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:192:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:198:23: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:198:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:203:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:203:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:203:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:210:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:213:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:216:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:218:29: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/controldata.c:203:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(25)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/24)
# 201|
# 202| /* Only in <= 9.2 */
# 203|-> if (GET_MAJOR_VERSION(cluster->major_version) <= 902)
# 204| {
# 205| cluster->controldata.data_checksum_version = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:45:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:385:1: enter_function: entry to ‘check_bin_dir’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:397:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:397:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:398:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:398:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:399:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:399:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/exec.c:406:9: call_function: calling ‘get_bin_version’ from ‘check_bin_dir’
# 43| fflush(NULL);
# 44|
# 45|-> if ((output = popen(cmd, "r")) == NULL ||
# 46| fgets(cmd_output, sizeof(cmd_output), output) == NULL)
# 47| pg_fatal("could not get pg_ctl version data using %s: %s",
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:211:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:40:1: enter_function: entry to ‘gen_db_file_maps’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:60:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:63:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:69:20: branch_true: following ‘true’ branch (when ‘new_rel’ is NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:75:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/info.c:75:25: call_function: calling ‘report_unmatched_relation’ from ‘gen_db_file_maps’
# 209| report_unmatched_relation(const RelInfo *rel, const DbInfo *db, bool is_new_db)
# 210| {
# 211|-> Oid reloid = rel->reloid; /* we might change rel below */
# 212| char reldesc[1000];
# 213| int i;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:428:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:400:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:402:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:406:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:414:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:428:23: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:428:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:429:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:428:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 426| fflush(NULL);
# 427|
# 428|-> if ((output = popen(cmd, "r")) == NULL ||
# 429| fgets(cmd_output, sizeof(cmd_output), output) == NULL)
# 430| pg_fatal("could not get data directory using %s: %s",
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:483:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:459:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:467:32: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:475:27: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:475:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:475:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:480:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:483:29: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:483:28: danger: ‘fopen(&filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 481| lineno++)
# 482| {
# 483|-> if (fgets(line, sizeof(line), fp) == NULL)
# 484| pg_fatal("could not read line %d from file \"%s\": %s",
# 485| lineno, filename, strerror(errno));
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:483:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:459:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:467:32: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:475:27: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:475:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:475:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:480:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:483:29: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_upgrade/option.c:483:28: danger: ‘fopen(&filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 481| lineno++)
# 482| {
# 483|-> if (fgets(line, sizeof(line), fp) == NULL)
# 484| pg_fatal("could not read line %d from file \"%s\": %s",
# 485| lineno, filename, strerror(errno));
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c: scope_hint: In function ‘split_path’
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:166:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 166 | sep = strrchr(path, '/');
# | ^
# 164|
# 165| /* split filepath into directory & filename */
# 166|-> sep = strrchr(path, '/');
# 167|
# 168| /* directory path */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:166:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 164|
# 165| /* split filepath into directory & filename */
# 166|-> sep = strrchr(path, '/');
# 167|
# 168| /* directory path */
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:530:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "w")’
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:490:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:501:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:504:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:510:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:510:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:513:24: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:516:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:517:50: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:526:24: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:527:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:530:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:530:20: danger: ‘fopen(&filename, "w")’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
# 528| pg_fatal("could not open file \"%s\": %m", filename);
# 529|
# 530|-> if (fwrite(page, BLCKSZ, 1, file) != 1)
# 531| pg_fatal("could not write file \"%s\": %m", filename);
# 532|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:530:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "w")’
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:490:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:501:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:504:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:510:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:510:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:513:24: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:516:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:517:50: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:526:24: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:527:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:530:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pg_waldump/pg_waldump.c:530:20: danger: ‘fopen(&filename, "w")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
# 528| pg_fatal("could not open file \"%s\": %m", filename);
# 529|
# 530|-> if (fwrite(page, BLCKSZ, 1, file) != 1)
# 531| pg_fatal("could not write file \"%s\": %m", filename);
# 532|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1113:11: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1120:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1120:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1133:10: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: danger: ‘yyptr’ leaks here; was allocated at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)
# 1115| if (! yyptr)
# 1116| YYNOMEM;
# 1117|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: danger: use of uninitialized value ‘yyss’ here
# 1115| if (! yyptr)
# 1116| YYNOMEM;
# 1117|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1118:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvs’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1118:9: danger: use of uninitialized value ‘yyvs’ here
# 1116| YYNOMEM;
# 1117| YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118|-> YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
# 1120| if (yyss1 != yyssa)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1244:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.ival’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1194:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1196:10: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1196:10: branch_false: following ‘false’ branch (when ‘yyn != -1’)...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1198:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprparse.c:1244:3: danger: use of uninitialized value ‘*<unknown>.ival’ here
# 1242| unconditionally makes the parser a bit smaller, and it avoids a
# 1243| GCC warning that YYVAL may be used uninitialized. */
# 1244|-> yyval = yyvsp[1-yylen];
# 1245|
# 1246|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.c:2000:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:343:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 1998| * we need to put in 2 end-of-buffer characters.
# 1999| */
# 2000|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2001| if ( ! b->yy_ch_buf )
# 2002| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.c:2043:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:343:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 2041| yy_flush_buffer( b , yyscanner);
# 2042|
# 2043|-> b->yy_input_file = file;
# 2044| b->yy_fill_buffer = 1;
# 2045|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.c:2163:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:334:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:335:56: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:335:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2161| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2162|
# 2163|-> memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2164|
# 2165| yyg->yy_buffer_stack_max = num_to_alloc;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.c:2184:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:334:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:335:56: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/pgbench/exprscan.l:335:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2182|
# 2183| /* zero only the new slots.*/
# 2184|-> memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2185| yyg->yy_buffer_stack_max = num_to_alloc;
# 2186| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/pgbench.c:1617: warning[uninitvar]: Uninitialized variables: &key.svalue, &key.value
# 1615| /* Now we can search */
# 1616| key.name = name;
# 1617|-> return (Variable *) bsearch(&key,
# 1618| variables->vars,
# 1619| variables->nvars,
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/pgbench.c: scope_hint: In function ‘parseScriptWeight’
postgresql-18.3/postgresql-16.11/src/bin/pgbench/pgbench.c:6155:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6155 | if ((sep = strrchr(option, WSEP)))
# | ^
# 6153| int weight;
# 6154|
# 6155|-> if ((sep = strrchr(option, WSEP)))
# 6156| {
# 6157| int namelen = sep - option;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/bin/pgbench/pgbench.c:6155:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6153| int weight;
# 6154|
# 6155|-> if ((sep = strrchr(option, WSEP)))
# 6156| {
# 6157| int namelen = sep - option;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/bin/psql/crosstabview.c:362: error[uninitvar]: Uninitialized variables: &elt.sort_value, &elt.rank
# 360| else
# 361| elt.name = NULL;
# 362|-> rp = (pivot_field *) bsearch(&elt,
# 363| piv_rows,
# 364| num_rows,
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.c:2485:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:670:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:680:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:680:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:688:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2483| * we need to put in 2 end-of-buffer characters.
# 2484| */
# 2485|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2486| if ( ! b->yy_ch_buf )
# 2487| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.c:2528:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:670:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:680:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:680:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:688:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2526| yy_flush_buffer( b , yyscanner);
# 2527|
# 2528|-> b->yy_input_file = file;
# 2529| b->yy_fill_buffer = 1;
# 2530|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.c:2648:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:547:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:576:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:577:10: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:577:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2646| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2647|
# 2648|-> memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2649|
# 2650| yyg->yy_buffer_stack_max = num_to_alloc;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.c:2669:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:547:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:576:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:577:10: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:577:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2667|
# 2668| /* zero only the new slots.*/
# 2669|-> memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2670| yyg->yy_buffer_stack_max = num_to_alloc;
# 2671| }
Error: CPPCHECK_WARNING (CWE-562):
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:499: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 497| /* Set current output target */
# 498| state->output_buf = &mybuf;
# 499|->
# 500| /* Set input source */
# 501| if (state->buffer_stack != NULL)
Error: CPPCHECK_WARNING (CWE-562):
postgresql-18.3/postgresql-16.11/src/bin/psql/psqlscanslash.l:573: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 571| /* Set current output target */
# 572| state->output_buf = &mybuf;
# 573|->
# 574| /* Set input source */
# 575| if (state->buffer_stack != NULL)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:873:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cell’
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:499:26: release_memory: ‘dbtables.head’ is NULL
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:499:26: release_memory: ‘dbtables.head’ is NULL
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:783:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:794:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:795:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:808:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:843:9: release_memory: ‘cell’ is NULL
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:849:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:855:29: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:856:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:862:62: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/bin/scripts/vacuumdb.c:873:17: danger: dereference of NULL ‘cell’
# 871| echo, tabname);
# 872|
# 873|-> cell = cell->next;
# 874| } while (cell != NULL);
# 875|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/common/compression.c: scope_hint: In function ‘parse_compress_options’
postgresql-18.3/postgresql-16.11/src/common/compression.c:458:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 458 | sep = strchr(option, ':');
# | ^
# 456| * name.
# 457| */
# 458|-> sep = strchr(option, ':');
# 459| if (sep == NULL)
# 460| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/common/compression.c:458:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 456| * name.
# 457| */
# 458|-> sep = strchr(option, ':');
# 459| if (sep == NULL)
# 460| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/common/encnames.c:541: warning[uninitvar]: Uninitialized variable: newkey
# 539| }
# 540| *np = '\0';
# 541|-> return newkey;
# 542| }
# 543|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:521:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘iov’
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:541:1: enter_function: entry to ‘pg_pwrite_zeros’
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:550:16: branch_true: following ‘true’ branch (when ‘remaining_size != 0’)...
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:550:16: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:555:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:559:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:555:24: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:570:27: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/common/file_utils.c:570:27: call_function: calling ‘pg_pwritev_with_retry’ from ‘pg_pwrite_zeros’
# 519| */
# 520| Assert(iovcnt > 0);
# 521|-> memmove(iov_copy, iov, sizeof(*iov) * iovcnt);
# 522| Assert(iov->iov_len > part);
# 523| iov_copy[0].iov_base = (char *) iov_copy[0].iov_base + part;
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:180:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘termout’
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:96:19: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:180:16: danger: ‘termout’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 178| }
# 179|
# 180|-> return result;
# 181| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:180:16: warning[-Wanalyzer-malloc-leak]: leak of ‘termout’
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:96:19: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/common/sprompt.c:180:16: danger: ‘termout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 178| }
# 179|
# 180|-> return result;
# 181| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:909:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘width_header’
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3535:1: enter_function: entry to ‘printQuery’
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3543:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3547:55: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3553:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3553:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3587:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3595:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3595:9: call_function: calling ‘printTable’ from ‘printQuery’
# 907| * display across multiple lines. We check for both cases below.
# 908| */
# 909|-> if (width > 0 && width_wrap[i])
# 910| {
# 911| unsigned int extra_lines;
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:1040:17: warning[-Wanalyzer-null-argument]: use of NULL ‘bytes_output’ where non-null expected
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3535:1: enter_function: entry to ‘printQuery’
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3543:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3547:55: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3553:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3553:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3587:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3595:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3595:9: call_function: calling ‘printTable’ from ‘printQuery’
# 1038| }
# 1039|
# 1040|-> memset(bytes_output, 0, col_count * sizeof(int));
# 1041|
# 1042| /*
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3418:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fout’
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3535:1: enter_function: entry to ‘printQuery’
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3543:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3547:55: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3553:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3553:21: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3587:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3595:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/print.c:3595:9: call_function: calling ‘printTable’ from ‘printQuery’
# 3416| else
# 3417| *is_pager = false;
# 3418|-> }
# 3419|
# 3420| /*
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.c:4585:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1127:8: enter_function: entry to ‘psql_scan’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1142:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1142:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1147:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 4583| * we need to put in 2 end-of-buffer characters.
# 4584| */
# 4585|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 4586| if ( ! b->yy_ch_buf )
# 4587| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.c:4628:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1127:8: enter_function: entry to ‘psql_scan’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1142:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1142:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-18.3/postgresql-16.11/src/fe_utils/psqlscan.l:1147:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 4626| yy_flush_buffer( b , yyscanner);
# 4627|
# 4628|-> b->yy_input_file = file;
# 4629| b->yy_fill_buffer = 1;
# 4630|
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:123:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, <unknown>)’
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:119:14: acquire_resource: opened here
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:120:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:123:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:123:13: danger: ‘fopen(&filename, <unknown>)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 121| pg_fatal("could not open file \"%s\": %m", filename);
# 122|
# 123|-> if (fwrite(contents->data, contents->len, 1, cf) != 1)
# 124| pg_fatal("could not write to file \"%s\": %m", filename);
# 125|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:123:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, <unknown>)’
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:119:14: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:120:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:123:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/fe_utils/recovery_gen.c:123:13: danger: ‘fopen(&filename, <unknown>)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 121| pg_fatal("could not open file \"%s\": %m", filename);
# 122|
# 123|-> if (fwrite(contents->data, contents->len, 1, cf) != 1)
# 124| pg_fatal("could not write to file \"%s\": %m", filename);
# 125|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/access/tableam.h:1058:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam_handler.c:691:1: enter_function: entry to ‘heapam_relation_copy_for_cluster’
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam_handler.c:735:12: branch_false: following ‘false’ branch (when ‘use_sort == 0’)...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam_handler.c:747:13: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam_handler.c:747:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam_handler.c:749:33: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/heap/heapam_handler.c:808:30: call_function: calling ‘table_scan_getnextslot’ from ‘heapam_relation_copy_for_cluster’
# 1056| table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1057| {
# 1058|-> slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1059|
# 1060| /* We don't expect actual scans using NoMovementScanDirection */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/access/tupmacs.h:28:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:553:1: enter_function: entry to ‘brin_deform_tuple’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:565:16: branch_true: following ‘true’ branch (when ‘dMemtuple’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:565:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:565:28: call_function: calling ‘brin_memtuple_initialize’ from ‘brin_deform_tuple’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:565:28: return_function: returning to ‘brin_deform_tuple’ from ‘brin_memtuple_initialize’
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:568:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:572:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:583:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:587:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/brin/brin_tuple.c:587:9: call_function: calling ‘brin_deconstruct_tuple’ from ‘brin_deform_tuple’
# 26| att_isnull(int ATT, const bits8 *BITS)
# 27| {
# 28|-> return !(BITS[ATT >> 3] & (1 << (ATT & 0x07)));
# 29| }
# 30|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elemops’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:3869:1: enter_function: entry to ‘make_partition_op_expr’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:3877:19: call_function: calling ‘get_partition_operator’ from ‘make_partition_op_expr’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:3877:19: return_function: returning to ‘make_partition_op_expr’ from ‘get_partition_operator’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:3952:50: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:3952:100: call_function: inlined call to ‘list_nth_cell’ from ‘make_partition_op_expr’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘expanded_groups’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_agg.c:1826:1: enter_function: entry to ‘expand_grouping_sets’
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_agg.c:1833:12: branch_false: following ‘false’ branch (when ‘groupingSets’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_agg.c:1833:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_agg.c:1836:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/parser/parse_agg.c:1859:9: call_function: inlined call to ‘list_nth_cell’ from ‘expand_grouping_sets’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘or_expr_args’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4276:1: enter_function: entry to ‘get_qual_for_range’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4301:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4304:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4309:29: branch_true: following ‘true’ branch (when ‘k < nparts’)...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4311:67: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4317:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4320:33: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4324:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4327:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4327:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4331:45: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4331:45: call_function: calling ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4331:45: return_function: returning to ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4337:70: call_function: inlined call to ‘list_length’ from ‘get_qual_for_range’
postgresql-18.3/postgresql-16.11/src/backend/partitioning/partbounds.c:4339:78: call_function: inlined call to ‘list_nth_cell’ from ‘get_qual_for_range’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/storage/block.h:105:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:648:1: enter_function: entry to ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:657:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:659:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:665:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:690:57: call_function: inlined call to ‘BTreeTupleGetNPosting’ from ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:696:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:709:42: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:709:42: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:709:42: return_function: returning to ‘_bt_bottomupdel_finish_pending’ from ‘BTreeTupleGetHeapTID’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtdedup.c:712:48: call_function: inlined call to ‘ItemPointerGetBlockNumber’ from ‘_bt_bottomupdel_finish_pending’
# 103| BlockIdGetBlockNumber(const BlockIdData *blockId)
# 104| {
# 105|-> return (((BlockNumber) blockId->bi_hi) << 16) | ((BlockNumber) blockId->bi_lo);
# 106| }
# 107|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/storage/bufpage.h:340:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/gin/ginbtree.c:818:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 338| {
# 339| PageValidateSpecialPointer(page);
# 340|-> return (char *) page + ((PageHeader) page)->pd_special;
# 341| }
# 342|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/include/storage/itemptr.h:116:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2651:1: enter_function: entry to ‘_bt_check_third_page’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2660:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2668:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2676:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2680:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2680:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2680:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2680:9: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_check_third_page’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2680:9: return_function: returning to ‘_bt_check_third_page’ from ‘BTreeTupleGetHeapTID’
postgresql-18.3/postgresql-16.11/src/backend/access/nbtree/nbtutils.c:2680:9: call_function: inlined call to ‘ItemPointerGetOffsetNumber’ from ‘_bt_check_third_page’
# 114| ItemPointerGetOffsetNumberNoCheck(const ItemPointerData *pointer)
# 115| {
# 116|-> return pointer->ip_posid;
# 117| }
# 118|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:184:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:176:1: enter_function: entry to ‘ECPGsetcommit’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:178:34: call_function: calling ‘ecpg_get_connection’ from ‘ECPGsetcommit’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:178:34: return_function: returning to ‘ECPGsetcommit’ from ‘ecpg_get_connection’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:181:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:184:9: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/connect.c:184:9: danger: dereference of NULL ‘ecpg_get_connection(connection_name)’
# 182| return false;
# 183|
# 184|-> ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
# 185|
# 186| if (con->autocommit && strncmp(mode, "off", strlen("off")) == 0)
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/execute.c:1132:83: warning[-Wanalyzer-null-argument]: use of NULL ‘tobeinserted’ where non-null expected
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/execute.c:2294:1: enter_function: entry to ‘ECPGdo_descriptor’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/execute.c:2297:16: call_function: calling ‘ECPGdo’ from ‘ECPGdo_descriptor’
# 1130|
# 1131| if (!(newcopy = (char *) ecpg_alloc(strlen(stmt->command)
# 1132|-> + strlen(tobeinserted)
# 1133| + 1, stmt->lineno)))
# 1134| {
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:21:36: warning[-Wanalyzer-malloc-leak]: leak of ‘ecpg_alloc(16, lineno)’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:124:1: enter_function: entry to ‘ecpg_add_mem’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:126:51: call_function: calling ‘ecpg_alloc’ from ‘ecpg_add_mem’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:126:51: return_function: returning to ‘ecpg_add_mem’ from ‘ecpg_alloc’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:128:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:131:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/memory.c:21:36: danger: ‘ecpg_alloc(16, lineno)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 19| ecpg_alloc(long size, int lineno)
# 20| {
# 21|-> char *new = (char *) calloc(1L, size);
# 22|
# 23| if (!new)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/misc.c:148:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ECPGget_sqlca()’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/misc.c:275:1: enter_function: entry to ‘ecpg_log’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/misc.c:278:33: call_function: calling ‘ECPGget_sqlca’ from ‘ecpg_log’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/misc.c:278:33: return_function: returning to ‘ecpg_log’ from ‘ECPGget_sqlca’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/ecpglib/misc.c:148:17: danger: ‘ECPGget_sqlca()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
# 146| pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
# 147|
# 148|-> sqlca = pthread_getspecific(sqlca_key);
# 149| if (sqlca == NULL)
# 150| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c: scope_hint: In function ‘PGTYPESdate_defmt_asc’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c:357:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 357 | fmt_ystart = strstr(fmt, "yy");
# | ^
# 355|
# 356| /* analyze the fmt string */
# 357|-> fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c:357:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 355|
# 356| /* analyze the fmt string */
# 357|-> fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c:358:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 358 | fmt_mstart = strstr(fmt, "mm");
# | ^
# 356| /* analyze the fmt string */
# 357| fmt_ystart = strstr(fmt, "yy");
# 358|-> fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
# 360|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c:358:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 356| /* analyze the fmt string */
# 357| fmt_ystart = strstr(fmt, "yy");
# 358|-> fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
# 360|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c:359:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 359 | fmt_dstart = strstr(fmt, "dd");
# | ^
# 357| fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359|-> fmt_dstart = strstr(fmt, "dd");
# 360|
# 361| if (!fmt_ystart || !fmt_mstart || !fmt_dstart)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/datetime.c:359:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 357| fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359|-> fmt_dstart = strstr(fmt, "dd");
# 360|
# 361| if (!fmt_ystart || !fmt_mstart || !fmt_dstart)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/timestamp.c:759:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘replace_val’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/timestamp.c:782:1: enter_function: entry to ‘PGTYPEStimestamp_fmt_asc’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/pgtypeslib/timestamp.c:793:16: call_function: calling ‘dttofmtasc_replace’ from ‘PGTYPEStimestamp_fmt_asc’
# 757| break;
# 758| }
# 759|-> i = pgtypes_fmt_replace(replace_val, replace_type, &q, pstr_len);
# 760| if (i)
# 761| return i;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4603:54: warning[-Wanalyzer-malloc-leak]: leak of ‘base_yy_create_buffer(base_yyin, 16384)’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1653:1: enter_function: entry to ‘parse_include’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1740:19: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1743:26: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_create_buffer’ from ‘parse_include’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1744:9: return_function: returning to ‘parse_include’ from ‘base_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_switch_to_buffer’ from ‘parse_include’
# 4601| * we need to put in 2 end-of-buffer characters.
# 4602| */
# 4603|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 4604| if ( ! b->yy_ch_buf )
# 4605| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4603:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4590:21: enter_function: entry to ‘base_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4594:31: call_function: inlined call to ‘base_yyalloc’ from ‘base_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4595:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4598:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4603:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 4601| * we need to put in 2 end-of-buffer characters.
# 4602| */
# 4603|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 4604| if ( ! b->yy_ch_buf )
# 4605| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4611:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1653:1: enter_function: entry to ‘parse_include’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1740:19: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1743:26: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_create_buffer’ from ‘parse_include’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1744:9: return_function: returning to ‘parse_include’ from ‘base_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_switch_to_buffer’ from ‘parse_include’
# 4609| yy_init_buffer( b, file );
# 4610|
# 4611|-> return b;
# 4612| }
# 4613|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4644: warning[nullPointer]: Possible null pointer dereference: b
# 4642| yy_flush_buffer( b );
# 4643|
# 4644|-> b->yy_input_file = file;
# 4645| b->yy_fill_buffer = 1;
# 4646|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4645: warning[nullPointer]: Possible null pointer dereference: b
# 4643|
# 4644| b->yy_input_file = file;
# 4645|-> b->yy_fill_buffer = 1;
# 4646|
# 4647| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4832:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1771:1: enter_function: entry to ‘isdefine’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1776:29: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1779:43: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1788:39: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1788:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1802:25: call_function: calling ‘base_yy_scan_string’ from ‘isdefine’
# 4830| {
# 4831|
# 4832|-> return yy_scan_bytes( yystr, (int) strlen(yystr) );
# 4833| }
# 4834|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4858:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4842:17: enter_function: entry to ‘base_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4851:24: call_function: inlined call to ‘base_yyalloc’ from ‘base_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4852:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4852:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.c:4860:13: call_function: calling ‘base_yy_scan_buffer’ from ‘base_yy_scan_bytes’
# 4856| buf[i] = yybytes[i];
# 4857|
# 4858|-> buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 4859|
# 4860| b = yy_scan_buffer( buf, n );
Error: CPPCHECK_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1607: error[memleakOnRealloc]: Common realloc mistake: 'literalbuf' nulled but not freed upon failure
# 1605| while ((literallen+yleng) >= literalalloc);
# 1606| literalbuf = (char *) realloc(literalbuf, literalalloc);
# 1607|-> }
# 1608| /* append new data, add trailing null */
# 1609| memcpy(literalbuf+literallen, ytext, yleng);
Error: CPPCHECK_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1622: error[memleakOnRealloc]: Common realloc mistake: 'literalbuf' nulled but not freed upon failure
# 1620| literalalloc *= 2;
# 1621| literalbuf = (char *) realloc(literalbuf, literalalloc);
# 1622|-> }
# 1623| /* append new data, add trailing null */
# 1624| literalbuf[literallen] = ychar;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1802:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<return-value>’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1771:1: enter_function: entry to ‘isdefine’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1776:29: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1779:43: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1788:39: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1788:39: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1802:25: call_function: calling ‘base_yy_scan_string’ from ‘isdefine’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1802:25: danger: ‘<return-value>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/22)
# 1800| */
# 1801| yy_scan_string(ptr->value);
# 1802|-> return true;
# 1803| }
# 1804| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1838:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<return-value>’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1815:1: enter_function: entry to ‘isinformixdefine’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1832:31: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1832:31: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1838:17: call_function: calling ‘base_yy_scan_string’ from ‘isinformixdefine’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/pgc.l:1838:17: danger: ‘<return-value>’ leaks here; was allocated at [(21)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/20)
# 1836|
# 1837| yy_scan_string(new);
# 1838|-> return true;
# 1839| }
# 1840|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37585:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37540:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37546:34: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37572:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37574:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37583:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37583:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37585:9: danger: use of uninitialized value ‘yyss’ here
#37583| if (! yyptr)
#37584| YYNOMEM;
#37585|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
#37586| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#37587| YYSTACK_RELOCATE (yyls_alloc, yyls);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37716:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37540:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37609:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37609:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37612:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37624:6: branch_true: following ‘true’ branch (when ‘yyn == -6177’)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37625:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37696:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37698:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/preproc.c:37716:3: danger: use of uninitialized value ‘*<unknown>’ here
#37714| unconditionally makes the parser a bit smaller, and it avoids a
#37715| GCC warning that YYVAL may be used uninitialized. */
#37716|-> yyval = yyvsp[1-yylen];
#37717|
#37718| /* Default location. */
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:590:50: warning[-Wanalyzer-null-argument]: use of NULL ‘ind_name’ where non-null expected
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:581:1: enter_function: entry to ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:589:37: call_function: calling ‘mm_alloc’ from ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:589:37: return_function: returning to ‘ECPGdump_a_struct’ from ‘mm_alloc’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:590:41: call_function: calling ‘mm_alloc’ from ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:590:41: return_function: returning to ‘ECPGdump_a_struct’ from ‘mm_alloc’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:599:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:601:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:601:17: branch_true: following ‘true’ branch (when ‘ind_type’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:603:21: call_function: inlined call to ‘atoi’ from ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:603:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:604:25: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:612:35: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:614:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:614:17: branch_true: following ‘true’ branch (when ‘ind_p’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:614:17: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/ecpg/preproc/type.c:614:17: call_function: calling ‘ECPGdump_a_type’ from ‘ECPGdump_a_struct’
# 588| *ind_p = NULL;
# 589| char *pbuf = (char *) mm_alloc(strlen(name) + ((prefix == NULL) ? 0 : strlen(prefix)) + 3);
# 590|-> char *ind_pbuf = (char *) mm_alloc(strlen(ind_name) + ((ind_prefix == NULL) ? 0 : strlen(ind_prefix)) + 3);
# 591|
# 592| if (atoi(arrsize) == 1)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6985:18: warning[-Wanalyzer-malloc-leak]: leak of ‘value_copy’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6963:1: enter_function: entry to ‘conninfo_storeval’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6985:18: call_function: calling ‘conninfo_find’ from ‘conninfo_storeval’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6985:18: return_function: returning to ‘conninfo_storeval’ from ‘conninfo_find’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6986:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6995:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6995:12: branch_false: following ‘false’ branch (when ‘uri_decode == 0’)...
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:7004:30: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:7004:30: acquire_memory: allocated here
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:7005:20: branch_false: following ‘false’ branch (when ‘value_copy’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:7012:14: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-connect.c:6985:18: danger: ‘value_copy’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 6983| }
# 6984|
# 6985|-> option = conninfo_find(connOptions, keyword);
# 6986| if (option == NULL)
# 6987| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-exec.c:739:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-exec.c:2310:1: enter_function: entry to ‘PQexecStart’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-exec.c:2335:26: call_function: calling ‘PQgetResult’ from ‘PQexecStart’
# 737| {
# 738| /* only send DESTROY to successfully-initialized event procs */
# 739|-> if (res->events[i].resultInitialized)
# 740| {
# 741| PGEventResultDestroy evt;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure-openssl.c: scope_hint: In function ‘pgtls_verify_peer_name_matches_certificate_guts’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure-openssl.c:694:30: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 694 | subject_name = X509_get_subject_name(conn->peer);
# | ^
# 692| X509_NAME *subject_name;
# 693|
# 694|-> subject_name = X509_get_subject_name(conn->peer);
# 695| if (subject_name != NULL)
# 696| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure-openssl.c:694:30: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 692| X509_NAME *subject_name;
# 693|
# 694|-> subject_name = X509_get_subject_name(conn->peer);
# 695| if (subject_name != NULL)
# 696| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure-openssl.c:707:140: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘openssl_verify_peer_name_matches_certificate_name’ discards ‘const’ qualifier from pointer target type
# 707 | X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure-openssl.c:501:78: note: expected ‘ASN1_STRING *’ {aka ‘struct asn1_string_st *’} but argument is of type ‘const ASN1_STRING *’ {aka ‘const struct asn1_string_st *’}
# 501 | openssl_verify_peer_name_matches_certificate_name(PGconn *conn, ASN1_STRING *name_entry,
# | ~~~~~~~~~~~~~^~~~~~~~~~
# 705| (*names_examined)++;
# 706| rc = openssl_verify_peer_name_matches_certificate_name(conn,
# 707|-> X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# 708| &common_name);
# 709|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure-openssl.c:707:140: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘openssl_verify_peer_name_matches_certificate_name’ discards ‘const’ qualifier from pointer target type
# 705| (*names_examined)++;
# 706| rc = openssl_verify_peer_name_matches_certificate_name(conn,
# 707|-> X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# 708| &common_name);
# 709|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure.c:453:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘spinfo.sigpipe_pending’
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure.c:453:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/interfaces/libpq/fe-secure.c:453:9: danger: use of uninitialized value ‘spinfo.sigpipe_pending’ here
# 451| }
# 452|
# 453|-> RESTORE_SIGPIPE(conn, spinfo);
# 454|
# 455| /* ensure we return the intended errno to caller */
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1298:45: warning[-Wanalyzer-null-argument]: use of NULL ‘colname’ where non-null expected
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1175:1: enter_function: entry to ‘resolve_column_ref’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1206:17: call_function: inlined call to ‘list_length’ from ‘resolve_column_ref’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1272:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1275:17: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1282:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1284:28: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1284:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1287:68: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1292:40: branch_true: following ‘true’ branch (when ‘i >= 0’)...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1294:100: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_comp.c:1298:45: danger: argument 2 (‘colname’) NULL where non-null expected
# 1296| Assert(fld->dtype == PLPGSQL_DTYPE_RECFIELD &&
# 1297| fld->recparentno == nse->itemno);
# 1298|-> if (strcmp(fld->fieldname, colname) == 0)
# 1299| {
# 1300| return make_datum_param(expr, i, cref->location);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:5129:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7429:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7434:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7545:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7547:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7547:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 5127| {
# 5128| if (var->datatype->typisarray &&
# 5129|-> !VARATT_IS_EXTERNAL_EXPANDED_RW(DatumGetPointer(newvalue)))
# 5130| {
# 5131| /* array and not already R/W, so apply expand_array */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:8576:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7429:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7434:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7545:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7547:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_exec.c:7547:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 8574| */
# 8575| if (!estate->atomic && !isnull && var->datatype->typlen == -1 &&
# 8576|-> VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
# 8577| {
# 8578| MemoryContext oldcxt;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1865:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1820:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1826:34: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1852:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1854:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1863:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1863:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1865:9: danger: use of uninitialized value ‘yyss’ here
# 1863| if (! yyptr)
# 1864| YYNOMEM;
# 1865|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1866| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1867| YYSTACK_RELOCATE (yyls_alloc, yyls);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1996:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1820:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1889:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1889:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1892:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1904:6: branch_true: following ‘true’ branch (when ‘yyn == -249’)...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1905:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1976:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1978:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/pl/plpgsql/src/pl_gram.c:1996:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1994| unconditionally makes the parser a bit smaller, and it avoids a
# 1995| GCC warning that YYVAL may be used uninitialized. */
# 1996|-> yyval = yyvsp[1-yylen];
# 1997|
# 1998| /* Default location. */
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-16.11/src/port/pg_crc32c_sse42.c:38:32: note[note]: called from here
# 36| while (p + 8 <= pend)
# 37| {
# 38|-> crc = (uint32) _mm_crc32_u64(crc, *((const uint64 *) p));
# 39| p += 8;
# 40| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-16.11/src/port/pg_crc32c_sse42.c:45:23: note[note]: called from here
# 43| if (p + 4 <= pend)
# 44| {
# 45|-> crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
# 46| p += 4;
# 47| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-16.11/src/port/pg_crc32c_sse42.c:64:23: note[note]: called from here
# 62| while (p < pend)
# 63| {
# 64|-> crc = _mm_crc32_u8(crc, *p);
# 65| p++;
# 66| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1403:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘str’
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1282:1: enter_function: entry to ‘pg_strfromd’
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1312:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1321:20: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1329:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1331:25: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/port/snprintf.c:1364:9: call_function: calling ‘dostr’ from ‘pg_strfromd’
# 1401| }
# 1402| avail = Min(avail, slen);
# 1403|-> memmove(target->bufptr, str, avail);
# 1404| target->bufptr += avail;
# 1405| str += avail;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1002:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:960:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:966:28: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:989:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:991:7: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1000:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1002:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1002:9: danger: use of uninitialized value ‘yyss’ here
# 1000| if (! yyptr)
# 1001| YYNOMEM;
# 1002|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1003| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1004| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1129:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:960:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1024:6: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1024:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1027:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1039:6: branch_true: following ‘true’ branch (when ‘yyn == -14’)...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1040:5: branch_true: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1109:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1111:3: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specparse.c:1129:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1127| unconditionally makes the parser a bit smaller, and it avoids a
# 1128| GCC warning that YYVAL may be used uninitialized. */
# 1129|-> yyval = yyvsp[1-yylen];
# 1130|
# 1131|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1728:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1715:21: enter_function: entry to ‘spec_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1719:31: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_create_buffer’
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1720:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1723:9: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1728:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1726| * we need to put in 2 end-of-buffer characters.
# 1727| */
# 1728|-> b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1729| if ( ! b->yy_ch_buf )
# 1730| YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1769: warning[nullPointer]: Possible null pointer dereference: b
# 1767| yy_flush_buffer( b );
# 1768|
# 1769|-> b->yy_input_file = file;
# 1770| b->yy_fill_buffer = 1;
# 1771|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1770: warning[nullPointer]: Possible null pointer dereference: b
# 1768|
# 1769| b->yy_input_file = file;
# 1770|-> b->yy_fill_buffer = 1;
# 1771|
# 1772| /* If b is the current buffer, then yy_init_buffer was _probably_
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1983:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1967:17: enter_function: entry to ‘spec_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1976:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_scan_bytes’
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1977:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1977:12: branch_false: ...to here
postgresql-18.3/postgresql-16.11/src/test/isolation/specscanner.c:1985:13: call_function: calling ‘spec_yy_scan_buffer’ from ‘spec_yy_scan_bytes’
# 1981| buf[i] = yybytes[i];
# 1982|
# 1983|-> buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1984|
# 1985| b = yy_scan_buffer( buf, n );
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/test/regress/pg_regress.c: scope_hint: In function ‘get_expectfile’
postgresql-18.3/postgresql-16.11/src/test/regress/pg_regress.c:682:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 682 | if (!file || !(file_type = strrchr(file, '.')))
# | ^
# 680| * following the last dot in the file name.
# 681| */
# 682|-> if (!file || !(file_type = strrchr(file, '.')))
# 683| return NULL;
# 684|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-16.11/src/test/regress/pg_regress.c:682:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 680| * following the last dot in the file name.
# 681| */
# 682|-> if (!file || !(file_type = strrchr(file, '.')))
# 683| return NULL;
# 684|
Error: CPPCHECK_WARNING (CWE-190):
postgresql-18.3/postgresql-16.11/src/test/regress/regress.c:769: error[integerOverflow]: Signed integer overflow for expression '-0x7FFF-1'.
# 767| expected = PG_INT16_MAX + 1;
# 768| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 769|-> expected = PG_INT16_MIN;
# 770| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 771| expected = PG_INT16_MIN - 1;
Error: CPPCHECK_WARNING (CWE-190):
postgresql-18.3/postgresql-16.11/src/test/regress/regress.c:771: error[integerOverflow]: Signed integer overflow for expression '(-0x7FFF-1)-1'.
# 769| expected = PG_INT16_MIN;
# 770| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 771|-> expected = PG_INT16_MIN - 1;
# 772| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 773|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:153: warning[uninitvar]: Uninitialized variable: notFullPage
# 151|
# 152| metaData = BloomPageGetMeta(page);
# 153|-> memcpy(metaData->notFullPage, notFullPage, sizeof(BlockNumber) * countPage);
# 154| metaData->nStart = 0;
# 155| metaData->nEnd = countPage;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:153:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘¬FullPage’
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:58:40: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:64:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:123:20: branch_false: following ‘false’ branch (when ‘itup == itupPtr’)...
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:136:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/bloom/blvacuum.c:153:9: danger: use of uninitialized value ‘¬FullPage’ here
# 151|
# 152| metaData = BloomPageGetMeta(page);
# 153|-> memcpy(metaData->notFullPage, notFullPage, sizeof(BlockNumber) * countPage);
# 154| metaData->nStart = 0;
# 155| metaData->nEnd = countPage;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/btree_gist/btree_utils_num.c:90:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘leaf’
postgresql-18.3/postgresql-17.9/contrib/btree_gist/btree_utils_num.c:18:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/btree_gist/btree_utils_num.c:34:56: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/btree_gist/btree_utils_num.c:90:17: danger: use of uninitialized value ‘leaf’ here
# 88| Assert(tinfo->indexsize >= 2 * tinfo->size);
# 89|
# 90|-> memcpy(&r[0], leaf, tinfo->size);
# 91| memcpy(&r[tinfo->size], leaf, tinfo->size);
# 92| retval = palloc(sizeof(GISTENTRY));
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:971:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:935:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:958:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:960:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:969:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:971:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:971:9: danger: use of uninitialized value ‘yyss’ here
# 969| if (! yyptr)
# 970| YYNOMEM;
# 971|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 972| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 973| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:50:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -4’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:50:23: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 48| int dim;
# 49|
# 50|-> dim = item_count($2, ',');
# 51| if (item_count($4, ',') != dim)
# 52| {
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:51:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951]’
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:863:1: enter_function: entry to ‘cube_yyparse’
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -4’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:50:23: call_function: inlined call to ‘item_count’ from ‘cube_yyparse’
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:51:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:51:21: danger: use of uninitialized value ‘yyvsp[2305843009213693951]’ here
# 49|
# 50| dim = item_count($2, ',');
# 51|-> if (item_count($4, ',') != dim)
# 52| {
# 53| errsave(escontext,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:78:23: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -4’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 10’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -4’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubeparse.y:78:23: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 76| int dim;
# 77|
# 78|-> dim = item_count($1, ',');
# 79| if (item_count($3, ',') != dim)
# 80| {
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1582:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1569:21: enter_function: entry to ‘cube_yy_create_buffer’
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1573:24: call_function: inlined call to ‘cube_yyalloc’ from ‘cube_yy_create_buffer’
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1574:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1577:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1582:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1580| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1581| * we need to put in 2 end-of-buffer characters.
# 1582|-> */
# 1583| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1584| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1623: warning[nullPointer]: Possible null pointer dereference: b
# 1621|
# 1622| yy_flush_buffer( b );
# 1623|->
# 1624| b->yy_input_file = file;
# 1625| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1624: warning[nullPointer]: Possible null pointer dereference: b
# 1622| yy_flush_buffer( b );
# 1623|
# 1624|-> b->yy_input_file = file;
# 1625| b->yy_fill_buffer = 1;
# 1626|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1837:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1821:17: enter_function: entry to ‘cube_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1830:24: call_function: inlined call to ‘cube_yyalloc’ from ‘cube_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1831:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1831:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/cube/cubescan.c:1839:6: call_function: calling ‘cube_yy_scan_buffer’ from ‘cube_yy_scan_bytes’
# 1835| for ( i = 0; i < _yybytes_len; ++i )
# 1836| buf[i] = yybytes[i];
# 1837|->
# 1838| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1839|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/dblink/dblink.c:692: error[legacyUninitvar]: Uninitialized variable: conn
# 690|
# 691| /* async query send */
# 692|-> retval = PQsendQuery(conn, sql);
# 693| if (retval != 1)
# 694| elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/dblink/dblink.c:692: error[legacyUninitvar]: Uninitialized variable: sql
# 690|
# 691| /* async query send */
# 692|-> retval = PQsendQuery(conn, sql);
# 693| if (retval != 1)
# 694| elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));
Error: CPPCHECK_WARNING (CWE-768):
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_io.c:467: error[unknownEvaluationOrder]: Expression '(entry)++->entry' depends on order of evaluation of side effects
# 465|
# 466| for (i = 0; i < pcount; i++)
# 467|-> HS_ADDITEM(entry, buf, ptr, pairs[i]);
# 468|
# 469| HS_FINALIZE(out, pcount, buf, ptr);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_io.c:467: warning[uninitvar]: Uninitialized variable: pairs.val
# 465|
# 466| for (i = 0; i < pcount; i++)
# 467|-> HS_ADDITEM(entry, buf, ptr, pairs[i]);
# 468|
# 469| HS_FINALIZE(out, pcount, buf, ptr);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:341:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:292:1: enter_function: entry to ‘hstore_delete_array’
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:307:33: call_function: calling ‘hstoreArrayToPairs’ from ‘hstore_delete_array’
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:307:33: return_function: returning to ‘hstore_delete_array’ from ‘hstoreArrayToPairs’
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:317:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:317:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:331:25: branch_true: following ‘true’ branch (when ‘i < hs_count’)...
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:335:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:335:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:339:59: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/hstore/hstore_op.c:341:40: danger: dereference of NULL ‘hstoreArrayToPairs(pg_detoast_datum((char *)*fcinfo.args[1].value), &nkeys) + (long unsigned int)j * 40’
# 339| int skeylen = HSTORE_KEYLEN(es, i);
# 340|
# 341|-> if (skeylen == key_pairs[j].keylen)
# 342| difference = memcmp(HSTORE_KEY(es, ps, i),
# 343| key_pairs[j].key,
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/intarray/_intbig_gist.c:173: warning[nullPointer]: Possible null pointer dereference: ptr
# 171| while (num--)
# 172| {
# 173|-> HASH(GETSIGN(res), *ptr, siglen);
# 174| ptr++;
# 175| }
Error: CPPCHECK_WARNING (CWE-682):
postgresql-18.3/postgresql-17.9/contrib/intarray/_intbig_gist.c:174: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 172| {
# 173| HASH(GETSIGN(res), *ptr, siglen);
# 174|-> ptr++;
# 175| }
# 176|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:76:17: warning[-Wanalyzer-null-argument]: use of NULL ‘left’ where non-null expected
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:192:1: enter_function: entry to ‘ltree_union’
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:207:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:240:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:240:12: branch_false: following ‘false’ branch (when ‘isalltrue == 0’)...
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:240:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/ltree/ltree_gist.c:253:18: call_function: calling ‘ltree_gist_alloc’ from ‘ltree_union’
# 74| Assert(left);
# 75| result->flag = LTG_ONENODE;
# 76|-> memcpy(LTG_NODE(result), left, VARSIZE(left));
# 77| }
# 78|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_gin.c:144: warning[nullPointer]: Possible null pointer dereference: (union varattrib_4b*)(trg)
# 142| }
# 143|
# 144|-> trglen = ARRNELEM(trg);
# 145| *nentries = trglen;
# 146|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_regexp.c:2002:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_regexp.c:1972:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_regexp.c:1972:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_regexp.c:1988:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_regexp.c:1992:59: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/pg_trgm/trgm_regexp.c:2002:60: danger: dereference of NULL ‘<unknown>’
# 2000| arcs[arcIndex].sourceState = source->snumber;
# 2001| arcs[arcIndex].targetState = target->snumber;
# 2002|-> arcs[arcIndex].colorTrgm = ctrgm->cnumber;
# 2003| arcIndex++;
# 2004| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:449:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*x’
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:582:1: enter_function: entry to ‘_crypt_blowfish_rn’
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:605:12: branch_false: following ‘false’ branch (when ‘size > 60’)...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:614:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:614:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:620:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:621:18: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:622:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:623:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:624:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:619:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:634:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-blowfish.c:641:9: call_function: calling ‘BF_swap’ from ‘_crypt_blowfish_rn’
# 447| do
# 448| {
# 449|-> tmp = *x;
# 450| tmp = (tmp << 16) | (tmp >> 16);
# 451| *x++ = ((tmp & 0x00FF00FF) << 8) | ((tmp >> 8) & 0x00FF00FF);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-des.c:409:19: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘((const uint32 *)key)[1]’
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-des.c:651:1: enter_function: entry to ‘px_crypt_des’
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/crypt-des.c:679:13: call_function: calling ‘des_setkey’ from ‘px_crypt_des’
# 407|
# 408| rawkey0 = pg_ntoh32(*(const uint32 *) key);
# 409|-> rawkey1 = pg_ntoh32(*(const uint32 *) (key + 4));
# 410|
# 411| if ((rawkey0 | rawkey1)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/pgp-pgsql.c:403: error[uninitvar]: Uninitialized variable: tmp
# 401| * reserve room for header
# 402| */
# 403|-> mbuf_append(dst, tmp, VARHDRSZ);
# 404|
# 405| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/pgcrypto/pgp-pgsql.c:482: error[uninitvar]: Uninitialized variable: tmp
# 480| * reserve room for header
# 481| */
# 482|-> mbuf_append(dst, tmp, VARHDRSZ);
# 483|
# 484| /*
Error: CPPCHECK_WARNING (CWE-909):
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/deparse.c:1924: error[uninitStructMember]: Uninitialized struct member: join_sql_o.len
# 1922| if (fpinfo->jointype == JOIN_SEMI)
# 1923| {
# 1924|-> appendBinaryStringInfo(buf, join_sql_o.data, join_sql_o.len);
# 1925| }
# 1926| else
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:3419:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘aggcosts.transCost.per_tuple’
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7012:1: enter_function: entry to ‘add_foreign_final_paths’
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7033:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7040:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7044:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7048:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7065:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7141:13: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7174:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7188:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7188:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7195:56: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7195:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7196:60: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7195:13: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7200:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7220:12: branch_false: following ‘false’ branch (when ‘has_final_sort == 0’)...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7222:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7225:9: call_function: calling ‘estimate_path_cost_size’ from ‘add_foreign_final_paths’
# 3417| startup_cost += outerrel->reltarget->cost.startup;
# 3418| startup_cost += aggcosts.transCost.startup;
# 3419|-> startup_cost += aggcosts.transCost.per_tuple * input_rows;
# 3420| startup_cost += aggcosts.finalCost.startup;
# 3421| startup_cost += (cpu_operator_cost * numGroupCols) * input_rows;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:3420:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘aggcosts.finalCost.startup’
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:6877:1: enter_function: entry to ‘add_foreign_ordered_paths’
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:6896:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:6900:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:6918:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:6940:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:6978:9: call_function: calling ‘estimate_path_cost_size’ from ‘add_foreign_ordered_paths’
# 3418| startup_cost += aggcosts.transCost.startup;
# 3419| startup_cost += aggcosts.transCost.per_tuple * input_rows;
# 3420|-> startup_cost += aggcosts.finalCost.startup;
# 3421| startup_cost += (cpu_operator_cost * numGroupCols) * input_rows;
# 3422|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/postgres_fdw/postgres_fdw.c:7601: warning[nullPointer]: Possible null pointer dereference: fsstate
# 7599| {
# 7600| Assert(fsstate);
# 7601|-> tupdesc = fsstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
# 7602| }
# 7603|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:971:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:935:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:958:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:960:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:969:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:971:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:971:9: danger: use of uninitialized value ‘yyss’ here
# 969| if (! yyptr)
# 970| YYNOMEM;
# 971|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 972| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 973| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:68:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:68:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 66| range: boundary PLUMIN deviation
# 67| {
# 68|-> result->lower = $1.val - $3.val;
# 69| result->upper = $1.val + $3.val;
# 70| sprintf(strbuf, "%g", result->lower);
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:69:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:69:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 67| {
# 68| result->lower = $1.val - $3.val;
# 69|-> result->upper = $1.val + $3.val;
# 70| sprintf(strbuf, "%g", result->lower);
# 71| result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:71:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:71:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 69| result->upper = $1.val + $3.val;
# 70| sprintf(strbuf, "%g", result->lower);
# 71|-> result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 72| sprintf(strbuf, "%g", result->upper);
# 73| result->u_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:73:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:73:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 71| result->l_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 72| sprintf(strbuf, "%g", result->upper);
# 73|-> result->u_sigd = Max(sig_digits(strbuf), Max($1.sigd, $3.sigd));
# 74| result->l_ext = '\0';
# 75| result->u_ext = '\0';
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:80:33: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:80:33: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 78| | boundary RANGE boundary
# 79| {
# 80|-> result->lower = $1.val;
# 81| result->upper = $3.val;
# 82| if ( result->lower > result->upper ) {
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:90:34: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:82:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:90:34: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:90:34: danger: out-of-bounds read at byte -3 but ‘yyvsa’ starts at byte 0
# 88| YYERROR;
# 89| }
# 90|-> result->l_sigd = $1.sigd;
# 91| result->u_sigd = $3.sigd;
# 92| result->l_ext = ( $1.ext ? $1.ext : '\0' );
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:92:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:82:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:90:34: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:92:57: danger: out-of-bounds read at byte -4 but ‘yyvsa’ starts at byte 0
# 90| result->l_sigd = $1.sigd;
# 91| result->u_sigd = $3.sigd;
# 92|-> result->l_ext = ( $1.ext ? $1.ext : '\0' );
# 93| result->u_ext = ( $3.ext ? $3.ext : '\0' );
# 94| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:98:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].bnd.val’
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:98:33: danger: use of uninitialized value ‘yyvsp[2305843009213693951].bnd.val’ here
# 96| | boundary RANGE
# 97| {
# 98|-> result->lower = $1.val;
# 99| result->upper = HUGE_VAL;
# 100| result->l_sigd = $1.sigd;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:144:35: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].text’
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_false: following ‘false’ branch (when ‘yyn != -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1014:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1017:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1026:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1038:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1045:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1048:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1058:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1065:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:929:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:993:6: branch_false: following ‘false’ branch (when ‘yystate != 8’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:996:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1008:6: branch_true: following ‘true’ branch (when ‘yyn == -3’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1009:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1078:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.c:1080:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:141:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:144:35: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segparse.y:144:35: danger: use of uninitialized value ‘yyvsp[2305843009213693951].text’ here
# 142| YYABORT;
# 143|
# 144|-> $$.ext = $1[0];
# 145| $$.sigd = sig_digits($2);
# 146| $$.val = val;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1564:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1551:21: enter_function: entry to ‘seg_yy_create_buffer’
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1555:24: call_function: inlined call to ‘seg_yyalloc’ from ‘seg_yy_create_buffer’
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1556:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1559:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1564:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1562| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1563| * we need to put in 2 end-of-buffer characters.
# 1564|-> */
# 1565| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1566| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1605: warning[nullPointer]: Possible null pointer dereference: b
# 1603|
# 1604| yy_flush_buffer( b );
# 1605|->
# 1606| b->yy_input_file = file;
# 1607| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1606: warning[nullPointer]: Possible null pointer dereference: b
# 1604| yy_flush_buffer( b );
# 1605|
# 1606|-> b->yy_input_file = file;
# 1607| b->yy_fill_buffer = 1;
# 1608|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1819:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1803:17: enter_function: entry to ‘seg_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1812:24: call_function: inlined call to ‘seg_yyalloc’ from ‘seg_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1813:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1813:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/seg/segscan.c:1821:6: call_function: calling ‘seg_yy_scan_buffer’ from ‘seg_yy_scan_bytes’
# 1817| for ( i = 0; i < _yybytes_len; ++i )
# 1818| buf[i] = yybytes[i];
# 1819|->
# 1820| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1821|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:160:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:75:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:80:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:85:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:101:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:105:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:111:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:119:27: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:129:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:133:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:133:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:136:76: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:139:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:146:22: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:153:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:159:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:159:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:160:33: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:160:25: danger: dereference of NULL ‘argtypes + (long unsigned int)i * 4’
# 158|
# 159| if (plan->nplans <= 0) /* Get typeId of column */
# 160|-> argtypes[i] = SPI_gettypeid(tupdesc, fnumber);
# 161| }
# 162|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:407:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:275:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:280:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:285:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:285:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:290:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:297:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:302:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:306:12: branch_false: following ‘false’ branch (when ‘nargs > 4’)...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:311:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:312:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:315:18: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:322:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:331:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:339:27: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:349:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:355:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:355:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:361:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:361:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:364:76: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:367:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:374:22: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:381:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:392:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:392:20: branch_false: following ‘false’ branch (when ‘newtuple’ is NULL)...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:392:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:406:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:407:33: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/spi/refint.c:407:25: danger: dereference of NULL ‘argtypes + (long unsigned int)i * 4’
# 405|
# 406| if (plan->nplans <= 0) /* Get typeId of column */
# 407|-> argtypes[i] = SPI_gettypeid(tupdesc, fnumber);
# 408| }
# 409| args_temp = args;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘X509_NAME_field_to_text’
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:223:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 223 | data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# | ^
# 221| if (index < 0)
# 222| return (Datum) 0;
# 223|-> data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# 224| return ASN1_STRING_to_text(data);
# 225| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:223:14: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 221| if (index < 0)
# 222| return (Datum) 0;
# 223|-> data = X509_NAME_ENTRY_get_data(X509_NAME_get_entry(name, index));
# 224| return ASN1_STRING_to_text(data);
# 225| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_client_dn_field’
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:254:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 254 | result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:205:36: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 205 | X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
# | ~~~~~~~~~~~^~~~
# 252| PG_RETURN_NULL();
# 253|
# 254|-> result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# 255|
# 256| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:254:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 252| PG_RETURN_NULL();
# 253|
# 254|-> result = X509_NAME_field_to_text(X509_get_subject_name(MyProcPort->peer), fieldname);
# 255|
# 256| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_issuer_field’
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:289:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 289 | result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:205:36: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 205 | X509_NAME_field_to_text(X509_NAME *name, text *fieldName)
# | ~~~~~~~~~~~^~~~
# 287| PG_RETURN_NULL();
# 288|
# 289|-> result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# 290|
# 291| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:289:42: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_field_to_text’ discards ‘const’ qualifier from pointer target type
# 287| PG_RETURN_NULL();
# 288|
# 289|-> result = X509_NAME_field_to_text(X509_get_issuer_name(MyProcPort->peer), fieldname);
# 290|
# 291| if (!result)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c: scope_hint: In function ‘ssl_extension_info’
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:445:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 445 | ext = X509_get_ext(cert, call_cntr);
# | ^
# 443|
# 444| /* Get the extension from the certificate */
# 445|-> ext = X509_get_ext(cert, call_cntr);
# 446| obj = X509_EXTENSION_get_object(ext);
# 447|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:445:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 443|
# 444| /* Get the extension from the certificate */
# 445|-> ext = X509_get_ext(cert, call_cntr);
# 446| obj = X509_EXTENSION_get_object(ext);
# 447|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:446:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 446 | obj = X509_EXTENSION_get_object(ext);
# | ^
# 444| /* Get the extension from the certificate */
# 445| ext = X509_get_ext(cert, call_cntr);
# 446|-> obj = X509_EXTENSION_get_object(ext);
# 447|
# 448| /* Get the extension name */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/contrib/sslinfo/sslinfo.c:446:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 444| /* Get the extension from the certificate */
# 445| ext = X509_get_ext(cert, call_cntr);
# 446|-> obj = X509_EXTENSION_get_object(ext);
# 447|
# 448| /* Get the extension name */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:256: warning[nullPointer]: Possible null pointer dereference: trg
# 254| trgstore = (char *) palloc(sizeof(char) * trglen);
# 255| trgstorelen = trglen;
# 256|-> memcpy(trgstore, trg, trgstorelen);
# 257| }
# 258|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:256:41: warning[-Wanalyzer-null-argument]: use of NULL ‘trg’ where non-null expected
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:337:1: enter_function: entry to ‘unaccent_init’
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:344:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:348:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:350:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:350:28: branch_false: following ‘false’ branch (when ‘fileloaded == 0’)...
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:354:45: branch_false: ...to here
postgresql-18.3/postgresql-17.9/contrib/unaccent/unaccent.c:354:36: call_function: calling ‘initTrie’ from ‘unaccent_init’
# 254| trgstore = (char *) palloc(sizeof(char) * trglen);
# 255| trgstorelen = trglen;
# 256|-> memcpy(trgstore, trg, trgstorelen);
# 257| }
# 258|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:813:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2998:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:3024:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 811| range->values[i] = PointerGetDatum(dataptr);
# 812|
# 813|-> memcpy(dataptr, ptr, typlen);
# 814| dataptr += MAXALIGN(typlen);
# 815|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:822:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2998:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:3024:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 820| range->values[i] = PointerGetDatum(dataptr);
# 821|
# 822|-> memcpy(dataptr, ptr, VARSIZE_ANY(ptr));
# 823| dataptr += MAXALIGN(VARSIZE_ANY(ptr));
# 824| ptr += VARSIZE_ANY(ptr);
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:832:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2998:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:3024:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 830| range->values[i] = PointerGetDatum(dataptr);
# 831|
# 832|-> memcpy(dataptr, ptr, slen);
# 833| dataptr += MAXALIGN(slen);
# 834| ptr += slen;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:1517:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘distances’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2735:1: enter_function: entry to ‘brin_minmax_multi_union’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2823:21: call_function: calling ‘build_distances’ from ‘brin_minmax_multi_union’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2823:21: return_function: returning to ‘brin_minmax_multi_union’ from ‘build_distances’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_minmax_multi.c:2836:20: call_function: calling ‘reduce_expanded_ranges’ from ‘brin_minmax_multi_union’
# 1515| {
# 1516| /* index of the gap between (index) and (index+1) ranges */
# 1517|-> int index = distances[i].index;
# 1518|
# 1519| Assert((index >= 0) && ((index + 1) < neranges));
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:970: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 968| len += targetDataLen;
# 969|
# 970|-> *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 971| (*targetMinimalTuple)->t_len = len;
# 972| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:971: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 969|
# 970| *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 971|-> (*targetMinimalTuple)->t_len = len;
# 972| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 973| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:972: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 970| *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 971| (*targetMinimalTuple)->t_len = len;
# 972|-> (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 973| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 974| /* Same macro works for MinimalTuples */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:973: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 971| (*targetMinimalTuple)->t_len = len;
# 972| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 973|-> (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 974| /* Same macro works for MinimalTuples */
# 975| HeapTupleHeaderSetNatts(*targetMinimalTuple, natts);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:975: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 973| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 974| /* Same macro works for MinimalTuples */
# 975|-> HeapTupleHeaderSetNatts(*targetMinimalTuple, natts);
# 976| if (targetNullLen > 0)
# 977| nullBits = (bits8 *) ((char *) *targetMinimalTuple
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:979: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 977| nullBits = (bits8 *) ((char *) *targetMinimalTuple
# 978| + offsetof(MinimalTupleData, t_bits));
# 979|-> targetData = (char *) *targetMinimalTuple + hoff;
# 980| infoMask = &((*targetMinimalTuple)->t_infomask);
# 981| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/common/heaptuple.c:980: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 978| + offsetof(MinimalTupleData, t_bits));
# 979| targetData = (char *) *targetMinimalTuple + hoff;
# 980|-> infoMask = &((*targetMinimalTuple)->t_infomask);
# 981| }
# 982|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:97:39: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:576:1: enter_function: entry to ‘index_truncate_tuple’
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:587:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:591:28: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:596:9: call_function: calling ‘index_deform_tuple’ from ‘index_truncate_tuple’
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:596:9: return_function: returning to ‘index_truncate_tuple’ from ‘index_deform_tuple’
postgresql-18.3/postgresql-17.9/src/backend/access/common/indextuple.c:597:21: call_function: inlined call to ‘index_form_tuple’ from ‘index_truncate_tuple’
# 95| Form_pg_attribute att = TupleDescAttr(tupleDescriptor, i);
# 96|
# 97|-> untoasted_values[i] = values[i];
# 98| untoasted_free[i] = false;
# 99|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:576:25: warning[-Wanalyzer-null-argument]: use of NULL ‘newrootpg’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:816:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:822:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:823:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:823:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 574| /* Splitting the root, three pages to update */
# 575| MarkBufferDirty(lbuffer);
# 576|-> memcpy(page, newrootpg, BLCKSZ);
# 577| memcpy(BufferGetPage(lbuffer), newlpage, BLCKSZ);
# 578| memcpy(BufferGetPage(rbuffer), newrpage, BLCKSZ);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginentrypage.c:630: error[legacyUninitvar]: Uninitialized variable: tupstore
# 628| */
# 629| maxoff = PageGetMaxOffsetNumber(lpage);
# 630|-> ptr = tupstore[0].data;
# 631| for (i = FirstOffsetNumber; i <= maxoff; i++)
# 632| {
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1516:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1521:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1529:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1530:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1531:24: release_memory: using NULL here
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1531:17: danger: argument 1 (‘*rel.rd_amcache’) NULL where non-null expected
# 1529| if (rel->rd_amcache == NULL)
# 1530| rel->rd_amcache = cache;
# 1531|-> memcpy(rel->rd_amcache, HashPageGetMeta(page),
# 1532| sizeof(HashMetaPageData));
# 1533|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL ‘*rel.rd_amcache’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1559:1: enter_function: entry to ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1573:17: call_function: calling ‘_hash_getcachedmetap’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1573:17: return_function: returning to ‘_hash_getbucketbuf_from_hashkey’ from ‘_hash_getcachedmetap’
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1592:23: call_function: calling ‘_hash_getbuf’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1592:23: return_function: returning to ‘_hash_getbucketbuf_from_hashkey’ from ‘_hash_getbuf’
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1601:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1605:17: call_function: inlined call to ‘_hash_relbuf’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/postgresql-17.9/src/backend/access/hash/hashpage.c:1606:25: call_function: calling ‘_hash_getcachedmetap’ from ‘_hash_getbucketbuf_from_hashkey’
# 1529| if (rel->rd_amcache == NULL)
# 1530| rel->rd_amcache = cache;
# 1531|-> memcpy(rel->rd_amcache, HashPageGetMeta(page),
# 1532| sizeof(HashMetaPageData));
# 1533|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:5877: error[legacyUninitvar]: Uninitialized variable: status
# 5875| }
# 5876|
# 5877|-> result = test_lockmode_for_conflict(status, rawxmax, mode,
# 5878| &mytup, &needwait);
# 5879|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:6446: error[legacyUninitvar]: Uninitialized variable: ret
# 6444| * don't bother optimizing that.
# 6445| */
# 6446|-> if (!ret)
# 6447| {
# 6448| UnlockTuple(relation, &oldtup.t_self, InplaceUpdateTupleLock);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10146:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10020:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10061:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10092:12: branch_true: following ‘true’ branch (when ‘newaction == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10099:27: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10105:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10108:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10108:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10111:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10114:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10121:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10135:20: branch_true: following ‘true’ branch (when ‘prefixlen != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10140:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/heap/heapam.c:10146:63: danger: dereference of NULL ‘oldtup.t_data’
#10144|
#10145| /* copy prefix from old tuple */
#10146|-> memcpy(newp, (char *) oldtup.t_data + oldtup.t_data->t_hoff, prefixlen);
#10147| newp += prefixlen;
#10148|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:1163:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:934:1: enter_function: entry to ‘_bt_strategy’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:954:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:961:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:961:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:961:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:962:20: release_memory: ‘leftinterval’ is NULL
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:962:20: call_function: calling ‘_bt_split_lastleft’ from ‘_bt_strategy’
# 1161| ItemId itemid;
# 1162|
# 1163|-> if (split->newitemonleft && split->firstrightoff == state->newitemoff)
# 1164| return state->newitem;
# 1165|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:1179:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:934:1: enter_function: entry to ‘_bt_strategy’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:954:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:961:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:961:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:961:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:963:21: release_memory: ‘rightinterval’ is NULL
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtsplitloc.c:963:21: call_function: calling ‘_bt_split_firstright’ from ‘_bt_strategy’
# 1177| ItemId itemid;
# 1178|
# 1179|-> if (!split->newitemonleft && split->firstrightoff == state->newitemoff)
# 1180| return state->newitem;
# 1181|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtxlog.c:387:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nposting’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtxlog.c:1014:1: enter_function: entry to ‘btree_redo’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtxlog.c:1032:25: call_function: calling ‘btree_xlog_split’ from ‘btree_redo’
# 385| Assert(newitemonleft ||
# 386| xlrec->firstrightoff == xlrec->newitemoff);
# 387|-> if (PageAddItem(leftpage, (Item) nposting,
# 388| MAXALIGN(IndexTupleSize(nposting)), leftoff,
# 389| false, false) == InvalidOffsetNumber)
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgscan.c:123:17: warning[-Wanalyzer-null-argument]: use of NULL ‘distances’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgscan.c:942:1: enter_function: entry to ‘spggetbitmap’
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgscan.c:952:9: call_function: calling ‘spgWalk’ from ‘spggetbitmap’
# 121|
# 122| if (!isnull && so->numberOfNonNullOrderBys > 0)
# 123|-> memcpy(item->distances, distances,
# 124| sizeof(item->distances[0]) * so->numberOfNonNullOrderBys);
# 125|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:795:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:994:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1037:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1037:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1037:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1043:34: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1049:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1050:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1050:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1050:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
# 793| if (att->attbyval)
# 794| {
# 795|-> memcpy(target, &datum, sizeof(Datum));
# 796| }
# 797| else
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:800:17: warning[-Wanalyzer-null-argument]: use of NULL ‘target’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:994:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1037:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1037:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1037:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1043:34: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1049:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1050:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1050:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/spgist/spgutils.c:1050:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
# 798| {
# 799| size = (att->attlen > 0) ? att->attlen : VARSIZE_ANY(datum);
# 800|-> memcpy(target, DatumGetPointer(datum), size);
# 801| }
# 802| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/commit_ts.c:452: warning[uninitvar]: Uninitialized variable: values
# 450| }
# 451|
# 452|-> htup = heap_form_tuple(tupdesc, values, nulls);
# 453|
# 454| PG_RETURN_DATUM(HeapTupleGetDatum(htup));
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/commit_ts.c:493: warning[uninitvar]: Uninitialized variable: values
# 491| }
# 492|
# 493|-> htup = heap_form_tuple(tupdesc, values, nulls);
# 494|
# 495| PG_RETURN_DATUM(HeapTupleGetDatum(htup));
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/twophase.c:1037: error[ctunullpointer]: Null pointer dereference: data
# 1035| }
# 1036|
# 1037|-> memcpy(((char *) records.tail->data) + records.tail->len, data, len);
# 1038| records.tail->len += padlen;
# 1039| records.bytes_free -= padlen;
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xact.c:6061:76: warning[-Wanalyzer-null-argument]: use of NULL ‘twophase_gid’ where non-null expected
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xact.c:5172:1: enter_function: entry to ‘AbortSubTransaction’
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xact.c:5265:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xact.c:5267:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xact.c:5277:24: call_function: calling ‘RecordTransactionAbort’ from ‘AbortSubTransaction’
# 6059| XLogRegisterData((char *) (&xl_twophase), sizeof(xl_xact_twophase));
# 6060| if (xl_xinfo.xinfo & XACT_XINFO_HAS_GID)
# 6061|-> XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1);
# 6062| }
# 6063|
Error: CPPCHECK_WARNING (CWE-682):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlog.c:1649: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 1647| Assert(((XLogPageHeader) cachedPos)->xlp_magic == XLOG_PAGE_MAGIC);
# 1648| Assert(((XLogPageHeader) cachedPos)->xlp_pageaddr == ptr - (ptr % XLOG_BLCKSZ));
# 1649|-> return cachedPos + ptr % XLOG_BLCKSZ;
# 1650| }
# 1651|
Error: GCC_ANALYZER_WARNING (CWE-131):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xloginsert.c:232:9: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xloginsert.c:1237:1: enter_function: entry to ‘log_newpage_buffer’
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xloginsert.c:1249:16: call_function: calling ‘log_newpage’ from ‘log_newpage_buffer’
# 230| max_registered_block_id = 0;
# 231| mainrdata_len = 0;
# 232|-> mainrdata_last = (XLogRecData *) &mainrdata_head;
# 233| curinsert_flags = 0;
# 234| begininsert_called = false;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1724:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1662:1: enter_function: entry to ‘PerformWalRecovery’
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1712:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1715:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1717:26: call_function: calling ‘ReadRecord’ from ‘PerformWalRecovery’
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1717:26: return_function: returning to ‘PerformWalRecovery’ from ‘ReadRecord’
postgresql-18.3/postgresql-17.9/src/backend/access/transam/xlogrecovery.c:1724:21: danger: dereference of NULL ‘ReadRecord(xlogprefetcher, 23, 0, RedoStartTLI)’
# 1722| * record.
# 1723| */
# 1724|-> if (record->xl_rmid != RM_XLOG_ID ||
# 1725| (record->xl_info & ~XLR_INFO_MASK) != XLOG_CHECKPOINT_REDO)
# 1726| ereport(FATAL,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/backup/basebackup_copy.c:418: warning[uninitvar]: Uninitialized variable: values
# 416| nulls[2] = true;
# 417|
# 418|-> do_tup_output(tstate, values, nulls);
# 419| }
# 420|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1142:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1106:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1129:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1131:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1140:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1142:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1142:9: danger: use of uninitialized value ‘yyss’ here
# 1140| if (! yyptr)
# 1141| YYNOMEM;
# 1142|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1143| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1144| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:155:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:155:41: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:155:41: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:155:41: danger: out-of-bounds read from byte -24 till byte -21 but ‘yyvsa’ starts at byte 0
# 153| do_start();
# 154| numattr = 0;
# 155|-> elog(DEBUG4, "creating%s%s relation %s %u",
# 156| $4 ? " bootstrap" : "",
# 157| $5 ? " shared" : "",
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:175:59: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:175:59: danger: out-of-bounds read from byte -40 till byte -37 but ‘yyvsa’ starts at byte 0
# 173| tupdesc = CreateTupleDesc(numattr, attrtypes);
# 174|
# 175|-> shared_relation = $5;
# 176|
# 177| /*
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:186:60: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:186:60: danger: out-of-bounds read from byte -48 till byte -45 but ‘yyvsa’ starts at byte 0
# 184| * in relcache.c) must be mapped.
# 185| */
# 186|-> mapped_relation = ($4 || shared_relation);
# 187|
# 188| if ($4)
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:199:64: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:188:44: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:193:53: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:199:64: danger: out-of-bounds read from byte -56 till byte -53 but ‘yyvsa’ starts at byte 0
# 197| }
# 198|
# 199|-> boot_reldesc = heap_create($2,
# 200| PG_CATALOG_NAMESPACE,
# 201| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:199:76: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:188:44: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:193:53: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:199:76: danger: out-of-bounds read from byte -64 till byte -57 but ‘yyvsa’ starts at byte 0
# 197| }
# 198|
# 199|-> boot_reldesc = heap_create($2,
# 200| PG_CATALOG_NAMESPACE,
# 201| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:220:54: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:188:44: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:220:54: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:220:54: danger: out-of-bounds read from byte -32 till byte -29 but ‘yyvsa’ starts at byte 0
# 218| Oid id;
# 219|
# 220|-> id = heap_create_with_catalog($2,
# 221| PG_CATALOG_NAMESPACE,
# 222| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:220:79: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:188:44: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:220:54: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:220:79: danger: out-of-bounds read from byte -64 till byte -57 but ‘yyvsa’ starts at byte 0
# 218| Oid id;
# 219|
# 220|-> id = heap_create_with_catalog($2,
# 221| PG_CATALOG_NAMESPACE,
# 222| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:272:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1034:1: enter_function: entry to ‘boot_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:269:60: call_function: inlined call to ‘newNode’ from ‘boot_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:272:41: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:272:41: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:272:41: danger: out-of-bounds read from byte -56 till byte -49 but ‘yyvsa’ starts at byte 0
# 270| Oid relationId;
# 271|
# 272|-> elog(DEBUG4, "creating index \"%s\"", $3);
# 273|
# 274| do_start();
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:325:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1034:1: enter_function: entry to ‘boot_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:322:60: call_function: inlined call to ‘newNode’ from ‘boot_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:325:41: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:325:41: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:325:41: danger: out-of-bounds read from byte -56 till byte -49 but ‘yyvsa’ starts at byte 0
# 323| Oid relationId;
# 324|
# 325|-> elog(DEBUG4, "creating unique index \"%s\"", $4);
# 326|
# 327| do_start();
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:379:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1185:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1188:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1197:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1209:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1216:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1219:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1229:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1236:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1100:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1164:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1167:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1179:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1180:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1249:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.c:1251:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootparse.y:379:41: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 377| do_start();
# 378|
# 379|-> BootstrapToastTable($6, $3, $4);
# 380| do_end();
# 381| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1778:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1765:21: enter_function: entry to ‘boot_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1769:24: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1770:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1773:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1778:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1776| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1777| * we need to put in 2 end-of-buffer characters.
# 1778|-> */
# 1779| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1780| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1819: warning[nullPointer]: Possible null pointer dereference: b
# 1817|
# 1818| yy_flush_buffer( b );
# 1819|->
# 1820| b->yy_input_file = file;
# 1821| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:1820: warning[nullPointer]: Possible null pointer dereference: b
# 1818| yy_flush_buffer( b );
# 1819|
# 1820|-> b->yy_input_file = file;
# 1821| b->yy_fill_buffer = 1;
# 1822|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:2033:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:2017:17: enter_function: entry to ‘boot_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:2026:24: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:2027:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:2027:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/bootstrap/bootscanner.c:2035:6: call_function: calling ‘boot_yy_scan_buffer’ from ‘boot_yy_scan_bytes’
# 2031| for ( i = 0; i < _yybytes_len; ++i )
# 2032| buf[i] = yybytes[i];
# 2033|->
# 2034| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2035|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:288:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:255:1: enter_function: entry to ‘has_partition_attrs’
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:263:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:270:26: call_function: inlined call to ‘list_head’ from ‘has_partition_attrs’
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:271:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:271:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:273:45: call_function: inlined call to ‘get_partition_col_attnum’ from ‘has_partition_attrs’
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:275:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:288:37: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/catalog/partition.c:288:37: danger: dereference of NULL ‘partexprs_item’
# 286| {
# 287| /* Arbitrary expression */
# 288|-> Node *expr = (Node *) lfirst(partexprs_item);
# 289| Bitmapset *expr_attrs = NULL;
# 290|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1098:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1052:1: enter_function: entry to ‘pg_get_publication_tables’
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1059:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1070:27: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1084:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1090:57: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1090:36: call_function: calling ‘GetPublicationByName’ from ‘pg_get_publication_tables’
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1090:36: return_function: returning to ‘pg_get_publication_tables’ from ‘GetPublicationByName’
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_publication.c:1098:29: danger: dereference of NULL ‘GetPublicationByName(text_to_cstring((char *)*<unknown>), 0)’
# 1096| * those. Otherwise, get the partitioned table itself.
# 1097| */
# 1098|-> if (pub_elem->alltables)
# 1099| pub_elem_tables = GetAllTablesPublicationRelations(pub_elem->pubviaroot);
# 1100| else
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_type.c: scope_hint: In function ‘makeMultirangeTypeName’
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_type.c:959:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 959 | rangestr = strstr(rangeTypeName, "range");
# | ^
# 957| * "multirange". Otherwise add "_multirange" to the end.
# 958| */
# 959|-> rangestr = strstr(rangeTypeName, "range");
# 960| if (rangestr)
# 961| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/catalog/pg_type.c:959:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 957| * "multirange". Otherwise add "_multirange" to the end.
# 958| */
# 959|-> rangestr = strstr(rangeTypeName, "range");
# 960| if (rangestr)
# 961| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:600:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:280:1: enter_function: entry to ‘do_analyze_rel’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:401:29: branch_false: following ‘false’ branch (when ‘i > attr_cnt’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:419:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:440:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:494:23: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:510:19: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:519:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:519:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:522:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:527:27: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:537:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:542:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:550:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:579:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:579:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:585:17: call_function: inlined call to ‘MemoryContextSwitchTo’ from ‘do_analyze_rel’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:593:17: call_function: inlined call to ‘update_attstats’ from ‘do_analyze_rel’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:596:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:596:31: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:598:60: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:600:25: danger: dereference of NULL ‘thisdata’
# 598| AnlIndexData *thisdata = &indexdata[ind];
# 599|
# 600|-> update_attstats(RelationGetRelid(Irel[ind]), false,
# 601| thisdata->attr_cnt, thisdata->vacattrstats);
# 602| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:653:47: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:401:29: branch_false: following ‘false’ branch (when ‘i > attr_cnt’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:419:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:440:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:494:23: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:510:19: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:519:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:519:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:522:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:527:27: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:623:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:627:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:648:31: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:650:60: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:653:47: danger: dereference of NULL ‘thisdata’
# 651| double totalindexrows;
# 652|
# 653|-> totalindexrows = ceil(thisdata->tupleFract * totalrows);
# 654| vac_update_relstats(Irel[ind],
# 655| RelationGetNumberOfBlocks(Irel[ind]),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:848:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:280:1: enter_function: entry to ‘do_analyze_rel’
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:401:29: branch_false: following ‘false’ branch (when ‘i > attr_cnt’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:419:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:440:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:489:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:494:23: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:510:19: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:519:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:519:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:522:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:527:27: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:537:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:542:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:550:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:579:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:579:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:580:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/analyze.c:580:25: call_function: calling ‘compute_index_stats’ from ‘do_analyze_rel’
# 846| {
# 847| AnlIndexData *thisdata = &indexdata[ind];
# 848|-> IndexInfo *indexInfo = thisdata->indexInfo;
# 849| int attr_cnt = thisdata->attr_cnt;
# 850| TupleTableSlot *slot;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/commands/conversioncmds.c:110: error[uninitvar]: Uninitialized variable: result
# 108| * perform the requested conversion.
# 109| */
# 110|-> funcresult = OidFunctionCall6(funcoid,
# 111| Int32GetDatum(from_encoding),
# 112| Int32GetDatum(to_encoding),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/copy.c:337:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/postgresql-17.9/src/backend/commands/copy.c:330:12: branch_true: following ‘true’ branch (when ‘is_from != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/commands/copy.c:337:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/copy.c:337:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/commands/copy.c:337:38: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/commands/copy.c:337:38: danger: dereference of NULL ‘rel’
# 335|
# 336| /* check read-only transaction and parallel mode */
# 337|-> if (XactReadOnly && !rel->rd_islocaltemp)
# 338| PreventCommandIfReadOnly("COPY FROM");
# 339|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/extension.c:445: error[ctunullpointer]: Null pointer dereference: versionname
# 443| check_valid_version_name(const char *versionname)
# 444| {
# 445|-> int namelen = strlen(versionname);
# 446|
# 447| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/extension.c:445: warning[nullPointer]: Possible null pointer dereference: versionname
# 443| check_valid_version_name(const char *versionname)
# 444| {
# 445|-> int namelen = strlen(versionname);
# 446|
# 447| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/extension.c:3227: warning[nullPointer]: Possible null pointer dereference: versionName
# 3225| * If we're already at that version, just say so
# 3226| */
# 3227|-> if (strcmp(oldVersionName, versionName) == 0)
# 3228| {
# 3229| ereport(NOTICE,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/commands/policy.c:128: error[legacyUninitvar]: Uninitialized variable: polcmd
# 126| elog(ERROR, "unrecognized policy command");
# 127|
# 128|-> return polcmd;
# 129| }
# 130|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/commands/tablecmds.c:8723: warning[uninitvar]: Uninitialized variable: repl_val
# 8721| repl_repl[Anum_pg_attribute_attstattarget - 1] = true;
# 8722| newtuple = heap_modify_tuple(tuple, RelationGetDescr(attrelation),
# 8723|-> repl_val, repl_null, repl_repl);
# 8724| CatalogTupleUpdate(attrelation, &tuple->t_self, newtuple);
# 8725|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/commands/tablecmds.c:8797: warning[uninitvar]: Uninitialized variable: repl_val
# 8795| repl_repl[Anum_pg_attribute_attoptions - 1] = true;
# 8796| newtuple = heap_modify_tuple(tuple, RelationGetDescr(attrelation),
# 8797|-> repl_val, repl_null, repl_repl);
# 8798|
# 8799| /* Update system catalog. */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/commands/tablecmds.c:12667: error[legacyUninitvar]: Uninitialized variable: contype
#12665| * the dependency mechanism, so we're done here.
#12666| */
#12667|-> if (contype != CONSTRAINT_CHECK &&
#12668| rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
#12669| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/commands/tablespace.c:1068: warning[uninitvar]: Uninitialized variable: repl_val
# 1066| repl_null[Anum_pg_tablespace_spcoptions - 1] = true;
# 1067| repl_repl[Anum_pg_tablespace_spcoptions - 1] = true;
# 1068|-> newtuple = heap_modify_tuple(tup, RelationGetDescr(rel), repl_val,
# 1069| repl_null, repl_repl);
# 1070|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/trigger.c:4913: error[ctunullpointer]: Null pointer dereference: table
# 4911| {
# 4912| /* Create it if not already done. */
# 4913|-> if (!table->storeslot)
# 4914| {
# 4915| MemoryContext oldcxt;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/trigger.c:4913: warning[nullPointer]: Possible null pointer dereference: table
# 4911| {
# 4912| /* Create it if not already done. */
# 4913|-> if (!table->storeslot)
# 4914| {
# 4915| MemoryContext oldcxt;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/commands/trigger.c:4929: warning[nullPointer]: Possible null pointer dereference: table
# 4927| }
# 4928|
# 4929|-> return table->storeslot;
# 4930| }
# 4931|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:176:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:137:1: enter_function: entry to ‘ExecInitJunkFilterConversion’
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:166:12: branch_true: following ‘true’ branch (when ‘cleanLength > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:168:43: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:169:21: call_function: inlined call to ‘list_head’ from ‘ExecInitJunkFilterConversion’
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:170:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:170:29: branch_true: following ‘true’ branch (when ‘i < cleanLength’)...
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:172:29: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/execJunk.c:176:46: danger: dereference of NULL ‘t’
# 174| for (;;)
# 175| {
# 176|-> TargetEntry *tle = lfirst(t);
# 177|
# 178| t = lnext(targetList, t);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/execProcnode.c:391: warning[nullPointer]: Possible null pointer dereference: result
# 389| }
# 390|
# 391|-> ExecSetExecProcNode(result, result->ExecProcNode);
# 392|
# 393| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/execProcnode.c:407: warning[nullPointer]: Possible null pointer dereference: result
# 405| subps = lappend(subps, sstate);
# 406| }
# 407|-> result->initPlan = subps;
# 408|
# 409| /* Set up instrumentation for this node if requested */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/execProcnode.c:433: error[ctunullpointer]: Null pointer dereference: node
# 431| * means we'll superfluously execute ExecProcNodeFirst, but that seems ok.
# 432| */
# 433|-> node->ExecProcNodeReal = function;
# 434| node->ExecProcNode = ExecProcNodeFirst;
# 435| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/execProcnode.c:433: warning[nullPointer]: Possible null pointer dereference: node
# 431| * means we'll superfluously execute ExecProcNodeFirst, but that seems ok.
# 432| */
# 433|-> node->ExecProcNodeReal = function;
# 434| node->ExecProcNode = ExecProcNodeFirst;
# 435| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/execProcnode.c:434: warning[nullPointer]: Possible null pointer dereference: node
# 432| */
# 433| node->ExecProcNodeReal = function;
# 434|-> node->ExecProcNode = ExecProcNodeFirst;
# 435| }
# 436|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/executor/execScan.c:345: error[legacyUninitvar]: Uninitialized variable: relids
# 343| (int) nodeTag(node->ps.plan));
# 344|
# 345|-> while ((rtindex = bms_next_member(relids, rtindex)) >= 0)
# 346| {
# 347| Assert(rtindex > 0);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2372:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘isnull’
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2390:1: enter_function: entry to ‘do_text_output_multiline’
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2395:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2400:23: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2401:20: branch_true: following ‘true’ branch (when ‘eol’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2403:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/execTuples.c:2413:17: call_function: calling ‘do_tup_output’ from ‘do_text_output_multiline’
# 2370| /* insert data */
# 2371| memcpy(slot->tts_values, values, natts * sizeof(Datum));
# 2372|-> memcpy(slot->tts_isnull, isnull, natts * sizeof(bool));
# 2373|
# 2374| /* mark slot as containing a virtual tuple */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:1344:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:3541:1: enter_function: entry to ‘ExecParallelHashTuplePrealloc’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:3554:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:3559:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:3560:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:3561:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeHash.c:3561:25: call_function: calling ‘ExecParallelHashIncreaseNumBatches’ from ‘ExecParallelHashTuplePrealloc’
# 1342| HJTUPLE_OVERHEAD + tuple->t_len,
# 1343| &shared);
# 1344|-> copyTuple->hashvalue = hashTuple->hashvalue;
# 1345| memcpy(HJTUPLE_MINTUPLE(copyTuple), tuple, tuple->t_len);
# 1346| ExecParallelHashPushTuple(&hashtable->buckets.shared[bucketno],
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1210:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1191:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1197:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1210:31: danger: dereference of NULL ‘leftop’
# 1208| Assert(leftop != NULL);
# 1209|
# 1210|-> if (!(IsA(leftop, Var) &&
# 1211| ((Var *) leftop)->varno == INDEX_VAR))
# 1212| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1242:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1135:1: enter_function: entry to ‘ExecIndexBuildScanKeys’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1191:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1197:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1203:43: call_function: inlined call to ‘get_leftop’ from ‘ExecIndexBuildScanKeys’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1205:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1205:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1210:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1211:35: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1210:29: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1214:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1215:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1242:29: danger: dereference of NULL ‘rightop’
# 1240| Assert(rightop != NULL);
# 1241|
# 1242|-> if (IsA(rightop, Const))
# 1243| {
# 1244| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1327:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1306:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1327:39: danger: dereference of NULL ‘leftop’
# 1325| Assert(leftop != NULL);
# 1326|
# 1327|-> if (!(IsA(leftop, Var) &&
# 1328| ((Var *) leftop)->varno == INDEX_VAR))
# 1329| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1366:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1306:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1322:36: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1322:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1327:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1328:43: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1327:37: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1331:33: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1337:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1337:37: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1340:44: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1347:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1350:44: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1354:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1361:36: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1366:37: danger: dereference of NULL ‘rightop’
# 1364| Assert(rightop != NULL);
# 1365|
# 1366|-> if (IsA(rightop, Const))
# 1367| {
# 1368| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1451:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1288:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1428:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1428:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1438:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1446:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1451:31: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1451:31: danger: dereference of NULL ‘leftop’
# 1449| Assert(leftop != NULL);
# 1450|
# 1451|-> if (!(IsA(leftop, Var) &&
# 1452| ((Var *) leftop)->varno == INDEX_VAR))
# 1453| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1484:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1288:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1428:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1428:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1438:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1446:28: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1446:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1451:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1452:35: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1451:29: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1455:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1456:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1475:28: branch_false: following ‘false’ branch (when ‘rightop’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1480:29: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1480:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1484:37: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1484:37: danger: dereference of NULL ‘rightop’
# 1482| /* Index AM will handle this like a simple operator */
# 1483| flags |= SK_SEARCHARRAY;
# 1484|-> if (IsA(rightop, Const))
# 1485| {
# 1486| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1565:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1175:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1288:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1428:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1428:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1547:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1547:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1558:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1560:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1565:31: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/executor/nodeIndexscan.c:1565:31: danger: dereference of NULL ‘leftop’
# 1563| Assert(leftop != NULL);
# 1564|
# 1565|-> if (!(IsA(leftop, Var) &&
# 1566| ((Var *) leftop)->varno == INDEX_VAR))
# 1567| elog(ERROR, "NullTest indexqual has wrong key");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/lib/pairingheap.c:275:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pairs’
postgresql-18.3/postgresql-17.9/src/backend/lib/pairingheap.c:251:20: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/lib/pairingheap.c:275:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/lib/pairingheap.c:275:9: danger: dereference of NULL ‘pairs’
# 273| */
# 274| newroot = pairs;
# 275|-> next = pairs->next_sibling;
# 276| while (next)
# 277| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth-scram.c:1174: warning[uninitvar]: Uninitialized variable: ClientKey
# 1172|
# 1173| /* Hash it one more time, and compare with StoredKey */
# 1174|-> if (scram_H(ClientKey, state->hash_type, state->key_length,
# 1175| client_StoredKey, &errstr) < 0)
# 1176| elog(ERROR, "could not hash stored key: %s", errstr);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2842:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2942:1: enter_function: entry to ‘PerformRadiusTransaction’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2982:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2996:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:3003:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:3020:21: branch_false: following ‘false’ branch (when ‘i >= encryptedpasswordlen’)...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:3051:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:3053:9: call_function: calling ‘radius_add_attribute’ from ‘PerformRadiusTransaction’
# 2840| attr->attribute = type;
# 2841| attr->length = len + 2; /* total size includes type and length */
# 2842|-> memcpy(attr->data, data, len);
# 2843| packet->length += attr->length;
# 2844| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2897:100: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘secrets’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2847:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2859:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2866:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2866:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2874:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2874:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2874:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2876:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2876:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2877:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2880:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2880:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2891:29: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2891:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2892:33: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2892:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2893:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2894:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2894:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2896:47: branch_false: following ‘false’ branch (when ‘identifiers’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2896:47: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2896:47: branch_true: following ‘true’ branch (when ‘radiusports’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2896:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:2897:100: danger: dereference of NULL ‘secrets’
# 2895| {
# 2896| int ret = PerformRadiusTransaction(lfirst(server),
# 2897|-> lfirst(secrets),
# 2898| radiusports ? lfirst(radiusports) : NULL,
# 2899| identifiers ? lfirst(identifiers) : NULL,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/libpq/auth.c:3053: warning[uninitvar]: Uninitialized variable: encryptedpassword
# 3051| pfree(cryptvector);
# 3052|
# 3053|-> radius_add_attribute(packet, RADIUS_PASSWORD, encryptedpassword, encryptedpasswordlen);
# 3054|
# 3055| /* Length needs to be in network order on the wire */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_open_server’
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:637:40: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 637 | X509_NAME *x509name = X509_get_subject_name(port->peer);
# | ^~~~~~~~~~~~~~~~~~~~~
# 635| {
# 636| int len;
# 637|-> X509_NAME *x509name = X509_get_subject_name(port->peer);
# 638| char *peer_dn;
# 639| BIO *bio = NULL;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:637:40: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 635| {
# 636| int len;
# 637|-> X509_NAME *x509name = X509_get_subject_name(port->peer);
# 638| char *peer_dn;
# 639| BIO *bio = NULL;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘verify_cb’
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1233:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1233 | subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:80:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 80 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1231| * it either.
# 1232| */
# 1233|-> subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# 1234| sub_prepared = prepare_cert_name(subject);
# 1235| pfree(subject);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1233:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1231| * it either.
# 1232| */
# 1233|-> subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# 1234| sub_prepared = prepare_cert_name(subject);
# 1235| pfree(subject);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1237:47: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1237 | issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:80:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 80 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1235| pfree(subject);
# 1236|
# 1237|-> issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# 1238| iss_prepared = prepare_cert_name(issuer);
# 1239| pfree(issuer);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1237:47: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1235| pfree(subject);
# 1236|
# 1237|-> issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# 1238| iss_prepared = prepare_cert_name(issuer);
# 1239| pfree(issuer);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_get_peer_subject_name’
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1519:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1519 | strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:80:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 80 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1517| {
# 1518| if (port->peer)
# 1519|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# 1520| else
# 1521| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1519:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1517| {
# 1518| if (port->peer)
# 1519|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# 1520| else
# 1521| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_get_peer_issuer_name’
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1528:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1528 | strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:80:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 80 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1526| {
# 1527| if (port->peer)
# 1528|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# 1529| else
# 1530| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1528:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1526| {
# 1527| if (port->peer)
# 1528|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# 1529| else
# 1530| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘X509_NAME_to_cstring’
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1641:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1641 | e = X509_NAME_get_entry(name, i);
# | ^
# 1639| for (i = 0; i < count; i++)
# 1640| {
# 1641|-> e = X509_NAME_get_entry(name, i);
# 1642| nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(e));
# 1643| if (nid == NID_undef)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1641:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1639| for (i = 0; i < count; i++)
# 1640| {
# 1641|-> e = X509_NAME_get_entry(name, i);
# 1642| nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(e));
# 1643| if (nid == NID_undef)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1647:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1647 | v = X509_NAME_ENTRY_get_data(e);
# | ^
# 1645| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
# 1646| errmsg("could not get NID for ASN1_OBJECT object")));
# 1647|-> v = X509_NAME_ENTRY_get_data(e);
# 1648| field_name = OBJ_nid2sn(nid);
# 1649| if (field_name == NULL)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/libpq/be-secure-openssl.c:1647:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1645| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
# 1646| errmsg("could not get NID for ASN1_OBJECT object")));
# 1647|-> v = X509_NAME_ENTRY_get_data(e);
# 1648| field_name = OBJ_nid2sn(nid);
# 1649| if (field_name == NULL)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:1347:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2583:1: enter_function: entry to ‘load_hba’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2593:16: call_function: calling ‘open_auth_file’ from ‘load_hba’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2593:16: return_function: returning to ‘load_hba’ from ‘open_auth_file’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2594:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2600:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2600:9: call_function: calling ‘tokenize_auth_file’ from ‘load_hba’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2600:9: return_function: returning to ‘load_hba’ from ‘tokenize_auth_file’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2608:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2620:32: call_function: calling ‘parse_hba_line’ from ‘load_hba’
# 1345| Assert(tok_line->fields != NIL);
# 1346| field = list_head(tok_line->fields);
# 1347|-> tokens = lfirst(field);
# 1348| if (tokens->length > 1)
# 1349| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2706:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2689:1: enter_function: entry to ‘parse_ident_line’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2700:17: call_function: inlined call to ‘list_head’ from ‘parse_ident_line’
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2702:22: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/libpq/hba.c:2706:9: danger: dereference of NULL ‘<unknown>’
# 2704|
# 2705| /* Get the map token (must exist) */
# 2706|-> tokens = lfirst(field);
# 2707| IDENT_MULTI_VALUE(tokens);
# 2708| token = linitial(tokens);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:196:17: warning[-Wanalyzer-malloc-leak]: leak of ‘strdup(get_user_name_or_exit(progname))’
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:147:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:152:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:185:12: branch_true: following ‘true’ branch (when ‘argc > 1’)...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:185:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:185:13: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:187:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:187:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:193:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:193:18: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:195:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:195:18: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:197:60: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:197:60: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/backend/main/main.c:196:17: danger: ‘strdup(get_user_name_or_exit(progname))’ leaks here; was allocated at [(15)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/14)
# 194| GucInfoMain();
# 195| else if (argc > 1 && strcmp(argv[1], "--single") == 0)
# 196|-> PostgresSingleUserMain(argc, argv,
# 197| strdup(get_user_name_or_exit(progname)));
# 198| else
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:630:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:619:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:628:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:630:41: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:630:41: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 628| if (bms_is_subset(iclause->rinfo->clause_relids, relids))
# 629| clauseset.indexclauses[indexcol] =
# 630|-> lappend(clauseset.indexclauses[indexcol], iclause);
# 631| }
# 632|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:646:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:619:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:639:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:639:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:643:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:646:41: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:646:41: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 644| {
# 645| clauseset.indexclauses[indexcol] =
# 646|-> lappend(clauseset.indexclauses[indexcol], iclause);
# 647| break;
# 648| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:653:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:619:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:624:17: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:639:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:653:25: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 651| /* Add restriction clauses */
# 652| clauseset.indexclauses[indexcol] =
# 653|-> list_concat(clauseset.indexclauses[indexcol],
# 654| rclauseset->indexclauses[indexcol]);
# 655|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:862:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*clauses.indexclauses[indexcol]’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:600:1: enter_function: entry to ‘get_join_index_paths’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:619:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:664:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/indxpath.c:664:9: call_function: calling ‘get_index_paths’ from ‘get_join_index_paths’
# 860| ListCell *lc;
# 861|
# 862|-> foreach(lc, clauses->indexclauses[indexcol])
# 863| {
# 864| IndexClause *iclause = (IndexClause *) lfirst(lc);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1551:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr1’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1479:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1495:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1505:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1523:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1523:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1537:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1549:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1549:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1551:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1551:25: danger: dereference of NULL ‘lcr1’
# 1549| if (joinrel->partbounds_merged)
# 1550| {
# 1551|-> child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1552| child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1553| lcr1 = lnext(parts1, lcr1);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1552:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr2’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1479:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1495:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1505:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1523:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1523:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1526:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1528:24: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1528:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1529:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1537:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1537:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1549:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1549:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1551:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/joinrels.c:1552:25: danger: dereference of NULL ‘lcr2’
# 1550| {
# 1551| child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1552|-> child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1553| lcr1 = lnext(parts1, lcr1);
# 1554| lcr2 = lnext(parts2, lcr2);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/pathkeys.c:1400:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/pathkeys.c:1371:1: enter_function: entry to ‘make_pathkeys_for_sortclauses_extended’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/pathkeys.c:1382:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/pathkeys.c:1394:27: call_function: calling ‘make_pathkey_from_sortop’ from ‘make_pathkeys_for_sortclauses_extended’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/pathkeys.c:1394:27: return_function: returning to ‘make_pathkeys_for_sortclauses_extended’ from ‘make_pathkey_from_sortop’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/path/pathkeys.c:1400:21: danger: dereference of NULL ‘make_pathkey_from_sortop(root, get_sortgroupclause_expr(sortcl, tlist), *sortcl.sortop, *sortcl.nulls_first, *sortcl.tleSortGroupRef, 1)’
# 1398| sortcl->tleSortGroupRef,
# 1399| true);
# 1400|-> if (pathkey->pk_eclass->ec_sortref == 0 && set_ec_sortref)
# 1401| {
# 1402| /*
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/analyzejoins.c:1112:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/analyzejoins.c:861:1: enter_function: entry to ‘rel_is_distinct_for’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/analyzejoins.c:939:21: call_function: calling ‘query_is_distinct_for’ from ‘rel_is_distinct_for’
# 1110| /* non-resjunk columns should have grouping clauses */
# 1111| Assert(lg != NULL);
# 1112|-> sgc = (SortGroupClause *) lfirst(lg);
# 1113| lg = lnext(topop->groupClauses, lg);
# 1114|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5104:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5093:1: enter_function: entry to ‘fix_indexqual_clause’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5102:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5102:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5104:13: danger: dereference of NULL ‘replace_nestloop_params_mutator(clause, root)’
# 5102| clause = replace_nestloop_params(root, clause);
# 5103|
# 5104|-> if (IsA(clause, OpExpr))
# 5105| {
# 5106| OpExpr *op = (OpExpr *) clause;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5173:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5023:1: enter_function: entry to ‘fix_indexqual_references’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5033:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5039:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5039:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5045:34: call_function: calling ‘fix_indexqual_clause’ from ‘fix_indexqual_references’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5045:34: return_function: returning to ‘fix_indexqual_references’ from ‘fix_indexqual_clause’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/createplan.c:5045:34: call_function: calling ‘fix_indexqual_clause’ from ‘fix_indexqual_references’
# 5171| * Remove any binary-compatible relabeling of the indexkey
# 5172| */
# 5173|-> if (IsA(node, RelabelType))
# 5174| node = (Node *) ((RelabelType *) node)->arg;
# 5175|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:4154:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partially_grouped_rel’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:7975:1: enter_function: entry to ‘create_partitionwise_grouping_paths’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:7996:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:7998:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8055:17: call_function: calling ‘create_ordinary_grouping_paths’ from ‘create_partitionwise_grouping_paths’
# 4152| Assert(partially_grouped_rel);
# 4153|
# 4154|-> if (partially_grouped_rel->pathlist)
# 4155| set_cheapest(partially_grouped_rel);
# 4156|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8231:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8206:1: enter_function: entry to ‘generate_setop_child_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8213:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8214:24: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8214:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8215:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8215:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8222:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8231:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8231:17: danger: dereference of NULL ‘lg’
# 8229| Assert(lg != NULL);
# 8230| Assert(ct != NULL);
# 8231|-> sgc = (SortGroupClause *) lfirst(lg);
# 8232| coltype = lfirst_oid(ct);
# 8233|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8232:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ct’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8206:1: enter_function: entry to ‘generate_setop_child_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8213:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8214:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8215:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8215:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8222:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8231:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/planner.c:8232:17: danger: dereference of NULL ‘ct’
# 8230| Assert(ct != NULL);
# 8231| sgc = (SortGroupClause *) lfirst(lg);
# 8232|-> coltype = lfirst_oid(ct);
# 8233|
# 8234| /* reject if target type isn't the same as the setop target type */
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/setrefs.c:2040:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*root.grouping_map’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/setrefs.c:3553:1: enter_function: entry to ‘extract_query_dependencies’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/setrefs.c:3569:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/setrefs.c:3570:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/setrefs.c:3573:16: call_function: calling ‘extract_query_dependencies_walker’ from ‘extract_query_dependencies’
# 2038| {
# 2039| GroupingFunc *g = (GroupingFunc *) node;
# 2040|-> AttrNumber *grouping_map = root->grouping_map;
# 2041|
# 2042| /* If there are no grouping sets, we don't need this. */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/plan/setrefs.c:2136: warning[nullPointer]: Possible null pointer dereference: bestplan
# 2134|
# 2135| /* Mark the subplan we selected */
# 2136|-> root->isUsedSubplan[bestplan->plan_id - 1] = true;
# 2137|
# 2138| return (Node *) bestplan;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:121:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘target_rte’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:80:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:105:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:106:12: branch_false: following ‘false’ branch (when ‘command_type != 3’)...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:108:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:108:17: branch_false: following ‘false’ branch (when ‘command_type != 2’)...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:119:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:121:18: danger: dereference of NULL ‘target_rte’
# 119| if ((command_type == CMD_UPDATE || command_type == CMD_DELETE ||
# 120| command_type == CMD_MERGE) &&
# 121|-> !target_rte->inh)
# 122| {
# 123| /* row-identity logic expects to add stuff to processed_tlist */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:398:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:64:1: enter_function: entry to ‘preprocess_targetlist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:80:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:105:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:106:12: branch_true: following ‘true’ branch (when ‘command_type == 3’)...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:107:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/preptlist.c:107:25: call_function: calling ‘expand_insert_targetlist’ from ‘preprocess_targetlist’
# 396| * sure we have all the user attributes in the right order.
# 397| */
# 398|-> numattrs = RelationGetNumberOfAttributes(rel);
# 399|
# 400| for (attrno = 1; attrno <= numattrs; attrno++)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1584:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘curColType’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1570:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1577:17: branch_true: following ‘true’ branch (when ‘subtlist’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1577:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1584:64: danger: dereference of NULL ‘curColType’
# 1582| continue;
# 1583| Assert(curColType != NULL);
# 1584|-> if (exprType((Node *) subtle->expr) == lfirst_oid(curColType))
# 1585| {
# 1586| /* If first subplan, copy the typmod; else compare */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1698:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1674:1: enter_function: entry to ‘generate_setop_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1680:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_grouplist’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1681:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1681:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1686:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1698:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/optimizer/prep/prepunion.c:1698:17: danger: dereference of NULL ‘lg’
# 1696| /* non-resjunk columns should have grouping clauses */
# 1697| Assert(lg != NULL);
# 1698|-> sgc = (SortGroupClause *) lfirst(lg);
# 1699| lg = lnext(grouplist, lg);
# 1700| Assert(sgc->tleSortGroupRef == 0);
Error: COMPILER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/optimizer/util/clauses.c: scope_hint: In function ‘recheck_cast_function_args.isra.0’
postgresql-18.3/postgresql-17.9/src/backend/optimizer/util/clauses.c:4399:19: warning[-Wmaybe-uninitialized]: ‘actual_arg_types’ may be used uninitialized
# 4399 | rettype = enforce_generic_type_consistency(actual_arg_types,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 4400 | declared_arg_types,
# | ~~~~~~~~~~~~~~~~~~~
# 4401 | nargs,
# | ~~~~~~
# 4402 | funcform->prorettype,
# | ~~~~~~~~~~~~~~~~~~~~~
# 4403 | false);
# | ~~~~~~
postgresql-18.3/postgresql-17.9/src/backend/optimizer/util/clauses.c:42: included_from: Included from here.
postgresql-18.3/postgresql-17.9/src/include/parser/parse_coerce.h:85:17: note: by argument 1 of type ‘const Oid *’ to ‘enforce_generic_type_consistency’ declared here
# 85 | extern Oid enforce_generic_type_consistency(const Oid *actual_arg_types,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/src/backend/optimizer/util/clauses.c:4385:33: note: ‘actual_arg_types’ declared here
# 4385 | Oid actual_arg_types[FUNC_MAX_ARGS];
# | ^~~~~~~~~~~~~~~~
# 4397| Assert(nargs == pronargs);
# 4398| memcpy(declared_arg_types, proargtypes, pronargs * sizeof(Oid));
# 4399|-> rettype = enforce_generic_type_consistency(actual_arg_types,
# 4400| declared_arg_types,
# 4401| nargs,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/parser/gram.y:16928: error[legacyUninitvar]: Uninitialized variable: encoding
#16926| errmsg("unrecognized JSON encoding: %s", $4));
#16927|
#16928|-> $$ = (Node *) makeJsonFormat(JS_FORMAT_JSON, encoding, @1);
#16929| }
#16930| | FORMAT_LA JSON
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/parser/gram.y:17372: error[legacyUninitvar]: Uninitialized variable: n
#17370| n->rolename = pstrdup($1);
#17371| }
#17372|-> $$ = n;
#17373| }
#17374| | CURRENT_ROLE
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:972:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h_cell’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:955:1: enter_function: entry to ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:958:30: call_function: inlined call to ‘list_head’ from ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:959:40: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:959:30: call_function: inlined call to ‘list_head’ from ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:964:34: call_function: inlined call to ‘list_length’ from ‘assign_hypothetical_collations’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:970:16: branch_true: following ‘true’ branch (when ‘extra_args > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:972:58: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_collate.c:972:58: danger: dereference of NULL ‘h_cell’
# 970| while (extra_args-- > 0)
# 971| {
# 972|-> (void) assign_collations_walker((Node *) lfirst(h_cell), loccontext);
# 973| h_cell = lnext(aggref->aggdirectargs, h_cell);
# 974| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_cte.c:1122:74: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_cte.c:1207:1: enter_function: entry to ‘checkWellFormedSelectStmt’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_cte.c:1231:33: call_function: calling ‘checkWellFormedRecursionWalker’ from ‘checkWellFormedSelectStmt’
# 1120| /* note that recursion could mutate innerwiths list */
# 1121| cell1 = list_head(cstate->innerwiths);
# 1122|-> lfirst(cell1) = lappend((List *) lfirst(cell1), cte);
# 1123| }
# 1124| checkWellFormedSelectStmt(stmt, cstate);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2014:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2008:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2010:20: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2010:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2012:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2008:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2010:20: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2014:70: danger: dereference of NULL ‘lc’
# 2012| if (i >= numposargs)
# 2013| {
# 2014|-> appendStringInfo(&argbuf, "%s => ", (char *) lfirst(lc));
# 2015| lc = lnext(argnames, lc);
# 2016| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_func.c:2271: warning[uninitvar]: Uninitialized variable: argoids
# 2269| */
# 2270| oid = LookupFuncNameInternal(func->args_unspecified ? objtype : OBJECT_ROUTINE,
# 2271|-> func->objname, nargs, argoids,
# 2272| false, missing_ok,
# 2273| &lookupError);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2966:77: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘aliasp_item’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2659:1: enter_function: entry to ‘expandRTE’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2665:12: branch_true: following ‘true’ branch (when ‘colnames’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2666:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2667:12: branch_false: following ‘false’ branch (when ‘colvars’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2670:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2945:59: call_function: inlined call to ‘list_head’ from ‘expandRTE’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2951:33: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2951:33: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2961:44: branch_true: following ‘true’ branch (when ‘colnames’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2964:52: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2964:52: branch_true: following ‘true’ branch (when ‘coltype != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2966:77: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_relation.c:2966:77: danger: dereference of NULL ‘aliasp_item’
# 2964| if (OidIsValid(coltype))
# 2965| {
# 2966|-> char *label = strVal(lfirst(aliasp_item));
# 2967|
# 2968| *colnames = lappend(*colnames,
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10861:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10740:10: enter_function: entry to ‘core_yyrestart’
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10745:16: call_function: calling ‘core_yyensure_buffer_stack’ from ‘core_yyrestart’
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10745:16: return_function: returning to ‘core_yyrestart’ from ‘core_yyensure_buffer_stack’
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10747:27: call_function: calling ‘core_yy_create_buffer’ from ‘core_yyrestart’
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10747:27: return_function: returning to ‘core_yyrestart’ from ‘core_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10750:2: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10750:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/scan.c:10750:2: call_function: calling ‘core_yy_init_buffer’ from ‘core_yyrestart’
#10859|
#10860| yy_flush_buffer( b , yyscanner);
#10861|->
#10862| b->yy_input_file = file;
#10863| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4039:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:3983:1: enter_function: entry to ‘get_qual_for_hash’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4020:26: call_function: inlined call to ‘list_head’ from ‘get_qual_for_hash’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4023:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4023:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4028:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4028:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4039:43: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4039:43: danger: dereference of NULL ‘partexprs_item’
# 4037| else
# 4038| {
# 4039|-> keyCol = (Node *) copyObject(lfirst(partexprs_item));
# 4040| partexprs_item = lnext(key->partexprs, partexprs_item);
# 4041| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2516:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘start’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2496:1: enter_function: entry to ‘get_steps_using_prefix_recurse’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2520:12: branch_true: following ‘true’ branch (when ‘cur_keyno < final_keyno’)...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2530:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2534:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2530:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2546:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2546:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2546:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2553:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2556:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2570:37: call_function: calling ‘get_steps_using_prefix_recurse’ from ‘get_steps_using_prefix_recurse’
# 2514|
# 2515| Assert(start != NULL);
# 2516|-> cur_keyno = ((PartClauseInfo *) lfirst(start))->keyno;
# 2517| final_keyno = ((PartClauseInfo *) llast(prefix))->keyno;
# 2518|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:2696: warning[uninitvar]: Uninitialized variable: isnull
# 2694|
# 2695| rowHash = compute_partition_hash_value(partnatts, partsupfunc, partcollation,
# 2696|-> values, isnull);
# 2697|
# 2698| greatest_modulus = boundinfo->nindexes;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3488:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc2’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3416:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3433:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3434:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3440:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3440:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3447:42: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3454:20: branch_false: following ‘false’ branch (when ‘keyno <= nvalues’)...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3457:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3457:20: branch_true: following ‘true’ branch (when ‘lc1’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3464:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3475:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3488:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3488:25: danger: dereference of NULL ‘lc2’
# 3486|
# 3487| /* Set up the stepcmpfuncs entry, unless we already did */
# 3488|-> cmpfn = lfirst_oid(lc2);
# 3489| Assert(OidIsValid(cmpfn));
# 3490| if (cmpfn != context->stepcmpfuncs[stateidx].fn_oid)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partprune.c:3532:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[0]’
# 3530|
# 3531| case PARTITION_STRATEGY_LIST:
# 3532|-> return get_matching_list_bounds(context,
# 3533| opstep->opstrategy,
# 3534| values[0], nvalues,
Error: GCC_ANALYZER_WARNING:
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:240:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:221:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:223:46: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:236:17: release_resource: closed here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:238:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:240:32: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:240:32: danger: ‘1’ could be invalid
# 238| if (fd != -1)
# 239| {
# 240|-> (void) dup2(fd, STDOUT_FILENO);
# 241| (void) dup2(fd, STDERR_FILENO);
# 242| close(fd);
Error: GCC_ANALYZER_WARNING:
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:241:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:221:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:223:46: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:237:17: release_resource: closed here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:238:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:240:32: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:241:32: danger: ‘2’ could be invalid
# 239| {
# 240| (void) dup2(fd, STDOUT_FILENO);
# 241|-> (void) dup2(fd, STDERR_FILENO);
# 242| close(fd);
# 243| }
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:737:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(syslogPipe[1], 1)’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:595:1: enter_function: entry to ‘SysLogger_Start’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:603:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:624:13: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:666:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:666:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:709:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:719:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:719:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:730:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:737:21: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:737:20: danger: ‘dup2(syslogPipe[1], 1)’ leaks here; was opened at [(13)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/12)
# 735| #ifndef WIN32
# 736| fflush(stdout);
# 737|-> if (dup2(syslogPipe[1], STDOUT_FILENO) < 0)
# 738| ereport(FATAL,
# 739| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:742:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(syslogPipe[1], 2)’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:595:1: enter_function: entry to ‘SysLogger_Start’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:603:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:624:13: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:666:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:666:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:709:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:719:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:719:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:730:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:737:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:741:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:742:21: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/backend/postmaster/syslogger.c:742:20: danger: ‘dup2(syslogPipe[1], 2)’ leaks here; was opened at [(15)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/14)
# 740| errmsg("could not redirect stdout: %m")));
# 741| fflush(stderr);
# 742|-> if (dup2(syslogPipe[1], STDERR_FILENO) < 0)
# 743| ereport(FATAL,
# 744| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:1021:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:985:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:990:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:1002:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:1004:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:1006:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:1009:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/regex/rege_dfa.c:1021:25: danger: dereference of NULL ‘lastap.ss’
# 1019| lastap = ap;
# 1020| assert(ap.ss != NULL);
# 1021|-> lastap.ss->inchain[lastap.co] = ss->inchain[i];
# 1022| }
# 1023| ss->outs[i] = NULL;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/logical/reorderbuffer.c:4894: error[legacyUninitvar]: Uninitialized variable: chunksize
# 4892| elog(ERROR, "unexpected type of toast chunk");
# 4893|
# 4894|-> ent->size += chunksize;
# 4895| ent->last_chunk_seq = chunk_seq;
# 4896| ent->num_chunks++;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1107:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1071:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1094:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1096:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1105:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1107:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1107:9: danger: use of uninitialized value ‘yyss’ here
# 1105| if (! yyptr)
# 1106| YYNOMEM;
# 1107|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1108| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1109| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:102:68: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].node’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:102:68: danger: use of uninitialized value ‘yyvsp[2305843009213693951].node’ here
# 100| firstcmd: command opt_semicolon
# 101| {
# 102|-> replication_parse_result = $1;
# 103| }
# 104| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:159:77: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:159:77: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 157| var_name: IDENT { $$ = $1; }
# 158| | var_name '.' IDENT
# 159|-> { $$ = psprintf("%s.%s", $1, $3); }
# 160| ;
# 161|
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:186:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:184:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:186:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 184| cmd = makeNode(CreateReplicationSlotCmd);
# 185| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 186|-> cmd->slotname = $2;
# 187| cmd->temporary = $3;
# 188| cmd->options = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:187:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:184:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:187:58: danger: out-of-bounds read at bit -64 but ‘yyvsa’ starts at bit 0
# 185| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 186| cmd->slotname = $2;
# 187|-> cmd->temporary = $3;
# 188| cmd->options = $5;
# 189| $$ = (Node *) cmd;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:197:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:195:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:197:57: danger: out-of-bounds read from byte -24 till byte -17 but ‘yyvsa’ starts at byte 0
# 195| cmd = makeNode(CreateReplicationSlotCmd);
# 196| cmd->kind = REPLICATION_KIND_LOGICAL;
# 197|-> cmd->slotname = $2;
# 198| cmd->temporary = $3;
# 199| cmd->plugin = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:198:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:195:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:198:58: danger: out-of-bounds read at bit -128 but ‘yyvsa’ starts at bit 0
# 196| cmd->kind = REPLICATION_KIND_LOGICAL;
# 197| cmd->slotname = $2;
# 198|-> cmd->temporary = $3;
# 199| cmd->plugin = $5;
# 200| cmd->options = $6;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:206:129: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:206:129: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 204|
# 205| create_slot_options:
# 206|-> '(' generic_option_list ')' { $$ = $2; }
# 207| | create_slot_legacy_opt_list { $$ = $1; }
# 208| ;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:212:78: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:212:78: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 210| create_slot_legacy_opt_list:
# 211| create_slot_legacy_opt_list create_slot_legacy_opt
# 212|-> { $$ = lappend($1, $2); }
# 213| | /* EMPTY */
# 214| { $$ = NIL; }
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:271:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:270:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:271:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 269| AlterReplicationSlotCmd *cmd;
# 270| cmd = makeNode(AlterReplicationSlotCmd);
# 271|-> cmd->slotname = $2;
# 272| cmd->options = $4;
# 273| $$ = (Node *) cmd;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:287:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:285:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:287:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 285| cmd = makeNode(StartReplicationCmd);
# 286| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 287|-> cmd->slotname = $2;
# 288| cmd->startpoint = $4;
# 289| cmd->timeline = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:301:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:999:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:299:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:301:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 299| cmd = makeNode(StartReplicationCmd);
# 300| cmd->kind = REPLICATION_KIND_LOGICAL;
# 301|-> cmd->slotname = $3;
# 302| cmd->startpoint = $5;
# 303| cmd->options = $6;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:367:117: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:367:117: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 365|
# 366| plugin_options:
# 367|-> '(' plugin_opt_list ')' { $$ = $2; }
# 368| | /* EMPTY */ { $$ = NIL; }
# 369| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:378:56: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:378:56: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 376| | plugin_opt_list ',' plugin_opt_elem
# 377| {
# 378|-> $$ = lappend($1, $3);
# 379| }
# 380| ;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:385:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:385:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 383| IDENT plugin_opt_arg
# 384| {
# 385|-> $$ = makeDefElem($1, $2, -1);
# 386| }
# 387| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:396:78: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:396:78: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 394| generic_option_list:
# 395| generic_option_list ',' generic_option
# 396|-> { $$ = lappend($1, $3); }
# 397| | generic_option
# 398| { $$ = list_make1($1); }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:408:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:408:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 406| | ident_or_keyword IDENT
# 407| {
# 408|-> $$ = makeDefElem($1, (Node *) makeString($2), -1);
# 409| }
# 410| | ident_or_keyword SCONST
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:412:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:412:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 410| | ident_or_keyword SCONST
# 411| {
# 412|-> $$ = makeDefElem($1, (Node *) makeString($2), -1);
# 413| }
# 414| | ident_or_keyword UCONST
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:416:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1150:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1153:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1162:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1174:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1181:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1184:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1194:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1201:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1065:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1129:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1132:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1144:6: branch_true: following ‘true’ branch (when ‘yyn == -36’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1145:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1214:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.c:1216:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_gram.y:416:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 414| | ident_or_keyword UCONST
# 415| {
# 416|-> $$ = makeDefElem($1, (Node *) makeInteger($2), -1);
# 417| }
# 418| ;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_scanner.c:2009:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_scanner.l:296:1: enter_function: entry to ‘replication_scanner_is_replication_command’
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_scanner.l:298:22: call_function: calling ‘replication_yylex’ from ‘replication_scanner_is_replication_command’
# 2007| /* yy_ch_buf has to be 2 characters longer than the size given because
# 2008| * we need to put in 2 end-of-buffer characters.
# 2009|-> */
# 2010| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 2011| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_scanner.c:2050: warning[nullPointer]: Possible null pointer dereference: b
# 2048|
# 2049| yy_flush_buffer( b );
# 2050|->
# 2051| b->yy_input_file = file;
# 2052| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/replication/repl_scanner.c:2051: warning[nullPointer]: Possible null pointer dereference: b
# 2049| yy_flush_buffer( b );
# 2050|
# 2051|-> b->yy_input_file = file;
# 2052| b->yy_fill_buffer = 1;
# 2053|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:980:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:938:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:944:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:967:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:969:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:978:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:980:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:980:9: danger: use of uninitialized value ‘yyss’ here
# 978| if (! yyptr)
# 979| YYNOMEM;
# 980|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 981| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 982| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.y:62:102: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:938:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1002:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1002:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1005:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1017:6: branch_false: following ‘false’ branch (when ‘yyn != -10’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1023:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1023:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1026:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1035:11: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1047:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1054:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1057:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1067:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1067:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1074:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:938:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1002:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1002:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1005:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1017:6: branch_true: following ‘true’ branch (when ‘yyn == -10’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1018:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1087:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.c:1089:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_gram.y:62:102: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 60| standby_config:
# 61| standby_list { $$ = create_syncrep_config("1", $1, SYNC_REP_PRIORITY); }
# 62|-> | NUM '(' standby_list ')' { $$ = create_syncrep_config($1, $3, SYNC_REP_PRIORITY); }
# 63| | ANY NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_QUORUM); }
# 64| | FIRST NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_PRIORITY); }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1644:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1631:21: enter_function: entry to ‘syncrep_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1635:24: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1636:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1639:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1644:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1642| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1643| * we need to put in 2 end-of-buffer characters.
# 1644|-> */
# 1645| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1646| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1685: warning[nullPointer]: Possible null pointer dereference: b
# 1683|
# 1684| yy_flush_buffer( b );
# 1685|->
# 1686| b->yy_input_file = file;
# 1687| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1686: warning[nullPointer]: Possible null pointer dereference: b
# 1684| yy_flush_buffer( b );
# 1685|
# 1686|-> b->yy_input_file = file;
# 1687| b->yy_fill_buffer = 1;
# 1688|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1899:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1883:17: enter_function: entry to ‘syncrep_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1892:24: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1893:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1893:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/replication/syncrep_scanner.c:1901:6: call_function: calling ‘syncrep_yy_scan_buffer’ from ‘syncrep_yy_scan_bytes’
# 1897| for ( i = 0; i < _yybytes_len; ++i )
# 1898| buf[i] = yybytes[i];
# 1899|->
# 1900| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1901|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:795:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1370:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1397:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1401:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1429:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1433:29: release_memory: ‘expr’ is NULL
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1438:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1445:29: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1445:29: call_function: calling ‘dependency_is_compatible_clause’ from ‘dependencies_clauselist_selectivity’
# 793| /* OK to proceed with checking "var" */
# 794| }
# 795|-> else if (IsA(clause, ScalarArrayOpExpr))
# 796| {
# 797| /* If it's a scalar array operator, check for Var IN Const. */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1223:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1168:1: enter_function: entry to ‘dependency_is_compatible_expression’
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1174:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1179:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1179:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1183:36: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1183:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1186:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1189:13: call_function: inlined call to ‘is_opclause’ from ‘dependency_is_compatible_expression’
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1223:18: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/statistics/dependencies.c:1223:18: danger: dereference of NULL ‘clause’
# 1221| /* OK to proceed with checking "var" */
# 1222| }
# 1223|-> else if (IsA(clause, ScalarArrayOpExpr))
# 1224| {
# 1225| /* If it's a scalar array operator, check for Var IN Const. */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/statistics/mcv.c:1710:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/postgresql-17.9/src/backend/statistics/mcv.c:2126:1: enter_function: entry to ‘mcv_clause_selectivity_or’
postgresql-18.3/postgresql-17.9/src/backend/statistics/mcv.c:2140:23: call_function: calling ‘mcv_get_match_bitmap’ from ‘mcv_clause_selectivity_or’
# 1708| }
# 1709| }
# 1710|-> else if (IsA(clause, ScalarArrayOpExpr))
# 1711| {
# 1712| ScalarArrayOpExpr *expr = (ScalarArrayOpExpr *) clause;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/statistics/mvdistinct.c:365:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/statistics/mvdistinct.c:355:1: enter_function: entry to ‘pg_ndistinct_out’
postgresql-18.3/postgresql-17.9/src/backend/statistics/mvdistinct.c:358:30: call_function: calling ‘statext_ndistinct_deserialize’ from ‘pg_ndistinct_out’
postgresql-18.3/postgresql-17.9/src/backend/statistics/mvdistinct.c:358:30: return_function: returning to ‘pg_ndistinct_out’ from ‘statext_ndistinct_deserialize’
postgresql-18.3/postgresql-17.9/src/backend/statistics/mvdistinct.c:365:25: danger: dereference of NULL ‘statext_ndistinct_deserialize(pg_detoast_datum_packed((char *)*fcinfo.args[0].value))’
# 363| appendStringInfoChar(&str, '{');
# 364|
# 365|-> for (i = 0; i < ndist->nitems; i++)
# 366| {
# 367| int j;
Error: CPPCHECK_WARNING (CWE-909):
postgresql-18.3/postgresql-17.9/src/backend/storage/lmgr/lmgr.c:723: error[uninitStructMember]: Uninitialized struct member: callback.previous
# 721|
# 722| if (oper != XLTW_None)
# 723|-> error_context_stack = callback.previous;
# 724| }
# 725|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:524:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:736:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:736:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
# 522| {
# 523| itemidptr = &itemidbase[i];
# 524|-> if (upper != itemidptr->itemoff + itemidptr->alignedlen)
# 525| break;
# 526| upper -= itemidptr->alignedlen;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:495:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1610:1: enter_function: entry to ‘_mdfd_getseg’
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1625:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1632:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1632:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1642:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1652:18: branch_true: following ‘true’ branch (when ‘nextsegno <= targetseg’)...
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1654:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1654:39: call_function: calling ‘_mdnblocks’ from ‘_mdfd_getseg’
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1654:39: return_function: returning to ‘_mdfd_getseg’ from ‘_mdnblocks’
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1659:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1662:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/storage/smgr/md.c:1684:33: call_function: calling ‘mdextend’ from ‘_mdfd_getseg’
# 493| Assert(seekpos < (off_t) BLCKSZ * RELSEG_SIZE);
# 494|
# 495|-> if ((nbytes = FileWrite(v->mdfd_vfd, buffer, BLCKSZ, seekpos, WAIT_EVENT_DATA_FILE_EXTEND)) != BLCKSZ)
# 496| {
# 497| if (nbytes < 0)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/dict_synonym.c:230: error[uninitvar]: Uninitialized variables: &key.outlen, &key.flags
# 228| key.out = NULL;
# 229|
# 230|-> found = (Syn *) bsearch(&key, d->syn, d->len, sizeof(Syn), compareSyn);
# 231| pfree(key.in);
# 232|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/ts_parse.c:82:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘res’
postgresql-18.3/postgresql-17.9/src/backend/tsearch/ts_parse.c:540:1: enter_function: entry to ‘hlparsetext’
postgresql-18.3/postgresql-17.9/src/backend/tsearch/ts_parse.c:590:38: call_function: calling ‘LexizeExec’ from ‘hlparsetext’
# 80| else
# 81| list->head = list->tail = newpl;
# 82|-> newpl->next = NULL;
# 83| }
# 84|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser.c:196: error[nullPointer]: Null pointer dereference: lex
# 194| }
# 195| st->list[st->cur].lexeme = palloc(llen + 1);
# 196|-> memcpy(st->list[st->cur].lexeme, lex, llen);
# 197| st->list[st->cur].lexeme[llen] = '\0';
# 198| st->list[st->cur].type = type;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:454: error[ctunullpointer]: Null pointer dereference: prs
# 452| * an alpha character, but not a member of other char classes.
# 453| */
# 454|-> p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:454: warning[nullPointer]: Possible null pointer dereference: prs
# 452| * an alpha character, but not a member of other char classes.
# 453| */
# 454|-> p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:455: error[ctunullpointer]: Null pointer dereference: prs
# 453| */
# 454| p_iswhat(alnum, 1)
# 455|-> p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:455: warning[nullPointer]: Possible null pointer dereference: prs
# 453| */
# 454| p_iswhat(alnum, 1)
# 455|-> p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:456: error[ctunullpointer]: Null pointer dereference: prs
# 454| p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456|-> p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:456: warning[nullPointer]: Possible null pointer dereference: prs
# 454| p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456|-> p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:457: error[ctunullpointer]: Null pointer dereference: prs
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457|-> p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:457: warning[nullPointer]: Possible null pointer dereference: prs
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457|-> p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:458: error[ctunullpointer]: Null pointer dereference: prs
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458|-> p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:458: warning[nullPointer]: Possible null pointer dereference: prs
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458|-> p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:459: error[ctunullpointer]: Null pointer dereference: prs
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459|-> p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:459: warning[nullPointer]: Possible null pointer dereference: prs
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459|-> p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:460: error[ctunullpointer]: Null pointer dereference: prs
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460|-> p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:460: warning[nullPointer]: Possible null pointer dereference: prs
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460|-> p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:461: error[ctunullpointer]: Null pointer dereference: prs
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461|-> p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
# 463|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:461: warning[nullPointer]: Possible null pointer dereference: prs
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461|-> p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
# 463|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:462: error[ctunullpointer]: Null pointer dereference: prs
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462|-> p_iswhat(xdigit, 0)
# 463|
# 464| /* p_iseq should be used only for ascii symbols */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:462: warning[nullPointer]: Possible null pointer dereference: prs
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462|-> p_iswhat(xdigit, 0)
# 463|
# 464| /* p_iseq should be used only for ascii symbols */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:470: error[ctunullpointer]: Null pointer dereference: prs
# 468| {
# 469| Assert(prs->state);
# 470|-> return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
# 471| }
# 472|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:470: warning[nullPointer]: Possible null pointer dereference: prs
# 468| {
# 469| Assert(prs->state);
# 470|-> return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
# 471| }
# 472|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:477: error[ctunullpointer]: Null pointer dereference: prs
# 475| {
# 476| Assert(prs->state);
# 477|-> return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
# 478| }
# 479|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:477: warning[nullPointer]: Possible null pointer dereference: prs
# 475| {
# 476| Assert(prs->state);
# 477|-> return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
# 478| }
# 479|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:483: warning[nullPointer]: Possible null pointer dereference: prs
# 481| p_iseqC(TParser *prs)
# 482| {
# 483|-> return p_iseq(prs, prs->c);
# 484| }
# 485|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/tsearch/wparser_def.c:489: warning[nullPointer]: Possible null pointer dereference: prs
# 487| p_isneC(TParser *prs)
# 488| {
# 489|-> return !p_iseq(prs, prs->c);
# 490| }
# 491|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/activity/backend_status.c:1108: error[uninitvar]: Uninitialized variables: &key.backendStatus, &key.backend_xid, &key.backend_xmin, &key.backend_subxact_count, &key.backend_subxact_overflowed
# 1106| */
# 1107| key.proc_number = procNumber;
# 1108|-> return bsearch(&key, localBackendStatusTable, localNumBackends,
# 1109| sizeof(LocalPgBackendStatus), cmp_lbestatus);
# 1110| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:1351: warning[uninitvar]: Uninitialized variable: dim
# 1349|
# 1350| /* This checks for overflow of array dimensions */
# 1351|-> nitems = ArrayGetNItems(ndim, dim);
# 1352| ArrayCheckBounds(ndim, dim, lBound);
# 1353|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:1352: warning[uninitvar]: Uninitialized variable: lBound
# 1350| /* This checks for overflow of array dimensions */
# 1351| nitems = ArrayGetNItems(ndim, dim);
# 1352|-> ArrayCheckBounds(ndim, dim, lBound);
# 1353|
# 1354| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:1697: warning[uninitvar]: Uninitialized variable: buf
# 1695| }
# 1696|
# 1697|-> PG_RETURN_TEXT_P(cstring_to_text(buf));
# 1698| }
# 1699|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:2902: warning[uninitvar]: Uninitialized variable: dim
# 2900|
# 2901| /* complain if too few source items; we ignore extras, however */
# 2902|-> if (nelems < ArrayGetNItems(nSubscripts, dim))
# 2903| ereport(ERROR,
# 2904| (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3778:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3773:18: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3773:18: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3776:16: branch_true: following ‘true’ branch (when ‘nelems > 7’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3778:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3778:21: danger: dereference of NULL ‘bitmap’
# 3776| while (nelems >= 8)
# 3777| {
# 3778|-> if (*bitmap != 0xFF)
# 3779| return true;
# 3780| bitmap++;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3788:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3773:18: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3773:18: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3776:16: branch_false: following ‘false’ branch (when ‘nelems <= 7’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3776:16: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3786:16: branch_true: following ‘true’ branch (when ‘nelems > 0’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3788:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:3788:22: danger: dereference of NULL ‘bitmap’
# 3786| while (nelems > 0)
# 3787| {
# 3788|-> if ((*bitmap & bitmask) == 0)
# 3789| return true;
# 3790| bitmask <<= 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:4974:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘destbitmap’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5697:1: enter_function: entry to ‘makeArrayResultArr’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5707:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5718:54: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5744:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5745:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5745:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5745:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/arrayfuncs.c:5745:25: call_function: calling ‘array_bitmap_copy’ from ‘makeArrayResultArr’
# 4972| destbitmap += destoffset / 8;
# 4973| destbitmask = 1 << (destoffset % 8);
# 4974|-> destbitval = *destbitmap;
# 4975| if (srcbitmap)
# 4976| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/dbsize.c:607: warning[uninitvar]: Uninitialized variable: buf
# 605| }
# 606|
# 607|-> PG_RETURN_TEXT_P(cstring_to_text(buf));
# 608| }
# 609|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/inet_cidr_ntop.c:285: warning[uninitvar]: Uninitialized variable: outbuf
# 283| /* Format CIDR /width. */
# 284| (void) SPRINTF((cp, "/%u", bits));
# 285|-> if (strlen(outbuf) + 1 > size)
# 286| goto emsgsize;
# 287| strcpy(dst, outbuf);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonb.c:101: error[legacyUninitvar]: Uninitialized variable: nbytes
# 99| elog(ERROR, "unsupported jsonb version number %d", version);
# 100|
# 101|-> return jsonb_from_cstring(str, nbytes, false, NULL);
# 102| }
# 103|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonb.c:101: error[legacyUninitvar]: Uninitialized variable: str
# 99| elog(ERROR, "unsupported jsonb version number %d", version);
# 100|
# 101|-> return jsonb_from_cstring(str, nbytes, false, NULL);
# 102| }
# 103|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonbsubs.c:152: error[legacyUninitvar]: Uninitialized variable: subExpr
# 150| }
# 151|
# 152|-> upperIndexpr = lappend(upperIndexpr, subExpr);
# 153| }
# 154|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonfuncs.c:5815: warning[nullPointer]: Possible null pointer dereference: res
# 5813| }
# 5814|
# 5815|-> if (res->type == jbvArray)
# 5816| res->val.array.rawScalar = is_scalar;
# 5817|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath.c:127: error[legacyUninitvar]: Uninitialized variable: nbytes
# 125| elog(ERROR, "unsupported jsonpath version number: %d", version);
# 126|
# 127|-> return jsonPathFromCstring(str, nbytes, NULL);
# 128| }
# 129|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath.c:127: error[legacyUninitvar]: Uninitialized variable: str
# 125| elog(ERROR, "unsupported jsonpath version number: %d", version);
# 126|
# 127|-> return jsonPathFromCstring(str, nbytes, NULL);
# 128| }
# 129|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_exec.c:1318: error[legacyUninitvar]: Uninitialized variable: datum
# 1316| jb = &jbv;
# 1317| jb->type = jbvNumeric;
# 1318|-> jb->val.numeric = DatumGetNumeric(DirectFunctionCall1(int8_numeric,
# 1319| datum));
# 1320|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_exec.c:1391: error[legacyUninitvar]: Uninitialized variable: bval
# 1389| jb = &jbv;
# 1390| jb->type = jbvBool;
# 1391|-> jb->val.boolean = bval;
# 1392|
# 1393| res = executeNextItem(cxt, jsp, NULL, jb, found, true);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_exec.c:1598: error[legacyUninitvar]: Uninitialized variable: datum
# 1596| jb = &jbv;
# 1597| jb->type = jbvNumeric;
# 1598|-> jb->val.numeric = DatumGetNumeric(DirectFunctionCall1(int4_numeric,
# 1599| datum));
# 1600|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1234:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1192:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1198:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1221:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1223:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1232:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1234:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1234:9: danger: use of uninitialized value ‘yyss’ here
# 1232| if (! yyptr)
# 1233| YYNOMEM;
# 1234|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1235| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1236| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1361:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1192:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1256:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1256:6: branch_false: following ‘false’ branch (when ‘yystate != 5’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1259:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1271:6: branch_false: following ‘false’ branch (when ‘yyn != -47’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1277:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1277:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1280:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1311:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1315:7: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_gram.c:1361:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1359| unconditionally makes the parser a bit smaller, and it avoids a
# 1360| GCC warning that YYVAL may be used uninitialized. */
# 1361|-> yyval = yyvsp[1-yylen];
# 1362|
# 1363|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5369: warning[nullPointer]: Possible null pointer dereference: b
# 5367|
# 5368| yy_flush_buffer( b );
# 5369|->
# 5370| b->yy_input_file = file;
# 5371| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5369:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5253:10: enter_function: entry to ‘jsonpath_yyrestart’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5257:16: call_function: calling ‘jsonpath_yyensure_buffer_stack’ from ‘jsonpath_yyrestart’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5257:16: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yyensure_buffer_stack’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5259:27: call_function: calling ‘jsonpath_yy_create_buffer’ from ‘jsonpath_yyrestart’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5259:27: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5262:2: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5262:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5262:2: call_function: calling ‘jsonpath_yy_init_buffer’ from ‘jsonpath_yyrestart’
# 5367|
# 5368| yy_flush_buffer( b );
# 5369|->
# 5370| b->yy_input_file = file;
# 5371| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/jsonpath_scan.c:5370: warning[nullPointer]: Possible null pointer dereference: b
# 5368| yy_flush_buffer( b );
# 5369|
# 5370|-> b->yy_input_file = file;
# 5371| b->yy_fill_buffer = 1;
# 5372|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:510: warning[nullPointer]: Possible null pointer dereference: blocked_instance
# 508|
# 509| lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
# 510|-> conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
# 511|
# 512| /* Now scan the PROCLOCK data for conflicting procs */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:510:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘blocked_instance’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:483:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:485:43: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:497:29: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:509:58: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/lockfuncs.c:510:61: danger: dereference of NULL ‘blocked_instance’
# 508|
# 509| lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
# 510|-> conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
# 511|
# 512| /* Now scan the PROCLOCK data for conflicting procs */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/misc.c:760: warning[uninitvar]: Uninitialized variable: values
# 758| }
# 759|
# 760|-> return HeapTupleGetDatum(heap_form_tuple(tupdesc, values, isnull));
# 761| }
# 762|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/pg_locale.c:1384: error[legacyUninitvar]: Uninitialized variable: localeptr
# 1382| default_locale.provider);
# 1383|
# 1384|-> if (strcmp(localeptr, "C") == 0)
# 1385| result = true;
# 1386| else if (strcmp(localeptr, "POSIX") == 0)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/pg_locale.c:1450: error[legacyUninitvar]: Uninitialized variable: localeptr
# 1448| default_locale.provider);
# 1449|
# 1450|-> if (strcmp(localeptr, "C") == 0)
# 1451| result = true;
# 1452| else if (strcmp(localeptr, "POSIX") == 0)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/pg_locale.c:2138: error[legacyUninitvar]: Uninitialized variable: result
# 2136| PGLOCALE_SUPPORT_ERROR(locale->provider);
# 2137|
# 2138|-> return result;
# 2139| }
# 2140|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/pg_locale.c:2174: error[legacyUninitvar]: Uninitialized variable: result
# 2172| PGLOCALE_SUPPORT_ERROR(locale->provider);
# 2173|
# 2174|-> return result;
# 2175| }
# 2176|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/rangetypes.c:2546: error[ctunullpointer]: Null pointer dereference: value
# 2544|
# 2545| /* Detect whether we need double quotes for this value */
# 2546|-> nq = (value[0] == '\0'); /* force quotes for empty string */
# 2547| for (ptr = value; *ptr; ptr++)
# 2548| {
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:2169:21: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘vardata.statsTuple’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7649:1: enter_function: entry to ‘gincostestimate’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7655:34: call_function: calling ‘get_quals_from_indexclauses’ from ‘gincostestimate’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7655:34: return_function: returning to ‘gincostestimate’ from ‘get_quals_from_indexclauses’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7786:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7791:17: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7796:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7806:33: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7806:33: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7810:115: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/selfuncs.c:7808:49: call_function: calling ‘gincost_scalararrayopexpr’ from ‘gincostestimate’
# 2167|
# 2168| examine_variable(root, arrayexpr, 0, &vardata);
# 2169|-> if (HeapTupleIsValid(vardata.statsTuple))
# 2170| {
# 2171| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/timestamp.c:3162: error[legacyUninitvar]: Uninitialized variable: result
# 3160| }
# 3161|
# 3162|-> PG_RETURN_TIMESTAMP(result);
# 3163| }
# 3164|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/timestamp.c:3317: error[legacyUninitvar]: Uninitialized variable: result
# 3315| }
# 3316|
# 3317|-> return result;
# 3318| }
# 3319|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/varlena.c:464: warning[nullPointer]: Possible null pointer dereference: rp
# 462| rp = result = NULL; /* keep compiler quiet */
# 463| }
# 464|-> *rp = '\0';
# 465| PG_RETURN_CSTRING(result);
# 466| }
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/xid8funcs.c: scope_hint: In function ‘is_visible_fxid’
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/xid8funcs.c:198:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 198 | res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# | ^
# 196| void *res;
# 197|
# 198|-> res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# 199| cmp_fxid);
# 200| /* if found, transaction is still in progress */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/backend/utils/adt/xid8funcs.c:198:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 196| void *res;
# 197|
# 198|-> res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# 199| cmp_fxid);
# 200| /* if found, transaction is still in progress */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/catcache.c:2322: warning[nullPointer]: Possible null pointer dereference: srckeys
# 2320| int attnum = attnos[i];
# 2321| Form_pg_attribute att = TupleDescAttr(tupdesc, attnum - 1);
# 2322|-> Datum src = srckeys[i];
# 2323| NameData srcname;
# 2324|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:2439:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5538:1: enter_function: entry to ‘RelationGetIdentityKeyBitmap’
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5547:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5551:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5551:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5557:23: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5560:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5564:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/relcache.c:5564:21: call_function: calling ‘RelationIdGetRelation’ from ‘RelationGetIdentityKeyBitmap’
# 2437| pg_class_tuple = ScanPgRelation(RelationGetRelid(relation),
# 2438| true, false);
# 2439|-> relp = (Form_pg_class) GETSTRUCT(pg_class_tuple);
# 2440| memcpy(relation->rd_rel, relp, CLASS_TUPLE_SIZE);
# 2441| heap_freetuple(pg_class_tuple);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:503:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&mapdicts’
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:424:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:427:43: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:432:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:435:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:497:36: branch_false: following ‘false’ branch (when ‘ndicts <= 0’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:507:47: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/ts_cache.c:503:41: danger: use of uninitialized value ‘&mapdicts’ here
# 501| MemoryContextAlloc(CacheMemoryContext,
# 502| sizeof(Oid) * ndicts);
# 503|-> memcpy(maplists[maxtokentype].dictIds, mapdicts,
# 504| sizeof(Oid) * ndicts);
# 505| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/cache/typcache.c:2714: warning[uninitvar]: Uninitialized variable: &srch.sort_order
# 2712|
# 2713| srch.enum_oid = arg;
# 2714|-> return bsearch(&srch, enumdata->enum_values, enumdata->num_values,
# 2715| sizeof(EnumItem), enum_oid_cmp);
# 2716| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/init/postinit.c:1313:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/utils/init/postinit.c:1262:1: enter_function: entry to ‘process_startup_options’
postgresql-18.3/postgresql-17.9/src/backend/utils/init/postinit.c:1304:19: call_function: inlined call to ‘list_head’ from ‘process_startup_options’
postgresql-18.3/postgresql-17.9/src/backend/utils/init/postinit.c:1305:16: branch_true: following ‘true’ branch (when ‘gucopts’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/utils/init/postinit.c:1310:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/init/postinit.c:1313:17: danger: dereference of NULL ‘<unknown>’
# 1311| gucopts = lnext(port->guc_options, gucopts);
# 1312|
# 1313|-> value = lfirst(gucopts);
# 1314| gucopts = lnext(port->guc_options, gucopts);
# 1315|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.c:1629:54: warning[-Wanalyzer-malloc-leak]: leak of ‘GUC_yy_create_buffer(fp, 16384)’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:586:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1627| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1628| * we need to put in 2 end-of-buffer characters.
# 1629|-> */
# 1630| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1631| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.c:1629:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:586:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1627| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1628| * we need to put in 2 end-of-buffer characters.
# 1629|-> */
# 1630| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1631| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.c:1670: warning[nullPointer]: Possible null pointer dereference: b
# 1668|
# 1669| yy_flush_buffer( b );
# 1670|->
# 1671| b->yy_input_file = file;
# 1672| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.c:1671: warning[nullPointer]: Possible null pointer dereference: b
# 1669| yy_flush_buffer( b );
# 1670|
# 1671|-> b->yy_input_file = file;
# 1672| b->yy_fill_buffer = 1;
# 1673|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:384:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:586:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 382| errorcount = 0;
# 383|
# 384|-> lex_buffer = yy_create_buffer(fp, YY_BUF_SIZE);
# 385| yy_switch_to_buffer(lex_buffer);
# 386|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6679:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eqsgn’
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6651:12: branch_false: following ‘false’ branch (when ‘array’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6655:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6655:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6659:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6661:21: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6668:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/misc/guc.c:6679:17: danger: dereference of NULL ‘eqsgn’
# 6677|
# 6678| eqsgn = strchr(val, '=');
# 6679|-> *eqsgn = '\0';
# 6680|
# 6681| /* skip if we have permission to delete it */
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:917:20: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:917:20: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: danger: ‘block’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 917| if (blksize < required_size)
# 918| break;
# 919|-> block = (AllocBlock) malloc(blksize);
# 920| }
# 921|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:923:24: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:917:20: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:919:38: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:922:12: branch_true: following ‘true’ branch (when ‘block’ is NULL)...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:923:24: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/aset.c:923:24: danger: ‘block’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 921|
# 922| if (block == NULL)
# 923|-> return MemoryContextAllocationFailure(context, size, flags);
# 924|
# 925| context->mem_allocated += blksize;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:845:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1837:1: enter_function: entry to ‘destroy_superblock’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1839:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1839:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1888:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1889:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1901:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1902:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1902:17: call_function: calling ‘dsa_free’ from ‘destroy_superblock’
# 843| span_pointer = segment_map->pagemap[pageno];
# 844| span = dsa_get_address(area, span_pointer);
# 845|-> superblock = dsa_get_address(area, span->start);
# 846| object = dsa_get_address(area, dp);
# 847| size_class = span->size_class;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1840:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1837:1: enter_function: entry to ‘destroy_superblock’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1839:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1839:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:1840:46: danger: dereference of NULL ‘dsa_get_address(area, span_pointer)’
# 1838| {
# 1839| dsa_area_span *span = dsa_get_address(area, span_pointer);
# 1840|-> int size_class = span->size_class;
# 1841| dsa_segment_map *segment_map;
# 1842|
Error: GCC_ANALYZER_WARNING (CWE-1335):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2029:33: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘4294967295’) >= precision of type (‘64’)
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2010:1: enter_function: entry to ‘get_best_segment’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2015:9: call_function: calling ‘check_for_freed_segments_locked’ from ‘get_best_segment’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2015:9: return_function: returning to ‘get_best_segment’ from ‘check_for_freed_segments_locked’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2021:20: call_function: inlined call to ‘contiguous_pages_to_segment_bin’ from ‘get_best_segment’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2022:18: branch_true: following ‘true’ branch (when ‘bin != 16’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2029:59: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/dsa.c:2029:33: danger: shift by count ‘4294967295’ here
# 2027| * have. We'll re-bin if we see segments with fewer.
# 2028| */
# 2029|-> size_t threshold = (size_t) 1 << (bin - 1);
# 2030| dsa_segment_index segment_index;
# 2031|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1441:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘result.index’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1476:1: enter_function: entry to ‘FreePageManagerPutInternal’
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1489:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1491:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1491:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1499:26: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1499:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1509:26: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1509:25: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1525:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1525:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: following ‘false’ branch (when ‘soft == 0’)...
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1529:34: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1529:34: call_function: calling ‘FreePageManagerGetInternal’ from ‘FreePageManagerPutInternal’
# 1439| Assert(result.found);
# 1440| if (victim->npages == npages)
# 1441|-> FreePageBtreeRemove(fpm, result.page, result.index);
# 1442| else
# 1443| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/mmgr/freepage.c:1538: error[legacyUninitvar]: Uninitialized variable: root
# 1536|
# 1537| /* Create the btree and move the preexisting range into it. */
# 1538|-> root->hdr.magic = FREE_PAGE_LEAF_MAGIC;
# 1539| root->hdr.nused = 1;
# 1540| relptr_store(base, root->hdr.parent, (FreePageBtree *) NULL);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:546:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘read_page’
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:584:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:586:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/utils/sort/sharedtuplestore.c:546:29: danger: use of uninitialized value ‘read_page’ here
# 544|
# 545| /* Seek and load the chunk header. */
# 546|-> if (BufFileSeekBlock(accessor->read_file, read_page) != 0)
# 547| ereport(ERROR,
# 548| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:364:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "wb")’
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:359:16: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:360:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:364:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:364:12: danger: ‘fopen(filename, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 362|
# 363| #ifndef WIN32
# 364|-> if (chmod(filename, mode))
# 365| pg_fatal("could not set permissions on file \"%s\": %m",
# 366| filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:364:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "wb")’
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:359:16: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:360:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:364:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_basebackup/bbstreamer_file.c:364:12: danger: ‘fopen(filename, "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 362|
# 363| #ifndef WIN32
# 364|-> if (chmod(filename, mode))
# 365| pg_fatal("could not set permissions on file \"%s\": %m",
# 366| filename);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:119:17: warning[-Wanalyzer-jump-through-null]: jump through null pointer
<unknown>: branch_false: following ‘false’ branch (when ‘copy_method > 2’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:98:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:98:12: branch_false: following ‘false’ branch (when ‘dry_run == 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:109:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:109:20: branch_false: following ‘false’ branch (when ‘strategy_name’ is NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:112:26: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_combinebackup/copy_file.c:119:17: danger: jump through null pointer here
# 117| src, dst, pg_checksum_type_name(checksum_ctx->type));
# 118|
# 119|-> strategy_implementation(src, dst, checksum_ctx);
# 120| }
# 121| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/parallel.c:504: warning[nullPointer]: Possible null pointer dereference: slot
# 502| /* On all platforms, update workerStatus and te[] as well */
# 503| Assert(j < pstate->numWorkers);
# 504|-> slot->workerStatus = WRKR_TERMINATED;
# 505| pstate->te[j] = NULL;
# 506| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_backup_archiver.c:2283: warning[nullPointer]: Possible null pointer dereference: fh
# 2281| }
# 2282|
# 2283|-> if ((cnt = fread(sig, 1, 5, fh)) != 5)
# 2284| {
# 2285| if (ferror(fh))
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:1441: error[legacyUninitvar]: Uninitialized variable: archiveFormat
# 1439| else
# 1440| pg_fatal("invalid output format \"%s\" specified", format);
# 1441|-> return archiveFormat;
# 1442| }
# 1443|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12467:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘probin’
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12348:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12351:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12356:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12426:43: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12431:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12441:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12463:12: branch_false: following ‘false’ branch (when ‘prosqlbody’ is NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12467:18: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:12467:18: danger: dereference of NULL ‘probin’
#12465| appendPQExpBufferStr(asPart, prosqlbody);
#12466| }
#12467|-> else if (probin[0] != '\0')
#12468| {
#12469| appendPQExpBufferStr(asPart, "AS ");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13942:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collcollate’
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13863:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13866:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13926:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13931:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13931:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13940:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13940:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13942:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13942:21: danger: dereference of NULL ‘collcollate’
#13940| if (fout->remoteVersion < 150000)
#13941| {
#13942|-> if (collcollate[0] == '\0')
#13943| collcollate = NULL;
#13944| if (collctype[0] == '\0')
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13944:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collctype’
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13863:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13866:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13926:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13927:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13931:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13940:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13940:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13942:21: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13942:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13942:20: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_dump/pg_dump.c:13944:21: danger: dereference of NULL ‘collctype’
#13942| if (collcollate[0] == '\0')
#13943| collcollate = NULL;
#13944|-> if (collctype[0] == '\0')
#13945| collctype = NULL;
#13946| }
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:536:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:23: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:536:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:536:22: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 534| if (!fgets(rawline, sizeof(rawline), ver_fd))
# 535| {
# 536|-> if (!ferror(ver_fd))
# 537| pg_fatal("unexpected empty file \"%s\"", ver_file);
# 538| else
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:536:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:23: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:536:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:536:22: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 534| if (!fgets(rawline, sizeof(rawline), ver_fd))
# 535| {
# 536|-> if (!ferror(ver_fd))
# 537| pg_fatal("unexpected empty file \"%s\"", ver_file);
# 538| else
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:545:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:23: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:543:16: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:545:12: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 543| (void) pg_strip_crlf(rawline);
# 544|
# 545|-> if (strcmp(rawline, PG_MAJORVERSION) != 0)
# 546| {
# 547| pg_log_error("data directory is of wrong version");
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:545:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:23: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:529:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:534:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:543:16: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_resetwal/pg_resetwal.c:545:12: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 543| (void) pg_strip_crlf(rawline);
# 544|
# 545|-> if (strcmp(rawline, PG_MAJORVERSION) != 0)
# 546| {
# 547| pg_log_error("data directory is of wrong version");
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:318:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:318:31: danger: infinite loop here
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:318:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:318:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:320:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:318:57: branch_false: ...to here
# 316| {
# 317| START_TIMER;
# 318|-> for (ops = 0; alarm_triggered == false; ops++)
# 319| {
# 320| for (writes = 0; writes < writes_per_op; writes++)
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:421:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:421:31: danger: infinite loop here
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:421:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:421:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:423:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:421:57: branch_false: ...to here
# 419| {
# 420| START_TIMER;
# 421|-> for (ops = 0; alarm_triggered == false; ops++)
# 422| {
# 423| for (writes = 0; writes < writes_per_op; writes++)
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:486:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:486:31: danger: infinite loop here
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:486:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:486:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:488:42: branch_false: if it ever follows ‘false’ branch, it will always do so...
postgresql-18.3/postgresql-17.9/src/bin/pg_test_fsync/pg_test_fsync.c:486:57: branch_false: ...to here
# 484| {
# 485| START_TIMER;
# 486|-> for (ops = 0; alarm_triggered == false; ops++)
# 487| {
# 488| for (writes = 0; writes < 16 / writes_size; writes++)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:36: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:132:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:134:34: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:134:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:136:37: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:36: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
# 136| p = strchr(p, ':');
# 137|
# 138|-> if (p == NULL || strlen(p) <= 1)
# 139| pg_fatal("%d: database cluster state problem", __LINE__);
# 140|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:37: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:132:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:134:34: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:134:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:136:37: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:36: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:50: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:37: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
# 136| p = strchr(p, ':');
# 137|
# 138|-> if (p == NULL || strlen(p) <= 1)
# 139| pg_fatal("%d: database cluster state problem", __LINE__);
# 140|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:153:40: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:128:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:132:24: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:134:34: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:134:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:136:37: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:138:36: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:153:40: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:155:37: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:153:40: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
# 151| /* Remove trailing newline and leading spaces */
# 152| (void) pg_strip_crlf(p);
# 153|-> while (*p == ' ')
# 154| p++;
# 155| if (strcmp(p, "shut down in recovery") == 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:202:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:121:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:121:13: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:121:13: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:188:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:192:9: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:192:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:198:23: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:198:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:202:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:202:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:202:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:209:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:212:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:215:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:217:29: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/controldata.c:202:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(25)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/24)
# 200|
# 201| /* Only in <= 9.2 */
# 202|-> if (GET_MAJOR_VERSION(cluster->major_version) <= 902)
# 203| {
# 204| cluster->controldata.data_checksum_version = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:45:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:383:1: enter_function: entry to ‘check_bin_dir’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:395:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:395:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:396:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:396:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:397:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:397:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/exec.c:404:9: call_function: calling ‘get_bin_version’ from ‘check_bin_dir’
# 43| fflush(NULL);
# 44|
# 45|-> if ((output = popen(cmd, "r")) == NULL ||
# 46| fgets(cmd_output, sizeof(cmd_output), output) == NULL)
# 47| pg_fatal("could not get pg_ctl version data using %s: %m", cmd);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:213:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:42:1: enter_function: entry to ‘gen_db_file_maps’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:62:16: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:65:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:71:20: branch_true: following ‘true’ branch (when ‘new_rel’ is NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:77:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/info.c:77:25: call_function: calling ‘report_unmatched_relation’ from ‘gen_db_file_maps’
# 211| report_unmatched_relation(const RelInfo *rel, const DbInfo *db, bool is_new_db)
# 212| {
# 213|-> Oid reloid = rel->reloid; /* we might change rel below */
# 214| char reldesc[1000];
# 215| int i;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:446:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:418:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:420:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:424:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:432:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:446:23: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:446:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:447:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:446:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 444| fflush(NULL);
# 445|
# 446|-> if ((output = popen(cmd, "r")) == NULL ||
# 447| fgets(cmd_output, sizeof(cmd_output), output) == NULL)
# 448| pg_fatal("could not get data directory using %s: %m", cmd);
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:499:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:476:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:484:32: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:492:27: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:492:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:492:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:496:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:499:29: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:499:28: danger: ‘fopen(&filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 497| lineno++)
# 498| {
# 499|-> if (fgets(line, sizeof(line), fp) == NULL)
# 500| pg_fatal("could not read line %d from file \"%s\": %m",
# 501| lineno, filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:499:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:476:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:484:32: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:492:27: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:492:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:492:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:496:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:499:29: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_upgrade/option.c:499:28: danger: ‘fopen(&filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 497| lineno++)
# 498| {
# 499|-> if (fgets(line, sizeof(line), fp) == NULL)
# 500| pg_fatal("could not read line %d from file \"%s\": %m",
# 501| lineno, filename);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c: scope_hint: In function ‘split_path’
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:166:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 166 | sep = strrchr(path, '/');
# | ^
# 164|
# 165| /* split filepath into directory & filename */
# 166|-> sep = strrchr(path, '/');
# 167|
# 168| /* directory path */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:166:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 164|
# 165| /* split filepath into directory & filename */
# 166|-> sep = strrchr(path, '/');
# 167|
# 168| /* directory path */
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:534:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "w")’
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:494:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:505:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:508:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:514:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:514:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:517:24: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:520:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:521:50: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:530:24: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:531:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:534:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:534:20: danger: ‘fopen(&filename, "w")’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
# 532| pg_fatal("could not open file \"%s\": %m", filename);
# 533|
# 534|-> if (fwrite(page, BLCKSZ, 1, file) != 1)
# 535| pg_fatal("could not write file \"%s\": %m", filename);
# 536|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:534:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "w")’
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:494:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:505:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:508:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:514:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:514:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:517:24: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:520:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:521:50: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:530:24: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:531:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:534:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pg_waldump/pg_waldump.c:534:20: danger: ‘fopen(&filename, "w")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
# 532| pg_fatal("could not open file \"%s\": %m", filename);
# 533|
# 534|-> if (fwrite(page, BLCKSZ, 1, file) != 1)
# 535| pg_fatal("could not write file \"%s\": %m", filename);
# 536|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1113:11: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1120:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1120:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1133:10: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: danger: ‘yyptr’ leaks here; was allocated at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)
# 1115| if (! yyptr)
# 1116| YYNOMEM;
# 1117|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: danger: use of uninitialized value ‘yyss’ here
# 1115| if (! yyptr)
# 1116| YYNOMEM;
# 1117|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1118:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvs’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1118:9: danger: use of uninitialized value ‘yyvs’ here
# 1116| YYNOMEM;
# 1117| YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118|-> YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
# 1120| if (yyss1 != yyssa)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1244:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.ival’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1194:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1196:10: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1196:10: branch_false: following ‘false’ branch (when ‘yyn != -1’)...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1198:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprparse.c:1244:3: danger: use of uninitialized value ‘*<unknown>.ival’ here
# 1242| unconditionally makes the parser a bit smaller, and it avoids a
# 1243| GCC warning that YYVAL may be used uninitialized. */
# 1244|-> yyval = yyvsp[1-yylen];
# 1245|
# 1246|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.c:1999:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:343:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 1997| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1998| * we need to put in 2 end-of-buffer characters.
# 1999|-> */
# 2000| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2001| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.c:2042:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:343:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 2040|
# 2041| yy_flush_buffer( b , yyscanner);
# 2042|->
# 2043| b->yy_input_file = file;
# 2044| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.c:2162:3: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:334:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:335:56: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:335:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2160| if ( ! yyg->yy_buffer_stack )
# 2161| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2162|->
# 2163| memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2164|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.c:2183:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:334:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:335:56: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/pgbench/exprscan.l:335:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2181| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2182|
# 2183|-> /* zero only the new slots.*/
# 2184| memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2185| yyg->yy_buffer_stack_max = num_to_alloc;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/pgbench.c:1622: warning[uninitvar]: Uninitialized variables: &key.svalue, &key.value
# 1620| /* Now we can search */
# 1621| key.name = name;
# 1622|-> return (Variable *) bsearch(&key,
# 1623| variables->vars,
# 1624| variables->nvars,
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/pgbench.c: scope_hint: In function ‘parseScriptWeight’
postgresql-18.3/postgresql-17.9/src/bin/pgbench/pgbench.c:6235:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6235 | if ((sep = strrchr(option, WSEP)))
# | ^
# 6233| int weight;
# 6234|
# 6235|-> if ((sep = strrchr(option, WSEP)))
# 6236| {
# 6237| int namelen = sep - option;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/bin/pgbench/pgbench.c:6235:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6233| int weight;
# 6234|
# 6235|-> if ((sep = strrchr(option, WSEP)))
# 6236| {
# 6237| int namelen = sep - option;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/bin/psql/crosstabview.c:363: error[uninitvar]: Uninitialized variables: &elt.sort_value, &elt.rank
# 361| else
# 362| elt.name = NULL;
# 363|-> rp = (pivot_field *) bsearch(&elt,
# 364| piv_rows,
# 365| num_rows,
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.c:2486:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:687:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:697:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:697:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:705:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2484| /* yy_ch_buf has to be 2 characters longer than the size given because
# 2485| * we need to put in 2 end-of-buffer characters.
# 2486|-> */
# 2487| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2488| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.c:2529:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:687:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:697:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:697:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:705:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2527|
# 2528| yy_flush_buffer( b , yyscanner);
# 2529|->
# 2530| b->yy_input_file = file;
# 2531| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.c:2649:3: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:549:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:578:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:579:10: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:579:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2647| if ( ! yyg->yy_buffer_stack )
# 2648| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2649|->
# 2650| memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2651|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.c:2670:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:549:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:578:19: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:579:10: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:579:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2668| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2669|
# 2670|-> /* zero only the new slots.*/
# 2671| memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2672| yyg->yy_buffer_stack_max = num_to_alloc;
Error: CPPCHECK_WARNING (CWE-562):
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:501: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 499| /* Set current output target */
# 500| state->output_buf = &mybuf;
# 501|->
# 502| /* Set input source */
# 503| if (state->buffer_stack != NULL)
Error: CPPCHECK_WARNING (CWE-562):
postgresql-18.3/postgresql-17.9/src/bin/psql/psqlscanslash.l:575: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 573| /* Set current output target */
# 574| state->output_buf = &mybuf;
# 575|->
# 576| /* Set input source */
# 577| if (state->buffer_stack != NULL)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:863:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cell’
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:489:26: release_memory: ‘dbtables.head’ is NULL
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:489:26: release_memory: ‘dbtables.head’ is NULL
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:773:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:784:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:785:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:798:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:833:9: release_memory: ‘cell’ is NULL
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:839:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:845:29: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:846:20: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:852:62: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/bin/scripts/vacuumdb.c:863:17: danger: dereference of NULL ‘cell’
# 861| echo, tabname);
# 862|
# 863|-> cell = cell->next;
# 864| } while (cell != NULL);
# 865|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:539:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:474:1: enter_function: entry to ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:489:9: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:489:9: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:492:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:500:32: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:502:36: call_function: calling ‘blockreftable_iterate’ from ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:502:36: return_function: returning to ‘WriteBlockRefTable’ from ‘blockreftable_iterate’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:502:24: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:517:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:521:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:523:70: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:528:25: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:528:25: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:538:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:540:68: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:539:61: danger: dereference of NULL ‘blockreftable_lookup(*brtab.hash, key)’
# 537| /* Write the untruncated portion of the chunk length array. */
# 538| if (sentry->nchunks != 0)
# 539|-> BlockRefTableWrite(&buffer, brtentry->chunk_usage,
# 540| sentry->nchunks * sizeof(uint16));
# 541|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:543:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:474:1: enter_function: entry to ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:489:9: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:489:9: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:492:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:500:32: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:502:36: call_function: calling ‘blockreftable_iterate’ from ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:502:36: return_function: returning to ‘WriteBlockRefTable’ from ‘blockreftable_iterate’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:502:24: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:517:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:521:29: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:523:70: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:528:25: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:528:25: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:538:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:543:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/blkreftable.c:543:41: danger: dereference of NULL ‘blockreftable_lookup(*brtab.hash, key)’
# 541|
# 542| /* Write the contents of each chunk. */
# 543|-> for (j = 0; j < brtentry->nchunks; ++j)
# 544| {
# 545| if (brtentry->chunk_usage[j] == 0)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/common/compression.c: scope_hint: In function ‘parse_compress_options’
postgresql-18.3/postgresql-17.9/src/common/compression.c:458:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 458 | sep = strchr(option, ':');
# | ^
# 456| * name.
# 457| */
# 458|-> sep = strchr(option, ':');
# 459| if (sep == NULL)
# 460| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/common/compression.c:458:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 456| * name.
# 457| */
# 458|-> sep = strchr(option, ':');
# 459| if (sep == NULL)
# 460| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/common/encnames.c:540: warning[uninitvar]: Uninitialized variable: newkey
# 538| }
# 539| *np = '\0';
# 540|-> return newkey;
# 541| }
# 542|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/common/jsonapi.c:1315: warning[uninitvar]: Uninitialized variable: lex->inc_state
# 1313| JsonParseErrorType result;
# 1314|
# 1315|-> if (lex->incremental && lex->inc_state->partial_completed)
# 1316| {
# 1317| /*
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:180:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘termout’
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:96:19: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:180:16: danger: ‘termout’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 178| }
# 179|
# 180|-> return result;
# 181| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:180:16: warning[-Wanalyzer-malloc-leak]: leak of ‘termout’
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:96:19: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/common/sprompt.c:180:16: danger: ‘termout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 178| }
# 179|
# 180|-> return result;
# 181| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:909:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘width_header’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3549:1: enter_function: entry to ‘printQuery’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3557:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3561:55: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3560:9: call_function: calling ‘printTableInit’ from ‘printQuery’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3560:9: return_function: returning to ‘printQuery’ from ‘printTableInit’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3567:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3567:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3601:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3609:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3609:9: call_function: calling ‘printTable’ from ‘printQuery’
# 907| * display across multiple lines. We check for both cases below.
# 908| */
# 909|-> if (width > 0 && width_wrap[i])
# 910| {
# 911| unsigned int extra_lines;
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:1040:17: warning[-Wanalyzer-null-argument]: use of NULL ‘bytes_output’ where non-null expected
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3549:1: enter_function: entry to ‘printQuery’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3557:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3561:55: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3560:9: call_function: calling ‘printTableInit’ from ‘printQuery’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3560:9: return_function: returning to ‘printQuery’ from ‘printTableInit’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3567:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3567:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3601:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3609:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3609:9: call_function: calling ‘printTable’ from ‘printQuery’
# 1038| }
# 1039|
# 1040|-> memset(bytes_output, 0, col_count * sizeof(int));
# 1041|
# 1042| /*
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3432:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fout’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3549:1: enter_function: entry to ‘printQuery’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3557:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3561:55: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3560:9: call_function: calling ‘printTableInit’ from ‘printQuery’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3560:9: return_function: returning to ‘printQuery’ from ‘printTableInit’
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3567:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3567:21: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3601:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3609:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/print.c:3609:9: call_function: calling ‘printTable’ from ‘printQuery’
# 3430| else
# 3431| *is_pager = false;
# 3432|-> }
# 3433|
# 3434| /*
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.c:4584:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1127:8: enter_function: entry to ‘psql_scan’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1142:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1142:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1147:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 4582| /* yy_ch_buf has to be 2 characters longer than the size given because
# 4583| * we need to put in 2 end-of-buffer characters.
# 4584|-> */
# 4585| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 4586| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.c:4627:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1127:8: enter_function: entry to ‘psql_scan’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1142:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1142:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-18.3/postgresql-17.9/src/fe_utils/psqlscan.l:1147:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 4625|
# 4626| yy_flush_buffer( b , yyscanner);
# 4627|->
# 4628| b->yy_input_file = file;
# 4629| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:142:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, <unknown>)’
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:138:14: acquire_resource: opened here
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:139:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:142:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:142:13: danger: ‘fopen(&filename, <unknown>)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 140| pg_fatal("could not open file \"%s\": %m", filename);
# 141|
# 142|-> if (fwrite(contents->data, contents->len, 1, cf) != 1)
# 143| pg_fatal("could not write to file \"%s\": %m", filename);
# 144|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:142:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, <unknown>)’
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:138:14: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:139:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:142:13: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/fe_utils/recovery_gen.c:142:13: danger: ‘fopen(&filename, <unknown>)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 140| pg_fatal("could not open file \"%s\": %m", filename);
# 141|
# 142|-> if (fwrite(contents->data, contents->len, 1, cf) != 1)
# 143| pg_fatal("could not write to file \"%s\": %m", filename);
# 144|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/access/tableam.h:1063:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:795:1: enter_function: entry to ‘systable_inplace_update_begin’
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:815:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:815:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:840:20: branch_false: following ‘false’ branch (when ‘retries != 10001’)...
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:843:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:845:24: call_function: calling ‘systable_beginscan’ from ‘systable_inplace_update_begin’
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:845:24: return_function: returning to ‘systable_inplace_update_begin’ from ‘systable_beginscan’
postgresql-18.3/postgresql-17.9/src/backend/access/index/genam.c:847:26: call_function: calling ‘systable_getnext’ from ‘systable_inplace_update_begin’
# 1061| table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1062| {
# 1063|-> slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1064|
# 1065| /* We don't expect actual scans using NoMovementScanDirection */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/access/tupmacs.h:28:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:553:1: enter_function: entry to ‘brin_deform_tuple’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:565:16: branch_true: following ‘true’ branch (when ‘dMemtuple’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:565:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:565:28: call_function: calling ‘brin_memtuple_initialize’ from ‘brin_deform_tuple’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:565:28: return_function: returning to ‘brin_deform_tuple’ from ‘brin_memtuple_initialize’
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:568:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:572:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:583:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:587:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/brin/brin_tuple.c:587:9: call_function: calling ‘brin_deconstruct_tuple’ from ‘brin_deform_tuple’
# 26| att_isnull(int ATT, const bits8 *BITS)
# 27| {
# 28|-> return !(BITS[ATT >> 3] & (1 << (ATT & 0x07)));
# 29| }
# 30|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/lib/radixtree.h:1123:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘slot’
postgresql-18.3/postgresql-17.9/src/backend/access/common/tidstore.c:432:1: enter_function: entry to ‘TidStoreIsMember’
postgresql-18.3/postgresql-17.9/src/backend/access/common/tidstore.c:440:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/common/tidstore.c:443:24: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/common/tidstore.c:443:24: call_function: calling ‘local_ts_find’ from ‘TidStoreIsMember’
# 1121| }
# 1122|
# 1123|-> if (RT_CHILDPTR_IS_VALUE(*slot))
# 1124| return (RT_VALUE_TYPE *) slot;
# 1125| else
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elemops’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:3868:1: enter_function: entry to ‘make_partition_op_expr’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:3876:19: call_function: calling ‘get_partition_operator’ from ‘make_partition_op_expr’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:3876:19: return_function: returning to ‘make_partition_op_expr’ from ‘get_partition_operator’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:3951:50: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:3951:100: call_function: inlined call to ‘list_nth_cell’ from ‘make_partition_op_expr’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘expanded_groups’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_agg.c:1856:1: enter_function: entry to ‘expand_grouping_sets’
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_agg.c:1863:12: branch_false: following ‘false’ branch (when ‘groupingSets’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_agg.c:1863:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_agg.c:1866:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/parser/parse_agg.c:1889:9: call_function: inlined call to ‘list_nth_cell’ from ‘expand_grouping_sets’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘or_expr_args’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4275:1: enter_function: entry to ‘get_qual_for_range’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4300:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4303:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4308:29: branch_true: following ‘true’ branch (when ‘k < nparts’)...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4310:67: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4316:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4319:33: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4323:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4326:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4326:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4330:45: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4330:45: call_function: calling ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4330:45: return_function: returning to ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4336:70: call_function: inlined call to ‘list_length’ from ‘get_qual_for_range’
postgresql-18.3/postgresql-17.9/src/backend/partitioning/partbounds.c:4338:78: call_function: inlined call to ‘list_nth_cell’ from ‘get_qual_for_range’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/storage/block.h:105:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:648:1: enter_function: entry to ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:657:25: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:659:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:665:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:690:57: call_function: inlined call to ‘BTreeTupleGetNPosting’ from ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:696:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:709:42: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:709:42: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:709:42: return_function: returning to ‘_bt_bottomupdel_finish_pending’ from ‘BTreeTupleGetHeapTID’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtdedup.c:712:48: call_function: inlined call to ‘ItemPointerGetBlockNumber’ from ‘_bt_bottomupdel_finish_pending’
# 103| BlockIdGetBlockNumber(const BlockIdData *blockId)
# 104| {
# 105|-> return (((BlockNumber) blockId->bi_hi) << 16) | ((BlockNumber) blockId->bi_lo);
# 106| }
# 107|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/storage/bufpage.h:340:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:816:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:822:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:823:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/gin/ginbtree.c:823:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 338| {
# 339| PageValidateSpecialPointer(page);
# 340|-> return (char *) page + ((PageHeader) page)->pd_special;
# 341| }
# 342|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/include/storage/itemptr.h:116:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5082:1: enter_function: entry to ‘_bt_check_third_page’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5091:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5099:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5107:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5111:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5111:9: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5111:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5111:9: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_check_third_page’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5111:9: return_function: returning to ‘_bt_check_third_page’ from ‘BTreeTupleGetHeapTID’
postgresql-18.3/postgresql-17.9/src/backend/access/nbtree/nbtutils.c:5111:9: call_function: inlined call to ‘ItemPointerGetOffsetNumber’ from ‘_bt_check_third_page’
# 114| ItemPointerGetOffsetNumberNoCheck(const ItemPointerData *pointer)
# 115| {
# 116|-> return pointer->ip_posid;
# 117| }
# 118|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:166:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:158:1: enter_function: entry to ‘ECPGsetcommit’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:160:34: call_function: calling ‘ecpg_get_connection’ from ‘ECPGsetcommit’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:160:34: return_function: returning to ‘ECPGsetcommit’ from ‘ecpg_get_connection’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:163:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:166:9: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/connect.c:166:9: danger: dereference of NULL ‘ecpg_get_connection(connection_name)’
# 164| return false;
# 165|
# 166|-> ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
# 167|
# 168| if (con->autocommit && strncmp(mode, "off", strlen("off")) == 0)
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/execute.c:1132:83: warning[-Wanalyzer-null-argument]: use of NULL ‘tobeinserted’ where non-null expected
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/execute.c:2292:1: enter_function: entry to ‘ECPGdo_descriptor’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/execute.c:2295:16: call_function: calling ‘ECPGdo’ from ‘ECPGdo_descriptor’
# 1130|
# 1131| if (!(newcopy = (char *) ecpg_alloc(strlen(stmt->command)
# 1132|-> + strlen(tobeinserted)
# 1133| + 1, stmt->lineno)))
# 1134| {
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:21:36: warning[-Wanalyzer-malloc-leak]: leak of ‘ecpg_alloc(16, lineno)’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:117:1: enter_function: entry to ‘ecpg_add_mem’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:119:51: call_function: calling ‘ecpg_alloc’ from ‘ecpg_add_mem’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:119:51: return_function: returning to ‘ecpg_add_mem’ from ‘ecpg_alloc’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:121:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:124:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/memory.c:21:36: danger: ‘ecpg_alloc(16, lineno)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/3)
# 19| ecpg_alloc(long size, int lineno)
# 20| {
# 21|-> char *new = (char *) calloc(1L, size);
# 22|
# 23| if (!new)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/misc.c:114:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ECPGget_sqlca()’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/misc.c:232:1: enter_function: entry to ‘ecpg_log’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/misc.c:235:33: call_function: calling ‘ECPGget_sqlca’ from ‘ecpg_log’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/misc.c:235:33: return_function: returning to ‘ecpg_log’ from ‘ECPGget_sqlca’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/ecpglib/misc.c:114:17: danger: ‘ECPGget_sqlca()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
# 112| pthread_once(&sqlca_key_once, ecpg_sqlca_key_init);
# 113|
# 114|-> sqlca = pthread_getspecific(sqlca_key);
# 115| if (sqlca == NULL)
# 116| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c: scope_hint: In function ‘PGTYPESdate_defmt_asc’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c:357:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 357 | fmt_ystart = strstr(fmt, "yy");
# | ^
# 355|
# 356| /* analyze the fmt string */
# 357|-> fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c:357:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 355|
# 356| /* analyze the fmt string */
# 357|-> fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c:358:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 358 | fmt_mstart = strstr(fmt, "mm");
# | ^
# 356| /* analyze the fmt string */
# 357| fmt_ystart = strstr(fmt, "yy");
# 358|-> fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
# 360|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c:358:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 356| /* analyze the fmt string */
# 357| fmt_ystart = strstr(fmt, "yy");
# 358|-> fmt_mstart = strstr(fmt, "mm");
# 359| fmt_dstart = strstr(fmt, "dd");
# 360|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c:359:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 359 | fmt_dstart = strstr(fmt, "dd");
# | ^
# 357| fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359|-> fmt_dstart = strstr(fmt, "dd");
# 360|
# 361| if (!fmt_ystart || !fmt_mstart || !fmt_dstart)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/datetime.c:359:20: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 357| fmt_ystart = strstr(fmt, "yy");
# 358| fmt_mstart = strstr(fmt, "mm");
# 359|-> fmt_dstart = strstr(fmt, "dd");
# 360|
# 361| if (!fmt_ystart || !fmt_mstart || !fmt_dstart)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/timestamp.c:759:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘replace_val’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/timestamp.c:782:1: enter_function: entry to ‘PGTYPEStimestamp_fmt_asc’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/pgtypeslib/timestamp.c:793:16: call_function: calling ‘dttofmtasc_replace’ from ‘PGTYPEStimestamp_fmt_asc’
# 757| break;
# 758| }
# 759|-> i = pgtypes_fmt_replace(replace_val, replace_type, &q, pstr_len);
# 760| if (i)
# 761| return i;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4602:54: warning[-Wanalyzer-malloc-leak]: leak of ‘base_yy_create_buffer(base_yyin, 16384)’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1653:1: enter_function: entry to ‘parse_include’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1740:19: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1743:26: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_create_buffer’ from ‘parse_include’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1744:9: return_function: returning to ‘parse_include’ from ‘base_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_switch_to_buffer’ from ‘parse_include’
# 4600| /* yy_ch_buf has to be 2 characters longer than the size given because
# 4601| * we need to put in 2 end-of-buffer characters.
# 4602|-> */
# 4603| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 4604| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4602:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4589:21: enter_function: entry to ‘base_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4593:24: call_function: inlined call to ‘base_yyalloc’ from ‘base_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4594:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4597:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4602:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 4600| /* yy_ch_buf has to be 2 characters longer than the size given because
# 4601| * we need to put in 2 end-of-buffer characters.
# 4602|-> */
# 4603| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 4604| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4610:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1653:1: enter_function: entry to ‘parse_include’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1663:22: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1740:19: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1743:26: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_create_buffer’ from ‘parse_include’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1744:9: return_function: returning to ‘parse_include’ from ‘base_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1744:9: call_function: calling ‘base_yy_switch_to_buffer’ from ‘parse_include’
# 4608|
# 4609| yy_init_buffer( b, file );
# 4610|->
# 4611| return b;
# 4612| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4643: warning[nullPointer]: Possible null pointer dereference: b
# 4641|
# 4642| yy_flush_buffer( b );
# 4643|->
# 4644| b->yy_input_file = file;
# 4645| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4644: warning[nullPointer]: Possible null pointer dereference: b
# 4642| yy_flush_buffer( b );
# 4643|
# 4644|-> b->yy_input_file = file;
# 4645| b->yy_fill_buffer = 1;
# 4646|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4831:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1772:1: enter_function: entry to ‘isdefine’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1777:29: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1780:43: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1789:39: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1789:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1803:25: call_function: calling ‘base_yy_scan_string’ from ‘isdefine’
# 4829| YY_BUFFER_STATE yy_scan_string (const char * yystr )
# 4830| {
# 4831|->
# 4832| return yy_scan_bytes( yystr, (int) strlen(yystr) );
# 4833| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4857:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4841:17: enter_function: entry to ‘base_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4850:24: call_function: inlined call to ‘base_yyalloc’ from ‘base_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4851:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4851:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.c:4859:6: call_function: calling ‘base_yy_scan_buffer’ from ‘base_yy_scan_bytes’
# 4855| for ( i = 0; i < _yybytes_len; ++i )
# 4856| buf[i] = yybytes[i];
# 4857|->
# 4858| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 4859|
Error: CPPCHECK_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1607: error[memleakOnRealloc]: Common realloc mistake: 'literalbuf' nulled but not freed upon failure
# 1605| while ((literallen+yleng) >= literalalloc);
# 1606| literalbuf = (char *) realloc(literalbuf, literalalloc);
# 1607|-> }
# 1608| /* append new data, add trailing null */
# 1609| memcpy(literalbuf+literallen, ytext, yleng);
Error: CPPCHECK_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1622: error[memleakOnRealloc]: Common realloc mistake: 'literalbuf' nulled but not freed upon failure
# 1620| literalalloc *= 2;
# 1621| literalbuf = (char *) realloc(literalbuf, literalalloc);
# 1622|-> }
# 1623| /* append new data, add trailing null */
# 1624| literalbuf[literallen] = ychar;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1803:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<return-value>’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1772:1: enter_function: entry to ‘isdefine’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1777:29: branch_true: following ‘true’ branch (when ‘ptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1780:43: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1789:39: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1789:39: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1803:25: call_function: calling ‘base_yy_scan_string’ from ‘isdefine’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1803:25: danger: ‘<return-value>’ leaks here; was allocated at [(23)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/22)
# 1801| */
# 1802| yy_scan_string(ptr->value);
# 1803|-> return true;
# 1804| }
# 1805| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1839:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<return-value>’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1816:1: enter_function: entry to ‘isinformixdefine’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1833:31: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1833:31: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1839:17: call_function: calling ‘base_yy_scan_string’ from ‘isinformixdefine’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/pgc.l:1839:17: danger: ‘<return-value>’ leaks here; was allocated at [(21)](sarif:/runs/0/results/6/codeFlows/0/threadFlows/0/locations/20)
# 1837|
# 1838| yy_scan_string(new);
# 1839|-> return true;
# 1840| }
# 1841|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39445:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39400:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39406:34: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39432:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39434:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39443:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39443:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39445:9: danger: use of uninitialized value ‘yyss’ here
#39443| if (! yyptr)
#39444| YYNOMEM;
#39445|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
#39446| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#39447| YYSTACK_RELOCATE (yyls_alloc, yyls);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39576:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39400:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39469:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39469:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39472:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39484:6: branch_true: following ‘true’ branch (when ‘yyn == -6472’)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39485:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39556:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39558:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/preproc.c:39576:3: danger: use of uninitialized value ‘*<unknown>’ here
#39574| unconditionally makes the parser a bit smaller, and it avoids a
#39575| GCC warning that YYVAL may be used uninitialized. */
#39576|-> yyval = yyvsp[1-yylen];
#39577|
#39578| /* Default location. */
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:590:50: warning[-Wanalyzer-null-argument]: use of NULL ‘ind_name’ where non-null expected
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:581:1: enter_function: entry to ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:589:37: call_function: calling ‘mm_alloc’ from ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:589:37: return_function: returning to ‘ECPGdump_a_struct’ from ‘mm_alloc’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:590:41: call_function: calling ‘mm_alloc’ from ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:590:41: return_function: returning to ‘ECPGdump_a_struct’ from ‘mm_alloc’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:599:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:601:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:601:17: branch_true: following ‘true’ branch (when ‘ind_type’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:603:21: call_function: inlined call to ‘atoi’ from ‘ECPGdump_a_struct’
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:603:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:604:25: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:612:35: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:614:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:614:17: branch_true: following ‘true’ branch (when ‘ind_p’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:614:17: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/ecpg/preproc/type.c:614:17: call_function: calling ‘ECPGdump_a_type’ from ‘ECPGdump_a_struct’
# 588| *ind_p = NULL;
# 589| char *pbuf = (char *) mm_alloc(strlen(name) + ((prefix == NULL) ? 0 : strlen(prefix)) + 3);
# 590|-> char *ind_pbuf = (char *) mm_alloc(strlen(ind_name) + ((ind_prefix == NULL) ? 0 : strlen(ind_prefix)) + 3);
# 591|
# 592| if (atoi(arrsize) == 1)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6901:18: warning[-Wanalyzer-malloc-leak]: leak of ‘value_copy’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6879:1: enter_function: entry to ‘conninfo_storeval’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6901:18: call_function: calling ‘conninfo_find’ from ‘conninfo_storeval’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6901:18: return_function: returning to ‘conninfo_storeval’ from ‘conninfo_find’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6902:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6911:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6911:12: branch_false: following ‘false’ branch (when ‘uri_decode == 0’)...
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6920:30: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6920:30: acquire_memory: allocated here
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6921:20: branch_false: following ‘false’ branch (when ‘value_copy’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6928:14: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-connect.c:6901:18: danger: ‘value_copy’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 6899| }
# 6900|
# 6901|-> option = conninfo_find(connOptions, keyword);
# 6902| if (option == NULL)
# 6903| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-exec.c:742:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-exec.c:2349:1: enter_function: entry to ‘PQexecStart’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-exec.c:2374:26: call_function: calling ‘PQgetResult’ from ‘PQexecStart’
# 740| {
# 741| /* only send DESTROY to successfully-initialized event procs */
# 742|-> if (res->events[i].resultInitialized)
# 743| {
# 744| PGEventResultDestroy evt;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure-openssl.c: scope_hint: In function ‘pgtls_verify_peer_name_matches_certificate_guts’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure-openssl.c:685:30: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 685 | subject_name = X509_get_subject_name(conn->peer);
# | ^
# 683| X509_NAME *subject_name;
# 684|
# 685|-> subject_name = X509_get_subject_name(conn->peer);
# 686| if (subject_name != NULL)
# 687| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure-openssl.c:685:30: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 683| X509_NAME *subject_name;
# 684|
# 685|-> subject_name = X509_get_subject_name(conn->peer);
# 686| if (subject_name != NULL)
# 687| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure-openssl.c:698:140: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘openssl_verify_peer_name_matches_certificate_name’ discards ‘const’ qualifier from pointer target type
# 698 | X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure-openssl.c:492:78: note: expected ‘ASN1_STRING *’ {aka ‘struct asn1_string_st *’} but argument is of type ‘const ASN1_STRING *’ {aka ‘const struct asn1_string_st *’}
# 492 | openssl_verify_peer_name_matches_certificate_name(PGconn *conn, ASN1_STRING *name_entry,
# | ~~~~~~~~~~~~~^~~~~~~~~~
# 696| (*names_examined)++;
# 697| rc = openssl_verify_peer_name_matches_certificate_name(conn,
# 698|-> X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# 699| &common_name);
# 700|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure-openssl.c:698:140: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘openssl_verify_peer_name_matches_certificate_name’ discards ‘const’ qualifier from pointer target type
# 696| (*names_examined)++;
# 697| rc = openssl_verify_peer_name_matches_certificate_name(conn,
# 698|-> X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# 699| &common_name);
# 700|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure.c:431:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘spinfo.sigpipe_pending’
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure.c:431:9: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/interfaces/libpq/fe-secure.c:431:9: danger: use of uninitialized value ‘spinfo.sigpipe_pending’ here
# 429| }
# 430|
# 431|-> RESTORE_SIGPIPE(conn, spinfo);
# 432|
# 433| /* ensure we return the intended errno to caller */
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1298:45: warning[-Wanalyzer-null-argument]: use of NULL ‘colname’ where non-null expected
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1175:1: enter_function: entry to ‘resolve_column_ref’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1206:17: call_function: inlined call to ‘list_length’ from ‘resolve_column_ref’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1272:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1275:17: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1282:28: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1284:28: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1284:28: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1287:68: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1292:40: branch_true: following ‘true’ branch (when ‘i >= 0’)...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1294:100: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_comp.c:1298:45: danger: argument 2 (‘colname’) NULL where non-null expected
# 1296| Assert(fld->dtype == PLPGSQL_DTYPE_RECFIELD &&
# 1297| fld->recparentno == nse->itemno);
# 1298|-> if (strcmp(fld->fieldname, colname) == 0)
# 1299| {
# 1300| return make_datum_param(expr, i, cref->location);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:5117:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7417:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7422:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7533:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7535:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7535:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 5115| {
# 5116| if (var->datatype->typisarray &&
# 5117|-> !VARATT_IS_EXTERNAL_EXPANDED_RW(DatumGetPointer(newvalue)))
# 5118| {
# 5119| /* array and not already R/W, so apply expand_array */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:8564:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7417:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7422:12: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7533:20: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7535:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_exec.c:7535:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 8562| */
# 8563| if (!estate->atomic && !isnull && var->datatype->typlen == -1 &&
# 8564|-> VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
# 8565| {
# 8566| MemoryContext oldcxt;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1865:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1820:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1826:34: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1852:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1854:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1863:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1863:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1865:9: danger: use of uninitialized value ‘yyss’ here
# 1863| if (! yyptr)
# 1864| YYNOMEM;
# 1865|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1866| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1867| YYSTACK_RELOCATE (yyls_alloc, yyls);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1996:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1820:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1889:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1889:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1892:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1904:6: branch_true: following ‘true’ branch (when ‘yyn == -249’)...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1905:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1976:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1978:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/pl/plpgsql/src/pl_gram.c:1996:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1994| unconditionally makes the parser a bit smaller, and it avoids a
# 1995| GCC warning that YYVAL may be used uninitialized. */
# 1996|-> yyval = yyvsp[1-yylen];
# 1997|
# 1998| /* Default location. */
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_crc32c_sse42.c:38:32: note[note]: called from here
# 36| while (p + 8 <= pend)
# 37| {
# 38|-> crc = (uint32) _mm_crc32_u64(crc, *((const uint64 *) p));
# 39| p += 8;
# 40| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_crc32c_sse42.c:45:23: note[note]: called from here
# 43| if (p + 4 <= pend)
# 44| {
# 45|-> crc = _mm_crc32_u32(crc, *((const unsigned int *) p));
# 46| p += 4;
# 47| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_crc32c_sse42.c:64:23: note[note]: called from here
# 62| while (p < pend)
# 63| {
# 64|-> crc = _mm_crc32_u8(crc, *p);
# 65| p++;
# 66| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:35:25: warning[-Wpsabi]: AVX512F vector return without AVX512F enabled changes the ABI
# 33| __m512i val,
# 34| cnt;
# 35|-> __m512i accum = _mm512_setzero_si512();
# 36| const char *final;
# 37| int tail_idx;
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:35:33: note[note]: called from here
# 33| __m512i val,
# 34| cnt;
# 35|-> __m512i accum = _mm512_setzero_si512();
# 36| const char *final;
# 37| int tail_idx;
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:56:23: note[note]: called from here
# 54| if (buf < final)
# 55| {
# 56|-> val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
# 57| cnt = _mm512_popcnt_epi64(val);
# 58| accum = _mm512_add_epi64(accum, cnt);
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:57:23: note[note]: called from here
# 55| {
# 56| val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
# 57|-> cnt = _mm512_popcnt_epi64(val);
# 58| accum = _mm512_add_epi64(accum, cnt);
# 59|
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:58:25: note[note]: called from here
# 56| val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
# 57| cnt = _mm512_popcnt_epi64(val);
# 58|-> accum = _mm512_add_epi64(accum, cnt);
# 59|
# 60| buf += sizeof(__m512i);
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:65:31: note[note]: called from here
# 63| for (; buf < final; buf += sizeof(__m512i))
# 64| {
# 65|-> val = _mm512_load_si512((const __m512i *) buf);
# 66| cnt = _mm512_popcnt_epi64(val);
# 67| accum = _mm512_add_epi64(accum, cnt);
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:66:31: note[note]: called from here
# 64| {
# 65| val = _mm512_load_si512((const __m512i *) buf);
# 66|-> cnt = _mm512_popcnt_epi64(val);
# 67| accum = _mm512_add_epi64(accum, cnt);
# 68| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:67:33: note[note]: called from here
# 65| val = _mm512_load_si512((const __m512i *) buf);
# 66| cnt = _mm512_popcnt_epi64(val);
# 67|-> accum = _mm512_add_epi64(accum, cnt);
# 68| }
# 69| }
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:74:15: note[note]: called from here
# 72| mask &= (~UINT64CONST(0) >> (sizeof(__m512i) - tail_idx));
# 73|
# 74|-> val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
# 75| cnt = _mm512_popcnt_epi64(val);
# 76| accum = _mm512_add_epi64(accum, cnt);
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:75:15: note[note]: called from here
# 73|
# 74| val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
# 75|-> cnt = _mm512_popcnt_epi64(val);
# 76| accum = _mm512_add_epi64(accum, cnt);
# 77|
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:76:17: note[note]: called from here
# 74| val = _mm512_maskz_loadu_epi8(mask, (const __m512i *) buf);
# 75| cnt = _mm512_popcnt_epi64(val);
# 76|-> accum = _mm512_add_epi64(accum, cnt);
# 77|
# 78| return _mm512_reduce_add_epi64(accum);
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512.c:78:16: note[note]: called from here
# 76| accum = _mm512_add_epi64(accum, cnt);
# 77|
# 78|-> return _mm512_reduce_add_epi64(accum);
# 79| }
# 80|
Error: COMPILER_WARNING:
postgresql-18.3/postgresql-17.9/src/port/pg_popcount_avx512_choose.c:64:17: note[note]: called from here
# 62| {
# 63| #ifdef HAVE_XSAVE_INTRINSICS
# 64|-> return (_xgetbv(0) & 0xe6) == 0xe6;
# 65| #else
# 66| return false;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1403:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘str’
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1282:1: enter_function: entry to ‘pg_strfromd’
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1312:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1321:20: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1329:21: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1331:25: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/port/snprintf.c:1364:9: call_function: calling ‘dostr’ from ‘pg_strfromd’
# 1401| }
# 1402| avail = Min(avail, slen);
# 1403|-> memmove(target->bufptr, str, avail);
# 1404| target->bufptr += avail;
# 1405| str += avail;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1002:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:960:6: branch_true: following ‘true’ branch...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:966:28: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:989:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:991:7: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1000:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1002:9: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1002:9: danger: use of uninitialized value ‘yyss’ here
# 1000| if (! yyptr)
# 1001| YYNOMEM;
# 1002|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1003| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1004| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1129:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:960:6: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1024:6: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1024:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1027:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1039:6: branch_true: following ‘true’ branch (when ‘yyn == -14’)...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1040:5: branch_true: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1109:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1111:3: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specparse.c:1129:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1127| unconditionally makes the parser a bit smaller, and it avoids a
# 1128| GCC warning that YYVAL may be used uninitialized. */
# 1129|-> yyval = yyvsp[1-yylen];
# 1130|
# 1131|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1727:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1714:21: enter_function: entry to ‘spec_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1718:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_create_buffer’
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1719:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1722:2: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1727:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1725| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1726| * we need to put in 2 end-of-buffer characters.
# 1727|-> */
# 1728| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1729| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1768: warning[nullPointer]: Possible null pointer dereference: b
# 1766|
# 1767| yy_flush_buffer( b );
# 1768|->
# 1769| b->yy_input_file = file;
# 1770| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1769: warning[nullPointer]: Possible null pointer dereference: b
# 1767| yy_flush_buffer( b );
# 1768|
# 1769|-> b->yy_input_file = file;
# 1770| b->yy_fill_buffer = 1;
# 1771|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1982:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1966:17: enter_function: entry to ‘spec_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1975:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_scan_bytes’
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1976:12: branch_false: following ‘false’ branch...
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1976:12: branch_false: ...to here
postgresql-18.3/postgresql-17.9/src/test/isolation/specscanner.c:1984:6: call_function: calling ‘spec_yy_scan_buffer’ from ‘spec_yy_scan_bytes’
# 1980| for ( i = 0; i < _yybytes_len; ++i )
# 1981| buf[i] = yybytes[i];
# 1982|->
# 1983| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1984|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/test/regress/pg_regress.c: scope_hint: In function ‘get_expectfile’
postgresql-18.3/postgresql-17.9/src/test/regress/pg_regress.c:698:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 698 | if (!file || !(file_type = strrchr(file, '.')))
# | ^
# 696| * following the last dot in the file name.
# 697| */
# 698|-> if (!file || !(file_type = strrchr(file, '.')))
# 699| return NULL;
# 700|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/postgresql-17.9/src/test/regress/pg_regress.c:698:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 696| * following the last dot in the file name.
# 697| */
# 698|-> if (!file || !(file_type = strrchr(file, '.')))
# 699| return NULL;
# 700|
Error: CPPCHECK_WARNING (CWE-190):
postgresql-18.3/postgresql-17.9/src/test/regress/regress.c:769: error[integerOverflow]: Signed integer overflow for expression '-0x7FFF-1'.
# 767| expected = PG_INT16_MAX + 1;
# 768| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 769|-> expected = PG_INT16_MIN;
# 770| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 771| expected = PG_INT16_MIN - 1;
Error: CPPCHECK_WARNING (CWE-190):
postgresql-18.3/postgresql-17.9/src/test/regress/regress.c:771: error[integerOverflow]: Signed integer overflow for expression '(-0x7FFF-1)-1'.
# 769| expected = PG_INT16_MIN;
# 770| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 771|-> expected = PG_INT16_MIN - 1;
# 772| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 773|
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:15:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_transaction__start_semaphore’
# 15 | __extension__ unsigned short postgresql_transaction__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:24:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_transaction__commit_semaphore’
# 24 | __extension__ unsigned short postgresql_transaction__commit_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:33:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_transaction__abort_semaphore’
# 33 | __extension__ unsigned short postgresql_transaction__abort_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:42:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__acquire_semaphore’
# 42 | __extension__ unsigned short postgresql_lwlock__acquire_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:51:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__release_semaphore’
# 51 | __extension__ unsigned short postgresql_lwlock__release_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:60:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__wait__start_semaphore’
# 60 | __extension__ unsigned short postgresql_lwlock__wait__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:69:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__wait__done_semaphore’
# 69 | __extension__ unsigned short postgresql_lwlock__wait__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:78:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__condacquire_semaphore’
# 78 | __extension__ unsigned short postgresql_lwlock__condacquire_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:87:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__condacquire__fail_semaphore’
# 87 | __extension__ unsigned short postgresql_lwlock__condacquire__fail_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:96:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__acquire__or__wait_semaphore’
# 96 | __extension__ unsigned short postgresql_lwlock__acquire__or__wait_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:105:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lwlock__acquire__or__wait__fail_semaphore’
# 105 | __extension__ unsigned short postgresql_lwlock__acquire__or__wait__fail_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:114:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lock__wait__start_semaphore’
# 114 | __extension__ unsigned short postgresql_lock__wait__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:123:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_lock__wait__done_semaphore’
# 123 | __extension__ unsigned short postgresql_lock__wait__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:132:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__parse__start_semaphore’
# 132 | __extension__ unsigned short postgresql_query__parse__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:141:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__parse__done_semaphore’
# 141 | __extension__ unsigned short postgresql_query__parse__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:150:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__rewrite__start_semaphore’
# 150 | __extension__ unsigned short postgresql_query__rewrite__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:159:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__rewrite__done_semaphore’
# 159 | __extension__ unsigned short postgresql_query__rewrite__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:168:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__plan__start_semaphore’
# 168 | __extension__ unsigned short postgresql_query__plan__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:177:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__plan__done_semaphore’
# 177 | __extension__ unsigned short postgresql_query__plan__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:186:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__execute__start_semaphore’
# 186 | __extension__ unsigned short postgresql_query__execute__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:195:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__execute__done_semaphore’
# 195 | __extension__ unsigned short postgresql_query__execute__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:204:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__start_semaphore’
# 204 | __extension__ unsigned short postgresql_query__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:213:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_query__done_semaphore’
# 213 | __extension__ unsigned short postgresql_query__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:222:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_statement__status_semaphore’
# 222 | __extension__ unsigned short postgresql_statement__status_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:231:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_sort__start_semaphore’
# 231 | __extension__ unsigned short postgresql_sort__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:240:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_sort__done_semaphore’
# 240 | __extension__ unsigned short postgresql_sort__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:249:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__read__start_semaphore’
# 249 | __extension__ unsigned short postgresql_buffer__read__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:258:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__read__done_semaphore’
# 258 | __extension__ unsigned short postgresql_buffer__read__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:267:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__flush__start_semaphore’
# 267 | __extension__ unsigned short postgresql_buffer__flush__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:276:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__flush__done_semaphore’
# 276 | __extension__ unsigned short postgresql_buffer__flush__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:285:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__extend__start_semaphore’
# 285 | __extension__ unsigned short postgresql_buffer__extend__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:294:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__extend__done_semaphore’
# 294 | __extension__ unsigned short postgresql_buffer__extend__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:303:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__checkpoint__start_semaphore’
# 303 | __extension__ unsigned short postgresql_buffer__checkpoint__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:312:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__checkpoint__sync__start_semaphore’
# 312 | __extension__ unsigned short postgresql_buffer__checkpoint__sync__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:321:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__checkpoint__done_semaphore’
# 321 | __extension__ unsigned short postgresql_buffer__checkpoint__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:330:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__sync__start_semaphore’
# 330 | __extension__ unsigned short postgresql_buffer__sync__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:339:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__sync__written_semaphore’
# 339 | __extension__ unsigned short postgresql_buffer__sync__written_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:348:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_buffer__sync__done_semaphore’
# 348 | __extension__ unsigned short postgresql_buffer__sync__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:357:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_deadlock__found_semaphore’
# 357 | __extension__ unsigned short postgresql_deadlock__found_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:366:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_checkpoint__start_semaphore’
# 366 | __extension__ unsigned short postgresql_checkpoint__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:375:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_checkpoint__done_semaphore’
# 375 | __extension__ unsigned short postgresql_checkpoint__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:384:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_clog__checkpoint__start_semaphore’
# 384 | __extension__ unsigned short postgresql_clog__checkpoint__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:393:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_clog__checkpoint__done_semaphore’
# 393 | __extension__ unsigned short postgresql_clog__checkpoint__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:402:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_subtrans__checkpoint__start_semaphore’
# 402 | __extension__ unsigned short postgresql_subtrans__checkpoint__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:411:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_subtrans__checkpoint__done_semaphore’
# 411 | __extension__ unsigned short postgresql_subtrans__checkpoint__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:420:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_multixact__checkpoint__start_semaphore’
# 420 | __extension__ unsigned short postgresql_multixact__checkpoint__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:429:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_multixact__checkpoint__done_semaphore’
# 429 | __extension__ unsigned short postgresql_multixact__checkpoint__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:438:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_twophase__checkpoint__start_semaphore’
# 438 | __extension__ unsigned short postgresql_twophase__checkpoint__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:447:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_twophase__checkpoint__done_semaphore’
# 447 | __extension__ unsigned short postgresql_twophase__checkpoint__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:456:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_smgr__md__read__start_semaphore’
# 456 | __extension__ unsigned short postgresql_smgr__md__read__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:465:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_smgr__md__read__done_semaphore’
# 465 | __extension__ unsigned short postgresql_smgr__md__read__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:474:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_smgr__md__write__start_semaphore’
# 474 | __extension__ unsigned short postgresql_smgr__md__write__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:483:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_smgr__md__write__done_semaphore’
# 483 | __extension__ unsigned short postgresql_smgr__md__write__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:492:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_wal__insert_semaphore’
# 492 | __extension__ unsigned short postgresql_wal__insert_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:501:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_wal__switch_semaphore’
# 501 | __extension__ unsigned short postgresql_wal__switch_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:510:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_wal__buffer__write__dirty__start_semaphore’
# 510 | __extension__ unsigned short postgresql_wal__buffer__write__dirty__start_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: COMPILER_WARNING:
postgresql-18.3/src/backend/.dtrace-temp.a5ea52e2.c:519:30: warning[-Wmissing-variable-declarations]: no previous declaration for ‘postgresql_wal__buffer__write__dirty__done_semaphore’
# 519 | __extension__ unsigned short postgresql_wal__buffer__write__dirty__done_semaphore __attribute__ ((unused)) __attribute__ ((section (".probes"))) __attribute__ ((visibility ("hidden")));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:813:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2998:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:3024:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 811| range->values[i] = PointerGetDatum(dataptr);
# 812|
# 813|-> memcpy(dataptr, ptr, typlen);
# 814| dataptr += MAXALIGN(typlen);
# 815|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:822:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2998:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:3024:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 820| range->values[i] = PointerGetDatum(dataptr);
# 821|
# 822|-> memcpy(dataptr, ptr, VARSIZE_ANY(ptr));
# 823| dataptr += MAXALIGN(VARSIZE_ANY(ptr));
# 824| ptr += VARSIZE_ANY(ptr);
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:832:25: warning[-Wanalyzer-null-argument]: use of NULL ‘dataptr’ where non-null expected
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2998:1: enter_function: entry to ‘brin_minmax_multi_summary_out’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:3024:31: call_function: calling ‘brin_range_deserialize’ from ‘brin_minmax_multi_summary_out’
# 830| range->values[i] = PointerGetDatum(dataptr);
# 831|
# 832|-> memcpy(dataptr, ptr, slen);
# 833| dataptr += MAXALIGN(slen);
# 834| ptr += slen;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:1517:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘distances’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2735:1: enter_function: entry to ‘brin_minmax_multi_union’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2823:21: call_function: calling ‘build_distances’ from ‘brin_minmax_multi_union’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2823:21: return_function: returning to ‘brin_minmax_multi_union’ from ‘build_distances’
postgresql-18.3/src/backend/access/brin/brin_minmax_multi.c:2836:20: call_function: calling ‘reduce_expanded_ranges’ from ‘brin_minmax_multi_union’
# 1515| {
# 1516| /* index of the gap between (index) and (index+1) ranges */
# 1517|-> int index = distances[i].index;
# 1518|
# 1519| Assert((index >= 0) && ((index + 1) < neranges));
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:972: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 970| len += targetDataLen;
# 971|
# 972|-> *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 973| (*targetMinimalTuple)->t_len = len;
# 974| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:973: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 971|
# 972| *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 973|-> (*targetMinimalTuple)->t_len = len;
# 974| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 975| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:974: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 972| *targetMinimalTuple = (MinimalTuple) palloc0(len);
# 973| (*targetMinimalTuple)->t_len = len;
# 974|-> (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 975| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 976| /* Same macro works for MinimalTuples */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:975: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 973| (*targetMinimalTuple)->t_len = len;
# 974| (*targetMinimalTuple)->t_hoff = hoff + MINIMAL_TUPLE_OFFSET;
# 975|-> (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 976| /* Same macro works for MinimalTuples */
# 977| HeapTupleHeaderSetNatts(*targetMinimalTuple, natts);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:977: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 975| (*targetMinimalTuple)->t_infomask = sourceTHeader->t_infomask;
# 976| /* Same macro works for MinimalTuples */
# 977|-> HeapTupleHeaderSetNatts(*targetMinimalTuple, natts);
# 978| if (targetNullLen > 0)
# 979| nullBits = (bits8 *) ((char *) *targetMinimalTuple
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:981: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 979| nullBits = (bits8 *) ((char *) *targetMinimalTuple
# 980| + offsetof(MinimalTupleData, t_bits));
# 981|-> targetData = (char *) *targetMinimalTuple + hoff;
# 982| infoMask = &((*targetMinimalTuple)->t_infomask);
# 983| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/common/heaptuple.c:982: warning[nullPointer]: Possible null pointer dereference: targetMinimalTuple
# 980| + offsetof(MinimalTupleData, t_bits));
# 981| targetData = (char *) *targetMinimalTuple + hoff;
# 982|-> infoMask = &((*targetMinimalTuple)->t_infomask);
# 983| }
# 984|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/gin/ginbtree.c:412:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-18.3/src/backend/access/gin/ginbtree.c:816:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/src/backend/access/gin/ginbtree.c:822:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/gin/ginbtree.c:823:17: branch_true: ...to here
postgresql-18.3/src/backend/access/gin/ginbtree.c:823:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 410| if (BufferIsValid(childbuf))
# 411| {
# 412|-> GinPageGetOpaque(childpage)->flags &= ~GIN_INCOMPLETE_SPLIT;
# 413| MarkBufferDirty(childbuf);
# 414| if (RelationNeedsWAL(btree->index) && !btree->isBuild)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/gin/ginbtree.c:484:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-18.3/src/backend/access/gin/ginbtree.c:816:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/src/backend/access/gin/ginbtree.c:822:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/gin/ginbtree.c:823:17: branch_true: ...to here
postgresql-18.3/src/backend/access/gin/ginbtree.c:823:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 482| {
# 483| data.leftChildBlkno = BufferGetBlockNumber(childbuf);
# 484|-> data.rightChildBlkno = GinPageGetOpaque(childpage)->rightlink;
# 485| }
# 486| else
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/gin/ginbtree.c:576:25: warning[-Wanalyzer-null-argument]: use of NULL ‘newrootpg’ where non-null expected
postgresql-18.3/src/backend/access/gin/ginbtree.c:816:1: enter_function: entry to ‘ginInsertValue’
postgresql-18.3/src/backend/access/gin/ginbtree.c:822:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/gin/ginbtree.c:823:17: branch_true: ...to here
postgresql-18.3/src/backend/access/gin/ginbtree.c:823:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
# 574| /* Splitting the root, three pages to update */
# 575| MarkBufferDirty(lbuffer);
# 576|-> memcpy(page, newrootpg, BLCKSZ);
# 577| memcpy(BufferGetPage(lbuffer), newlpage, BLCKSZ);
# 578| memcpy(BufferGetPage(rbuffer), newrpage, BLCKSZ);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/access/gin/ginentrypage.c:630: error[legacyUninitvar]: Uninitialized variable: tupstore
# 628| */
# 629| maxoff = PageGetMaxOffsetNumber(lpage);
# 630|-> ptr = tupstore[0].data;
# 631| for (i = FirstOffsetNumber; i <= maxoff; i++)
# 632| {
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
postgresql-18.3/src/backend/access/hash/hashpage.c:1516:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/hash/hashpage.c:1521:21: branch_false: ...to here
postgresql-18.3/src/backend/access/hash/hashpage.c:1529:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/hash/hashpage.c:1530:25: branch_true: ...to here
postgresql-18.3/src/backend/access/hash/hashpage.c:1531:24: release_memory: using NULL here
postgresql-18.3/src/backend/access/hash/hashpage.c:1531:17: danger: argument 1 (‘*rel.rd_amcache’) NULL where non-null expected
# 1529| if (rel->rd_amcache == NULL)
# 1530| rel->rd_amcache = cache;
# 1531|-> memcpy(rel->rd_amcache, HashPageGetMeta(page),
# 1532| sizeof(HashMetaPageData));
# 1533|
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL ‘*rel.rd_amcache’ where non-null expected
postgresql-18.3/src/backend/access/hash/hashpage.c:1559:1: enter_function: entry to ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/src/backend/access/hash/hashpage.c:1573:17: call_function: calling ‘_hash_getcachedmetap’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/src/backend/access/hash/hashpage.c:1573:17: return_function: returning to ‘_hash_getbucketbuf_from_hashkey’ from ‘_hash_getcachedmetap’
postgresql-18.3/src/backend/access/hash/hashpage.c:1592:23: call_function: calling ‘_hash_getbuf’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/src/backend/access/hash/hashpage.c:1592:23: return_function: returning to ‘_hash_getbucketbuf_from_hashkey’ from ‘_hash_getbuf’
postgresql-18.3/src/backend/access/hash/hashpage.c:1601:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/hash/hashpage.c:1605:17: call_function: inlined call to ‘_hash_relbuf’ from ‘_hash_getbucketbuf_from_hashkey’
postgresql-18.3/src/backend/access/hash/hashpage.c:1606:25: call_function: calling ‘_hash_getcachedmetap’ from ‘_hash_getbucketbuf_from_hashkey’
# 1529| if (rel->rd_amcache == NULL)
# 1530| rel->rd_amcache = cache;
# 1531|-> memcpy(rel->rd_amcache, HashPageGetMeta(page),
# 1532| sizeof(HashMetaPageData));
# 1533|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/access/heap/heapam.c:5916: error[legacyUninitvar]: Uninitialized variable: status
# 5914| }
# 5915|
# 5916|-> result = test_lockmode_for_conflict(status, rawxmax, mode,
# 5917| &mytup, &needwait);
# 5918|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/access/heap/heapam.c:6485: error[legacyUninitvar]: Uninitialized variable: ret
# 6483| * don't bother optimizing that.
# 6484| */
# 6485|-> if (!ret)
# 6486| {
# 6487| UnlockTuple(relation, &oldtup.t_self, InplaceUpdateTupleLock);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:881:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:755:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:796:13: branch_false: ...to here
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:827:12: branch_true: following ‘true’ branch (when ‘newaction == 0’)...
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:834:27: branch_true: ...to here
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:840:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:843:21: branch_false: ...to here
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:843:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:846:25: branch_true: ...to here
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:849:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:856:17: branch_false: ...to here
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:870:20: branch_true: following ‘true’ branch (when ‘prefixlen != 0’)...
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:875:31: branch_true: ...to here
postgresql-18.3/src/backend/access/heap/heapam_xlog.c:881:63: danger: dereference of NULL ‘oldtup.t_data’
# 879|
# 880| /* copy prefix from old tuple */
# 881|-> memcpy(newp, (char *) oldtup.t_data + oldtup.t_data->t_hoff, prefixlen);
# 882| newp += prefixlen;
# 883|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/nbtree/nbtpreprocesskeys.c:901:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘array’
postgresql-18.3/src/backend/access/nbtree/nbtpreprocesskeys.c:1258:1: enter_function: entry to ‘_bt_skiparray_shrink’
postgresql-18.3/src/backend/access/nbtree/nbtpreprocesskeys.c:1299:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtpreprocesskeys.c:1302:38: branch_true: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtpreprocesskeys.c:1302:38: call_function: calling ‘_bt_compare_scankey_args’ from ‘_bt_skiparray_shrink’
# 899| /* Skip array will have no NULL element/IS NULL scan key */
# 900| Assert(array->num_elems == -1);
# 901|-> array->null_elem = false;
# 902|
# 903| /* IS NOT NULL key (could be leftarg or rightarg) now redundant */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:1163:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:934:1: enter_function: entry to ‘_bt_strategy’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:954:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:961:9: branch_true: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:961:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:961:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:962:20: release_memory: ‘leftinterval’ is NULL
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:962:20: call_function: calling ‘_bt_split_lastleft’ from ‘_bt_strategy’
# 1161| ItemId itemid;
# 1162|
# 1163|-> if (split->newitemonleft && split->firstrightoff == state->newitemoff)
# 1164| return state->newitem;
# 1165|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:1179:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:934:1: enter_function: entry to ‘_bt_strategy’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:954:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:961:9: branch_true: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:961:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:961:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:963:21: release_memory: ‘rightinterval’ is NULL
postgresql-18.3/src/backend/access/nbtree/nbtsplitloc.c:963:21: call_function: calling ‘_bt_split_firstright’ from ‘_bt_strategy’
# 1177| ItemId itemid;
# 1178|
# 1179|-> if (!split->newitemonleft && split->firstrightoff == state->newitemoff)
# 1180| return state->newitem;
# 1181|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:452: error[ctunullpointer]: Null pointer dereference: array
# 450| Assert(!ScanDirectionIsNoMovement(dir));
# 451|
# 452|-> if (array->null_elem)
# 453| {
# 454| Assert(!array->low_compare && !array->high_compare);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:452: warning[nullPointer]: Possible null pointer dereference: array
# 450| Assert(!ScanDirectionIsNoMovement(dir));
# 451|
# 452|-> if (array->null_elem)
# 453| {
# 454| Assert(!array->low_compare && !array->high_compare);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:452:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘array’
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:3194:1: enter_function: entry to ‘_bt_checkkeys_look_ahead’
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:3205:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:3212:12: branch_false: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:3238:13: call_function: calling ‘_bt_tuple_before_array_skeys’ from ‘_bt_checkkeys_look_ahead’
# 450| Assert(!ScanDirectionIsNoMovement(dir));
# 451|
# 452|-> if (array->null_elem)
# 453| {
# 454| Assert(!array->low_compare && !array->high_compare);
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/spgist/spgscan.c:123:17: warning[-Wanalyzer-null-argument]: use of NULL ‘distances’ where non-null expected
postgresql-18.3/src/backend/access/spgist/spgscan.c:942:1: enter_function: entry to ‘spggetbitmap’
postgresql-18.3/src/backend/access/spgist/spgscan.c:952:9: call_function: calling ‘spgWalk’ from ‘spggetbitmap’
# 121|
# 122| if (!isnull && so->numberOfNonNullOrderBys > 0)
# 123|-> memcpy(item->distances, distances,
# 124| sizeof(item->distances[0]) * so->numberOfNonNullOrderBys);
# 125|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/spgist/spgutils.c:803:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/access/spgist/spgutils.c:1002:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-18.3/src/backend/access/spgist/spgutils.c:1045:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1045:13: branch_false: ...to here
postgresql-18.3/src/backend/access/spgist/spgutils.c:1045:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1051:34: branch_false: ...to here
postgresql-18.3/src/backend/access/spgist/spgutils.c:1057:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1058:17: branch_true: ...to here
postgresql-18.3/src/backend/access/spgist/spgutils.c:1058:17: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1058:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
# 801| if (att->attbyval)
# 802| {
# 803|-> memcpy(target, &datum, sizeof(Datum));
# 804| }
# 805| else
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/access/spgist/spgutils.c:808:17: warning[-Wanalyzer-null-argument]: use of NULL ‘target’ where non-null expected
postgresql-18.3/src/backend/access/spgist/spgutils.c:1002:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-18.3/src/backend/access/spgist/spgutils.c:1045:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1045:13: branch_false: ...to here
postgresql-18.3/src/backend/access/spgist/spgutils.c:1045:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1051:34: branch_false: ...to here
postgresql-18.3/src/backend/access/spgist/spgutils.c:1057:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1058:17: branch_true: ...to here
postgresql-18.3/src/backend/access/spgist/spgutils.c:1058:17: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/spgist/spgutils.c:1058:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
# 806| {
# 807| size = (att->attlen > 0) ? att->attlen : VARSIZE_ANY(datum);
# 808|-> memcpy(target, DatumGetPointer(datum), size);
# 809| }
# 810| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/access/transam/commit_ts.c:452: warning[uninitvar]: Uninitialized variable: values
# 450| }
# 451|
# 452|-> htup = heap_form_tuple(tupdesc, values, nulls);
# 453|
# 454| PG_RETURN_DATUM(HeapTupleGetDatum(htup));
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/access/transam/commit_ts.c:493: warning[uninitvar]: Uninitialized variable: values
# 491| }
# 492|
# 493|-> htup = heap_form_tuple(tupdesc, values, nulls);
# 494|
# 495| PG_RETURN_DATUM(HeapTupleGetDatum(htup));
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/access/transam/twophase.c:1037: error[ctunullpointer]: Null pointer dereference: data
# 1035| }
# 1036|
# 1037|-> memcpy(((char *) records.tail->data) + records.tail->len, data, len);
# 1038| records.tail->len += padlen;
# 1039| records.bytes_free -= padlen;
Error: CPPCHECK_WARNING (CWE-682):
postgresql-18.3/src/backend/access/transam/xlog.c:1651: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 1649| Assert(((XLogPageHeader) cachedPos)->xlp_magic == XLOG_PAGE_MAGIC);
# 1650| Assert(((XLogPageHeader) cachedPos)->xlp_pageaddr == ptr - (ptr % XLOG_BLCKSZ));
# 1651|-> return cachedPos + ptr % XLOG_BLCKSZ;
# 1652| }
# 1653|
Error: GCC_ANALYZER_WARNING (CWE-131):
postgresql-18.3/src/backend/access/transam/xloginsert.c:232:9: warning[-Wanalyzer-allocation-size]: allocated buffer size is not a multiple of the pointee's size
postgresql-18.3/src/backend/access/transam/xloginsert.c:1237:1: enter_function: entry to ‘log_newpage_buffer’
postgresql-18.3/src/backend/access/transam/xloginsert.c:1249:16: call_function: calling ‘log_newpage’ from ‘log_newpage_buffer’
# 230| max_registered_block_id = 0;
# 231| mainrdata_len = 0;
# 232|-> mainrdata_last = (XLogRecData *) &mainrdata_head;
# 233| curinsert_flags = 0;
# 234| begininsert_called = false;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1733:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1671:1: enter_function: entry to ‘PerformWalRecovery’
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1721:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1724:17: branch_true: ...to here
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1726:26: call_function: calling ‘ReadRecord’ from ‘PerformWalRecovery’
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1726:26: return_function: returning to ‘PerformWalRecovery’ from ‘ReadRecord’
postgresql-18.3/src/backend/access/transam/xlogrecovery.c:1733:21: danger: dereference of NULL ‘ReadRecord(xlogprefetcher, 23, 0, RedoStartTLI)’
# 1731| * record.
# 1732| */
# 1733|-> if (record->xl_rmid != RM_XLOG_ID ||
# 1734| (record->xl_info & ~XLR_INFO_MASK) != XLOG_CHECKPOINT_REDO)
# 1735| ereport(FATAL,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/backup/basebackup.c:648: warning[uninitvar]: Uninitialized variable: endptr
# 646|
# 647| AddWALInfoToBackupManifest(&manifest, state.startptr, state.starttli,
# 648|-> endptr, endtli);
# 649|
# 650| SendBackupManifest(&manifest, sink);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/backup/basebackup.c:648: warning[uninitvar]: Uninitialized variable: endtli
# 646|
# 647| AddWALInfoToBackupManifest(&manifest, state.startptr, state.starttli,
# 648|-> endptr, endtli);
# 649|
# 650| SendBackupManifest(&manifest, sink);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/backup/basebackup_copy.c:418: warning[uninitvar]: Uninitialized variable: values
# 416| nulls[2] = true;
# 417|
# 418|-> do_tup_output(tstate, values, nulls);
# 419| }
# 420|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/bootstrap/bootparse.c:1150:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1114:28: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1137:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1139:7: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1148:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1150:9: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1150:9: danger: use of uninitialized value ‘yyss’ here
# 1148| if (! yyptr)
# 1149| YYNOMEM;
# 1150|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1151| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1152| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:162:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:162:41: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:162:41: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:162:41: danger: out-of-bounds read from byte -24 till byte -21 but ‘yyvsa’ starts at byte 0
# 160| do_start();
# 161| numattr = 0;
# 162|-> elog(DEBUG4, "creating%s%s relation %s %u",
# 163| $4 ? " bootstrap" : "",
# 164| $5 ? " shared" : "",
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:182:59: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:182:59: danger: out-of-bounds read from byte -40 till byte -37 but ‘yyvsa’ starts at byte 0
# 180| tupdesc = CreateTupleDesc(numattr, attrtypes);
# 181|
# 182|-> shared_relation = $5;
# 183|
# 184| /*
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:193:60: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:193:60: danger: out-of-bounds read from byte -48 till byte -45 but ‘yyvsa’ starts at byte 0
# 191| * in relcache.c) must be mapped.
# 192| */
# 193|-> mapped_relation = ($4 || shared_relation);
# 194|
# 195| if ($4)
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:206:64: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:195:44: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:200:53: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:206:64: danger: out-of-bounds read from byte -56 till byte -53 but ‘yyvsa’ starts at byte 0
# 204| }
# 205|
# 206|-> boot_reldesc = heap_create($2,
# 207| PG_CATALOG_NAMESPACE,
# 208| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:206:76: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:195:44: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:200:53: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:206:76: danger: out-of-bounds read from byte -64 till byte -57 but ‘yyvsa’ starts at byte 0
# 204| }
# 205|
# 206|-> boot_reldesc = heap_create($2,
# 207| PG_CATALOG_NAMESPACE,
# 208| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:227:54: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:195:44: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:227:54: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:227:54: danger: out-of-bounds read from byte -32 till byte -29 but ‘yyvsa’ starts at byte 0
# 225| Oid id;
# 226|
# 227|-> id = heap_create_with_catalog($2,
# 228| PG_CATALOG_NAMESPACE,
# 229| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:227:79: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:195:44: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:227:54: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:227:79: danger: out-of-bounds read from byte -64 till byte -57 but ‘yyvsa’ starts at byte 0
# 225| Oid id;
# 226|
# 227|-> id = heap_create_with_catalog($2,
# 228| PG_CATALOG_NAMESPACE,
# 229| shared_relation ? GLOBALTABLESPACE_OID : 0,
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:279:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1029:1: enter_function: entry to ‘boot_yyparse’
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:276:60: call_function: inlined call to ‘newNode’ from ‘boot_yyparse’
postgresql-18.3/src/backend/bootstrap/bootparse.y:279:41: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:279:41: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:279:41: danger: out-of-bounds read from byte -56 till byte -49 but ‘yyvsa’ starts at byte 0
# 277| Oid relationId;
# 278|
# 279|-> elog(DEBUG4, "creating index \"%s\"", $3);
# 280|
# 281| do_start();
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:332:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1029:1: enter_function: entry to ‘boot_yyparse’
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:329:60: call_function: inlined call to ‘newNode’ from ‘boot_yyparse’
postgresql-18.3/src/backend/bootstrap/bootparse.y:332:41: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.y:332:41: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:332:41: danger: out-of-bounds read from byte -56 till byte -49 but ‘yyvsa’ starts at byte 0
# 330| Oid relationId;
# 331|
# 332|-> elog(DEBUG4, "creating unique index \"%s\"", $4);
# 333|
# 334| do_start();
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/bootstrap/bootparse.y:386:41: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_false: following ‘false’ branch (when ‘yyn != -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1193:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1196:16: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1205:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1217:17: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1224:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1227:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1237:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1244:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1108:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1172:6: branch_false: following ‘false’ branch (when ‘yystate != 46’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1175:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1187:6: branch_true: following ‘true’ branch (when ‘yyn == -53’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1188:5: branch_true: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.c:1257:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/bootstrap/bootparse.c:1259:3: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootparse.y:386:41: danger: out-of-bounds read from byte -8 till byte -5 but ‘yyvsa’ starts at byte 0
# 384| do_start();
# 385|
# 386|-> BootstrapToastTable($6, $3, $4);
# 387| do_end();
# 388| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1823:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1702:10: enter_function: entry to ‘boot_yyrestart’
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1707:16: call_function: calling ‘boot_yyensure_buffer_stack’ from ‘boot_yyrestart’
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1707:16: return_function: returning to ‘boot_yyrestart’ from ‘boot_yyensure_buffer_stack’
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1709:27: call_function: calling ‘boot_yy_create_buffer’ from ‘boot_yyrestart’
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1709:27: return_function: returning to ‘boot_yyrestart’ from ‘boot_yy_create_buffer’
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1712:2: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1712:2: branch_false: ...to here
postgresql-18.3/src/backend/bootstrap/bootscanner.c:1712:2: call_function: calling ‘boot_yy_init_buffer’ from ‘boot_yyrestart’
# 1821|
# 1822| yy_flush_buffer( b , yyscanner);
# 1823|->
# 1824| b->yy_input_file = file;
# 1825| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/catalog/heap.c:3110: warning[nullPointer]: Possible null pointer dereference: conname
# 3108| foreach_ptr(char, thisname, nnnames)
# 3109| {
# 3110|-> if (strcmp(thisname, conname) == 0)
# 3111| {
# 3112| conname = NULL;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/catalog/partition.c:288:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-18.3/src/backend/catalog/partition.c:255:1: enter_function: entry to ‘has_partition_attrs’
postgresql-18.3/src/backend/catalog/partition.c:263:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/catalog/partition.c:270:26: call_function: inlined call to ‘list_head’ from ‘has_partition_attrs’
postgresql-18.3/src/backend/catalog/partition.c:271:9: branch_false: ...to here
postgresql-18.3/src/backend/catalog/partition.c:271:21: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/catalog/partition.c:273:45: call_function: inlined call to ‘get_partition_col_attnum’ from ‘has_partition_attrs’
postgresql-18.3/src/backend/catalog/partition.c:275:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/catalog/partition.c:288:37: branch_false: ...to here
postgresql-18.3/src/backend/catalog/partition.c:288:37: danger: dereference of NULL ‘partexprs_item’
# 286| {
# 287| /* Arbitrary expression */
# 288|-> Node *expr = (Node *) lfirst(partexprs_item);
# 289| Bitmapset *expr_attrs = NULL;
# 290|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/catalog/pg_publication.c:1162:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/catalog/pg_publication.c:1117:1: enter_function: entry to ‘pg_get_publication_tables’
postgresql-18.3/src/backend/catalog/pg_publication.c:1124:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/catalog/pg_publication.c:1135:27: branch_true: ...to here
postgresql-18.3/src/backend/catalog/pg_publication.c:1148:29: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/catalog/pg_publication.c:1154:57: branch_true: ...to here
postgresql-18.3/src/backend/catalog/pg_publication.c:1154:36: call_function: calling ‘GetPublicationByName’ from ‘pg_get_publication_tables’
postgresql-18.3/src/backend/catalog/pg_publication.c:1154:36: return_function: returning to ‘pg_get_publication_tables’ from ‘GetPublicationByName’
postgresql-18.3/src/backend/catalog/pg_publication.c:1162:29: danger: dereference of NULL ‘GetPublicationByName(text_to_cstring((char *)*<unknown>), 0)’
# 1160| * those. Otherwise, get the partitioned table itself.
# 1161| */
# 1162|-> if (pub_elem->alltables)
# 1163| pub_elem_tables = GetAllTablesPublicationRelations(pub_elem->pubviaroot);
# 1164| else
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/catalog/pg_type.c: scope_hint: In function ‘makeMultirangeTypeName’
postgresql-18.3/src/backend/catalog/pg_type.c:959:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 959 | rangestr = strstr(rangeTypeName, "range");
# | ^
# 957| * "multirange". Otherwise add "_multirange" to the end.
# 958| */
# 959|-> rangestr = strstr(rangeTypeName, "range");
# 960| if (rangestr)
# 961| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/catalog/pg_type.c:959:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 957| * "multirange". Otherwise add "_multirange" to the end.
# 958| */
# 959|-> rangestr = strstr(rangeTypeName, "range");
# 960| if (rangestr)
# 961| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/commands/conversioncmds.c:110: error[uninitvar]: Uninitialized variable: result
# 108| * perform the requested conversion.
# 109| */
# 110|-> funcresult = OidFunctionCall6(funcoid,
# 111| Int32GetDatum(from_encoding),
# 112| Int32GetDatum(to_encoding),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/copy.c:339:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/src/backend/commands/copy.c:332:12: branch_true: following ‘true’ branch (when ‘is_from != 0’)...
postgresql-18.3/src/backend/commands/copy.c:339:21: branch_true: ...to here
postgresql-18.3/src/backend/commands/copy.c:339:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/commands/copy.c:339:38: branch_true: ...to here
postgresql-18.3/src/backend/commands/copy.c:339:38: danger: dereference of NULL ‘rel’
# 337|
# 338| /* check read-only transaction and parallel mode */
# 339|-> if (XactReadOnly && !rel->rd_islocaltemp)
# 340| PreventCommandIfReadOnly("COPY FROM");
# 341|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/commands/copy.c:482: error[legacyUninitvar]: Uninitialized variable: reject_limit
# 480| reject_limit = defGetInt64(def);
# 481|
# 482|-> if (reject_limit <= 0)
# 483| ereport(ERROR,
# 484| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/extension.c:409: error[ctunullpointer]: Null pointer dereference: versionname
# 407| check_valid_version_name(const char *versionname)
# 408| {
# 409|-> int namelen = strlen(versionname);
# 410|
# 411| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/extension.c:409: warning[nullPointer]: Possible null pointer dereference: versionname
# 407| check_valid_version_name(const char *versionname)
# 408| {
# 409|-> int namelen = strlen(versionname);
# 410|
# 411| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/extension.c:3518: warning[nullPointer]: Possible null pointer dereference: versionName
# 3516| * If we're already at that version, just say so
# 3517| */
# 3518|-> if (strcmp(oldVersionName, versionName) == 0)
# 3519| {
# 3520| ereport(NOTICE,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/commands/policy.c:128: error[legacyUninitvar]: Uninitialized variable: polcmd
# 126| elog(ERROR, "unrecognized policy command");
# 127|
# 128|-> return polcmd;
# 129| }
# 130|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/commands/tablecmds.c:9029: warning[uninitvar]: Uninitialized variable: repl_val
# 9027| repl_repl[Anum_pg_attribute_attstattarget - 1] = true;
# 9028| newtuple = heap_modify_tuple(tuple, RelationGetDescr(attrelation),
# 9029|-> repl_val, repl_null, repl_repl);
# 9030| CatalogTupleUpdate(attrelation, &tuple->t_self, newtuple);
# 9031|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/commands/tablecmds.c:9103: warning[uninitvar]: Uninitialized variable: repl_val
# 9101| repl_repl[Anum_pg_attribute_attoptions - 1] = true;
# 9102| newtuple = heap_modify_tuple(tuple, RelationGetDescr(attrelation),
# 9103|-> repl_val, repl_null, repl_repl);
# 9104|
# 9105| /* Update system catalog. */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/commands/tablespace.c:1068: warning[uninitvar]: Uninitialized variable: repl_val
# 1066| repl_null[Anum_pg_tablespace_spcoptions - 1] = true;
# 1067| repl_repl[Anum_pg_tablespace_spcoptions - 1] = true;
# 1068|-> newtuple = heap_modify_tuple(tup, RelationGetDescr(rel), repl_val,
# 1069| repl_null, repl_repl);
# 1070|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/trigger.c:4913: error[ctunullpointer]: Null pointer dereference: table
# 4911| {
# 4912| /* Create it if not already done. */
# 4913|-> if (!table->storeslot)
# 4914| {
# 4915| MemoryContext oldcxt;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/trigger.c:4913: warning[nullPointer]: Possible null pointer dereference: table
# 4911| {
# 4912| /* Create it if not already done. */
# 4913|-> if (!table->storeslot)
# 4914| {
# 4915| MemoryContext oldcxt;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/commands/trigger.c:4929: warning[nullPointer]: Possible null pointer dereference: table
# 4927| }
# 4928|
# 4929|-> return table->storeslot;
# 4930| }
# 4931|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/execJunk.c:176:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
postgresql-18.3/src/backend/executor/execJunk.c:137:1: enter_function: entry to ‘ExecInitJunkFilterConversion’
postgresql-18.3/src/backend/executor/execJunk.c:166:12: branch_true: following ‘true’ branch (when ‘cleanLength > 0’)...
postgresql-18.3/src/backend/executor/execJunk.c:168:43: branch_true: ...to here
postgresql-18.3/src/backend/executor/execJunk.c:169:21: call_function: inlined call to ‘list_head’ from ‘ExecInitJunkFilterConversion’
postgresql-18.3/src/backend/executor/execJunk.c:170:17: branch_false: ...to here
postgresql-18.3/src/backend/executor/execJunk.c:170:29: branch_true: following ‘true’ branch (when ‘i < cleanLength’)...
postgresql-18.3/src/backend/executor/execJunk.c:172:29: branch_true: ...to here
postgresql-18.3/src/backend/executor/execJunk.c:176:46: danger: dereference of NULL ‘t’
# 174| for (;;)
# 175| {
# 176|-> TargetEntry *tle = lfirst(t);
# 177|
# 178| t = lnext(targetList, t);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/execProcnode.c:391: warning[nullPointer]: Possible null pointer dereference: result
# 389| }
# 390|
# 391|-> ExecSetExecProcNode(result, result->ExecProcNode);
# 392|
# 393| /*
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/execProcnode.c:412: warning[nullPointer]: Possible null pointer dereference: result
# 410| subps = lappend(subps, sstate);
# 411| }
# 412|-> result->initPlan = subps;
# 413|
# 414| /* Set up instrumentation for this node if requested */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/execProcnode.c:438: error[ctunullpointer]: Null pointer dereference: node
# 436| * means we'll superfluously execute ExecProcNodeFirst, but that seems ok.
# 437| */
# 438|-> node->ExecProcNodeReal = function;
# 439| node->ExecProcNode = ExecProcNodeFirst;
# 440| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/execProcnode.c:438: warning[nullPointer]: Possible null pointer dereference: node
# 436| * means we'll superfluously execute ExecProcNodeFirst, but that seems ok.
# 437| */
# 438|-> node->ExecProcNodeReal = function;
# 439| node->ExecProcNode = ExecProcNodeFirst;
# 440| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/execProcnode.c:439: warning[nullPointer]: Possible null pointer dereference: node
# 437| */
# 438| node->ExecProcNodeReal = function;
# 439|-> node->ExecProcNode = ExecProcNodeFirst;
# 440| }
# 441|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/executor/execScan.c:148: error[legacyUninitvar]: Uninitialized variable: relids
# 146| (int) nodeTag(node->ps.plan));
# 147|
# 148|-> while ((rtindex = bms_next_member(relids, rtindex)) >= 0)
# 149| {
# 150| Assert(rtindex > 0);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/executor/execTuples.c:2474:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘isnull’
postgresql-18.3/src/backend/executor/execTuples.c:2492:1: enter_function: entry to ‘do_text_output_multiline’
postgresql-18.3/src/backend/executor/execTuples.c:2497:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/execTuples.c:2502:23: branch_true: ...to here
postgresql-18.3/src/backend/executor/execTuples.c:2503:20: branch_true: following ‘true’ branch (when ‘eol’ is non-NULL)...
postgresql-18.3/src/backend/executor/execTuples.c:2505:31: branch_true: ...to here
postgresql-18.3/src/backend/executor/execTuples.c:2515:17: call_function: calling ‘do_tup_output’ from ‘do_text_output_multiline’
# 2472| /* insert data */
# 2473| memcpy(slot->tts_values, values, natts * sizeof(Datum));
# 2474|-> memcpy(slot->tts_isnull, isnull, natts * sizeof(bool));
# 2475|
# 2476| /* mark slot as containing a virtual tuple */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeAgg.c:630:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pergroupstate’
postgresql-18.3/src/backend/executor/nodeAgg.c:2137:1: enter_function: entry to ‘initialize_hash_entry’
postgresql-18.3/src/backend/executor/nodeAgg.c:2150:39: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘initialize_hash_entry’
postgresql-18.3/src/backend/executor/nodeAgg.c:2156:9: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeAgg.c:2156:27: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeAgg.c:2158:46: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeAgg.c:2161:17: call_function: calling ‘initialize_aggregate’ from ‘initialize_hash_entry’
# 628| */
# 629| if (pertrans->initValueIsNull)
# 630|-> pergroupstate->transValue = pertrans->initValue;
# 631| else
# 632| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeAgg.c:636:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pergroupstate’
postgresql-18.3/src/backend/executor/nodeAgg.c:2137:1: enter_function: entry to ‘initialize_hash_entry’
postgresql-18.3/src/backend/executor/nodeAgg.c:2150:39: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘initialize_hash_entry’
postgresql-18.3/src/backend/executor/nodeAgg.c:2156:9: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeAgg.c:2156:27: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeAgg.c:2158:46: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeAgg.c:2161:17: call_function: calling ‘initialize_aggregate’ from ‘initialize_hash_entry’
# 634|
# 635| oldContext = MemoryContextSwitchTo(aggstate->curaggcontext->ecxt_per_tuple_memory);
# 636|-> pergroupstate->transValue = datumCopy(pertrans->initValue,
# 637| pertrans->transtypeByVal,
# 638| pertrans->transtypeLen);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeHash.c:1462:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/executor/nodeHash.c:3561:1: enter_function: entry to ‘ExecParallelHashTuplePrealloc’
postgresql-18.3/src/backend/executor/nodeHash.c:3574:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeHash.c:3579:17: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeHash.c:3580:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeHash.c:3581:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeHash.c:3581:25: call_function: calling ‘ExecParallelHashIncreaseNumBatches’ from ‘ExecParallelHashTuplePrealloc’
# 1460| HJTUPLE_OVERHEAD + tuple->t_len,
# 1461| &shared);
# 1462|-> copyTuple->hashvalue = hashTuple->hashvalue;
# 1463| memcpy(HJTUPLE_MINTUPLE(copyTuple), tuple, tuple->t_len);
# 1464| ExecParallelHashPushTuple(&hashtable->buckets.shared[bucketno],
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1233:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1214:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1220:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1233:31: danger: dereference of NULL ‘leftop’
# 1231| Assert(leftop != NULL);
# 1232|
# 1233|-> if (!(IsA(leftop, Var) &&
# 1234| ((Var *) leftop)->varno == INDEX_VAR))
# 1235| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1265:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1158:1: enter_function: entry to ‘ExecIndexBuildScanKeys’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1214:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1220:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1226:43: call_function: inlined call to ‘get_leftop’ from ‘ExecIndexBuildScanKeys’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1228:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1228:39: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1233:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1234:35: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1233:29: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1237:25: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1238:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1265:29: danger: dereference of NULL ‘rightop’
# 1263| Assert(rightop != NULL);
# 1264|
# 1265|-> if (IsA(rightop, Const))
# 1266| {
# 1267| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1350:39: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1329:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1350:39: danger: dereference of NULL ‘leftop’
# 1348| Assert(leftop != NULL);
# 1349|
# 1350|-> if (!(IsA(leftop, Var) &&
# 1351| ((Var *) leftop)->varno == INDEX_VAR))
# 1352| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1389:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1329:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1345:36: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1345:47: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1350:36: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1351:43: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1350:37: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1354:33: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1360:36: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1360:37: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1360:37: branch_false: following ‘false’ branch (when ‘varattno > 0’)...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1360:37: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1360:37: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1363:44: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1370:36: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1373:44: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1377:36: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1384:36: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1389:37: danger: dereference of NULL ‘rightop’
# 1387| Assert(rightop != NULL);
# 1388|
# 1389|-> if (IsA(rightop, Const))
# 1390| {
# 1391| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1474:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1311:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1451:25: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1451:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1461:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1469:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1474:31: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1474:31: danger: dereference of NULL ‘leftop’
# 1472| Assert(leftop != NULL);
# 1473|
# 1474|-> if (!(IsA(leftop, Var) &&
# 1475| ((Var *) leftop)->varno == INDEX_VAR))
# 1476| elog(ERROR, "indexqual doesn't have key on left side");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1507:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1311:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1451:25: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1451:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1461:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1469:28: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1469:39: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1474:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1475:35: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1474:29: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1478:25: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1479:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1498:28: branch_false: following ‘false’ branch (when ‘rightop’ is NULL)...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1503:29: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1503:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1507:37: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1507:37: danger: dereference of NULL ‘rightop’
# 1505| /* Index AM will handle this like a simple operator */
# 1506| flags |= SK_SEARCHARRAY;
# 1507|-> if (IsA(rightop, Const))
# 1508| {
# 1509| /* OK, simple constant comparison value */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1588:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1198:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1311:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1451:25: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1451:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1570:25: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1570:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1581:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1583:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1588:31: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeIndexscan.c:1588:31: danger: dereference of NULL ‘leftop’
# 1586| Assert(leftop != NULL);
# 1587|
# 1588|-> if (!(IsA(leftop, Var) &&
# 1589| ((Var *) leftop)->varno == INDEX_VAR))
# 1590| elog(ERROR, "NullTest indexqual has wrong key");
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:127:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pergroup’
postgresql-18.3/src/backend/executor/nodeSetOp.c:504:1: enter_function: entry to ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:517:16: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:519:32: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:528:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:539:28: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:540:17: call_function: calling ‘set_output_count’ from ‘setop_retrieve_hash_table’
# 125| {
# 126| case SETOPCMD_INTERSECT:
# 127|-> if (pergroup->numLeft > 0 && pergroup->numRight > 0)
# 128| setopstate->numOutput = 1;
# 129| else
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:134:54: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pergroup’
postgresql-18.3/src/backend/executor/nodeSetOp.c:504:1: enter_function: entry to ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:517:16: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:519:32: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:528:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:539:28: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:540:17: call_function: calling ‘set_output_count’ from ‘setop_retrieve_hash_table’
# 132| case SETOPCMD_INTERSECT_ALL:
# 133| setopstate->numOutput =
# 134|-> (pergroup->numLeft < pergroup->numRight) ?
# 135| pergroup->numLeft : pergroup->numRight;
# 136| break;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:138:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pergroup’
postgresql-18.3/src/backend/executor/nodeSetOp.c:504:1: enter_function: entry to ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:517:16: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:519:32: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:528:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:539:28: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:540:17: call_function: calling ‘set_output_count’ from ‘setop_retrieve_hash_table’
# 136| break;
# 137| case SETOPCMD_EXCEPT:
# 138|-> if (pergroup->numLeft > 0 && pergroup->numRight == 0)
# 139| setopstate->numOutput = 1;
# 140| else
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:145:34: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pergroup’
postgresql-18.3/src/backend/executor/nodeSetOp.c:504:1: enter_function: entry to ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:517:16: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:519:32: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:528:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:539:28: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘setop_retrieve_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:540:17: call_function: calling ‘set_output_count’ from ‘setop_retrieve_hash_table’
# 143| case SETOPCMD_EXCEPT_ALL:
# 144| setopstate->numOutput =
# 145|-> (pergroup->numLeft < pergroup->numRight) ?
# 146| 0 : (pergroup->numLeft - pergroup->numRight);
# 147| break;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:446:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/executor/nodeSetOp.c:433:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:444:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:446:25: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:446:25: danger: dereference of NULL ‘<unknown>’
# 444| if (isnew)
# 445| {
# 446|-> pergroup->numLeft = 0;
# 447| pergroup->numRight = 0;
# 448| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:451:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/executor/nodeSetOp.c:433:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:444:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:451:17: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:451:17: danger: dereference of NULL ‘<unknown>’
# 449|
# 450| /* Advance the counts */
# 451|-> pergroup->numLeft++;
# 452|
# 453| /* Must reset expression context after each hashtable lookup */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/executor/nodeSetOp.c:487:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/executor/nodeSetOp.c:407:1: enter_function: entry to ‘setop_fill_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:442:28: call_function: inlined call to ‘TupleHashEntryGetAdditional’ from ‘setop_fill_hash_table’
postgresql-18.3/src/backend/executor/nodeSetOp.c:461:12: branch_true: following ‘true’ branch (when ‘have_tuples != 0’)...
postgresql-18.3/src/backend/executor/nodeSetOp.c:461:12: branch_true: ...to here
postgresql-18.3/src/backend/executor/nodeSetOp.c:474:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeSetOp.c:487:33: danger: dereference of NULL ‘<unknown>’
# 485| SetOpStatePerGroup pergroup = TupleHashEntryGetAdditional(hashtable, entry);
# 486|
# 487|-> pergroup->numRight++;
# 488| }
# 489|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/lib/pairingheap.c:275:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pairs’
postgresql-18.3/src/backend/lib/pairingheap.c:251:20: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
postgresql-18.3/src/backend/lib/pairingheap.c:275:9: branch_true: ...to here
postgresql-18.3/src/backend/lib/pairingheap.c:275:9: danger: dereference of NULL ‘pairs’
# 273| */
# 274| newroot = pairs;
# 275|-> next = pairs->next_sibling;
# 276| while (next)
# 277| {
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/libpq/auth.c:2840:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
postgresql-18.3/src/backend/libpq/auth.c:2940:1: enter_function: entry to ‘PerformRadiusTransaction’
postgresql-18.3/src/backend/libpq/auth.c:2980:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/libpq/auth.c:2994:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/libpq/auth.c:3001:22: branch_true: ...to here
postgresql-18.3/src/backend/libpq/auth.c:3018:21: branch_false: following ‘false’ branch (when ‘i >= encryptedpasswordlen’)...
postgresql-18.3/src/backend/libpq/auth.c:3049:9: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:3051:9: call_function: calling ‘radius_add_attribute’ from ‘PerformRadiusTransaction’
# 2838| attr->attribute = type;
# 2839| attr->length = len + 2; /* total size includes type and length */
# 2840|-> memcpy(attr->data, data, len);
# 2841| packet->length += attr->length;
# 2842| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/libpq/auth.c:2895:100: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘secrets’
postgresql-18.3/src/backend/libpq/auth.c:2845:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-18.3/src/backend/libpq/auth.c:2857:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/libpq/auth.c:2864:13: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2864:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/libpq/auth.c:2872:9: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2872:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-18.3/src/backend/libpq/auth.c:2872:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-18.3/src/backend/libpq/auth.c:2874:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-18.3/src/backend/libpq/auth.c:2874:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-18.3/src/backend/libpq/auth.c:2875:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/libpq/auth.c:2878:13: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2878:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/libpq/auth.c:2889:29: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2889:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/src/backend/libpq/auth.c:2890:33: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2890:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/src/backend/libpq/auth.c:2891:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-18.3/src/backend/libpq/auth.c:2892:9: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2892:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/libpq/auth.c:2894:47: branch_false: following ‘false’ branch (when ‘identifiers’ is NULL)...
postgresql-18.3/src/backend/libpq/auth.c:2894:47: branch_false: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2894:47: branch_true: following ‘true’ branch (when ‘radiusports’ is non-NULL)...
postgresql-18.3/src/backend/libpq/auth.c:2894:47: branch_true: ...to here
postgresql-18.3/src/backend/libpq/auth.c:2895:100: danger: dereference of NULL ‘secrets’
# 2893| {
# 2894| int ret = PerformRadiusTransaction(lfirst(server),
# 2895|-> lfirst(secrets),
# 2896| radiusports ? lfirst(radiusports) : NULL,
# 2897| identifiers ? lfirst(identifiers) : NULL,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/libpq/auth.c:3051: warning[uninitvar]: Uninitialized variable: encryptedpassword
# 3049| pfree(cryptvector);
# 3050|
# 3051|-> radius_add_attribute(packet, RADIUS_PASSWORD, encryptedpassword, encryptedpasswordlen);
# 3052|
# 3053| /* Length needs to be in network order on the wire */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/libpq/be-fsstubs.c:523: warning[uninitvar]: Uninitialized variable: fd
# 521| }
# 522| PG_END_TRY();
# 523|-> if (fd < 0)
# 524| ereport(ERROR,
# 525| (errcode_for_file_access(),
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_open_server’
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:641:40: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 641 | X509_NAME *x509name = X509_get_subject_name(port->peer);
# | ^~~~~~~~~~~~~~~~~~~~~
# 639| {
# 640| int len;
# 641|-> X509_NAME *x509name = X509_get_subject_name(port->peer);
# 642| char *peer_dn;
# 643| BIO *bio = NULL;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:641:40: warning[-Wdiscarded-qualifiers]: initialization discards ‘const’ qualifier from pointer target type
# 639| {
# 640| int len;
# 641|-> X509_NAME *x509name = X509_get_subject_name(port->peer);
# 642| char *peer_dn;
# 643| BIO *bio = NULL;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘verify_cb’
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1245:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1245 | subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:81:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 81 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1243| * it either.
# 1244| */
# 1245|-> subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# 1246| sub_prepared = prepare_cert_name(subject);
# 1247| pfree(subject);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1245:48: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1243| * it either.
# 1244| */
# 1245|-> subject = X509_NAME_to_cstring(X509_get_subject_name(cert));
# 1246| sub_prepared = prepare_cert_name(subject);
# 1247| pfree(subject);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1249:47: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1249 | issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:81:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 81 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1247| pfree(subject);
# 1248|
# 1249|-> issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# 1250| iss_prepared = prepare_cert_name(issuer);
# 1251| pfree(issuer);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1249:47: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1247| pfree(subject);
# 1248|
# 1249|-> issuer = X509_NAME_to_cstring(X509_get_issuer_name(cert));
# 1250| iss_prepared = prepare_cert_name(issuer);
# 1251| pfree(issuer);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_get_peer_subject_name’
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1546:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1546 | strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:81:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 81 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1544| {
# 1545| if (port->peer)
# 1546|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# 1547| else
# 1548| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1546:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1544| {
# 1545| if (port->peer)
# 1546|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_subject_name(port->peer)), len);
# 1547| else
# 1548| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘be_tls_get_peer_issuer_name’
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1555:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1555 | strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:81:46: note: expected ‘X509_NAME *’ {aka ‘struct X509_name_st *’} but argument is of type ‘const X509_NAME *’ {aka ‘const struct X509_name_st *’}
# 81 | static char *X509_NAME_to_cstring(X509_NAME *name);
# | ~~~~~~~~~~~^~~~
# 1553| {
# 1554| if (port->peer)
# 1555|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# 1556| else
# 1557| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1555:51: warning[-Wdiscarded-qualifiers]: passing argument 1 of ‘X509_NAME_to_cstring’ discards ‘const’ qualifier from pointer target type
# 1553| {
# 1554| if (port->peer)
# 1555|-> strlcpy(ptr, X509_NAME_to_cstring(X509_get_issuer_name(port->peer)), len);
# 1556| else
# 1557| ptr[0] = '\0';
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c: scope_hint: In function ‘X509_NAME_to_cstring’
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1668:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1668 | e = X509_NAME_get_entry(name, i);
# | ^
# 1666| for (i = 0; i < count; i++)
# 1667| {
# 1668|-> e = X509_NAME_get_entry(name, i);
# 1669| nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(e));
# 1670| if (nid == NID_undef)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1668:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1666| for (i = 0; i < count; i++)
# 1667| {
# 1668|-> e = X509_NAME_get_entry(name, i);
# 1669| nid = OBJ_obj2nid(X509_NAME_ENTRY_get_object(e));
# 1670| if (nid == NID_undef)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1674:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1674 | v = X509_NAME_ENTRY_get_data(e);
# | ^
# 1672| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
# 1673| errmsg("could not get NID for ASN1_OBJECT object")));
# 1674|-> v = X509_NAME_ENTRY_get_data(e);
# 1675| field_name = OBJ_nid2sn(nid);
# 1676| if (field_name == NULL)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/libpq/be-secure-openssl.c:1674:19: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 1672| (errcode(ERRCODE_INVALID_PARAMETER_VALUE),
# 1673| errmsg("could not get NID for ASN1_OBJECT object")));
# 1674|-> v = X509_NAME_ENTRY_get_data(e);
# 1675| field_name = OBJ_nid2sn(nid);
# 1676| if (field_name == NULL)
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/backend/libpq/crypt.c:99:13: warning[-Wanalyzer-null-argument]: use of NULL ‘shadow_pass’ where non-null expected
postgresql-18.3/src/backend/libpq/crypt.c:117:1: enter_function: entry to ‘encrypt_password’
postgresql-18.3/src/backend/libpq/crypt.c:163:12: branch_false: following ‘false’ branch (when ‘encrypted_password’ is NULL)...
postgresql-18.3/src/backend/libpq/crypt.c:179:13: branch_false: ...to here
postgresql-18.3/src/backend/libpq/crypt.c:179:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/libpq/crypt.c:180:17: branch_true: ...to here
postgresql-18.3/src/backend/libpq/crypt.c:180:17: call_function: calling ‘get_password_type’ from ‘encrypt_password’
# 97| uint8 server_key[SCRAM_MAX_KEY_LEN];
# 98|
# 99|-> if (strncmp(shadow_pass, "md5", 3) == 0 &&
# 100| strlen(shadow_pass) == MD5_PASSWD_LEN &&
# 101| strspn(shadow_pass + 3, MD5_PASSWD_CHARSET) == MD5_PASSWD_LEN - 3)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/libpq/hba.c:1353:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/libpq/hba.c:2645:1: enter_function: entry to ‘load_hba’
postgresql-18.3/src/backend/libpq/hba.c:2655:16: call_function: calling ‘open_auth_file’ from ‘load_hba’
postgresql-18.3/src/backend/libpq/hba.c:2655:16: return_function: returning to ‘load_hba’ from ‘open_auth_file’
postgresql-18.3/src/backend/libpq/hba.c:2656:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/libpq/hba.c:2662:9: branch_false: ...to here
postgresql-18.3/src/backend/libpq/hba.c:2662:9: call_function: calling ‘tokenize_auth_file’ from ‘load_hba’
postgresql-18.3/src/backend/libpq/hba.c:2662:9: return_function: returning to ‘load_hba’ from ‘tokenize_auth_file’
postgresql-18.3/src/backend/libpq/hba.c:2670:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/libpq/hba.c:2682:32: call_function: calling ‘parse_hba_line’ from ‘load_hba’
# 1351| Assert(tok_line->fields != NIL);
# 1352| field = list_head(tok_line->fields);
# 1353|-> tokens = lfirst(field);
# 1354| if (tokens->length > 1)
# 1355| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/libpq/hba.c:2768:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/libpq/hba.c:2751:1: enter_function: entry to ‘parse_ident_line’
postgresql-18.3/src/backend/libpq/hba.c:2762:17: call_function: inlined call to ‘list_head’ from ‘parse_ident_line’
postgresql-18.3/src/backend/libpq/hba.c:2764:22: branch_false: ...to here
postgresql-18.3/src/backend/libpq/hba.c:2768:9: danger: dereference of NULL ‘<unknown>’
# 2766|
# 2767| /* Get the map token (must exist) */
# 2768|-> tokens = lfirst(field);
# 2769| IDENT_MULTI_VALUE(tokens);
# 2770| token = linitial(tokens);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/optimizer/path/indxpath.c:637:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/src/backend/optimizer/path/indxpath.c:626:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:635:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:637:41: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:637:41: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 635| if (bms_is_subset(iclause->rinfo->clause_relids, relids))
# 636| clauseset.indexclauses[indexcol] =
# 637|-> lappend(clauseset.indexclauses[indexcol], iclause);
# 638| }
# 639|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/optimizer/path/indxpath.c:653:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/src/backend/optimizer/path/indxpath.c:626:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:646:17: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:646:17: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:650:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:653:41: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:653:41: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 651| {
# 652| clauseset.indexclauses[indexcol] =
# 653|-> lappend(clauseset.indexclauses[indexcol], iclause);
# 654| break;
# 655| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/optimizer/path/indxpath.c:660:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘clauseset.indexclauses[indexcol]’
postgresql-18.3/src/backend/optimizer/path/indxpath.c:626:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:631:17: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:646:17: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:660:25: danger: use of uninitialized value ‘clauseset.indexclauses[indexcol]’ here
# 658| /* Add restriction clauses */
# 659| clauseset.indexclauses[indexcol] =
# 660|-> list_concat(clauseset.indexclauses[indexcol],
# 661| rclauseset->indexclauses[indexcol]);
# 662|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/optimizer/path/indxpath.c:869:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*clauses.indexclauses[indexcol]’
postgresql-18.3/src/backend/optimizer/path/indxpath.c:607:1: enter_function: entry to ‘get_join_index_paths’
postgresql-18.3/src/backend/optimizer/path/indxpath.c:626:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/indxpath.c:671:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/path/indxpath.c:671:9: call_function: calling ‘get_index_paths’ from ‘get_join_index_paths’
# 867| ListCell *lc;
# 868|
# 869|-> foreach(lc, clauses->indexclauses[indexcol])
# 870| {
# 871| IndexClause *iclause = (IndexClause *) lfirst(lc);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1495:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr1’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1422:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1438:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1448:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1466:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1466:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1480:29: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1493:21: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1493:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1495:25: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1495:25: danger: dereference of NULL ‘lcr1’
# 1493| if (joinrel->partbounds_merged)
# 1494| {
# 1495|-> child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1496| child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1497| lcr1 = lnext(parts1, lcr1);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1496:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr2’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1422:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1438:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1448:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1466:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1466:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1469:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1471:24: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1471:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1472:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1480:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1480:29: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1493:21: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1493:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1495:25: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/path/joinrels.c:1496:25: danger: dereference of NULL ‘lcr2’
# 1494| {
# 1495| child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1496|-> child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1497| lcr1 = lnext(parts1, lcr1);
# 1498| lcr2 = lnext(parts2, lcr2);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/path/pathkeys.c:1420:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/optimizer/path/pathkeys.c:1381:1: enter_function: entry to ‘make_pathkeys_for_sortclauses_extended’
postgresql-18.3/src/backend/optimizer/path/pathkeys.c:1393:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/path/pathkeys.c:1413:27: call_function: calling ‘make_pathkey_from_sortop’ from ‘make_pathkeys_for_sortclauses_extended’
postgresql-18.3/src/backend/optimizer/path/pathkeys.c:1413:27: return_function: returning to ‘make_pathkeys_for_sortclauses_extended’ from ‘make_pathkey_from_sortop’
postgresql-18.3/src/backend/optimizer/path/pathkeys.c:1420:21: danger: dereference of NULL ‘make_pathkey_from_sortop(root, sortkey, *sortcl.sortop, *sortcl.reverse_sort, *sortcl.nulls_first, *sortcl.tleSortGroupRef, 1)’
# 1418| sortcl->tleSortGroupRef,
# 1419| true);
# 1420|-> if (pathkey->pk_eclass->ec_sortref == 0 && set_ec_sortref)
# 1421| {
# 1422| /*
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/plan/analyzejoins.c:1234:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/src/backend/optimizer/plan/analyzejoins.c:980:1: enter_function: entry to ‘rel_is_distinct_for’
postgresql-18.3/src/backend/optimizer/plan/analyzejoins.c:1060:21: call_function: calling ‘query_is_distinct_for’ from ‘rel_is_distinct_for’
# 1232| /* non-resjunk columns should have grouping clauses */
# 1233| Assert(lg != NULL);
# 1234|-> sgc = (SortGroupClause *) lfirst(lg);
# 1235| lg = lnext(topop->groupClauses, lg);
# 1236|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/plan/createplan.c:5202:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/optimizer/plan/createplan.c:5191:1: enter_function: entry to ‘fix_indexqual_clause’
postgresql-18.3/src/backend/optimizer/plan/createplan.c:5200:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-18.3/src/backend/optimizer/plan/createplan.c:5200:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-18.3/src/backend/optimizer/plan/createplan.c:5202:13: danger: dereference of NULL ‘replace_nestloop_params_mutator(clause, root)’
# 5200| clause = replace_nestloop_params(root, clause);
# 5201|
# 5202|-> if (IsA(clause, OpExpr))
# 5203| {
# 5204| OpExpr *op = (OpExpr *) clause;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/plan/planner.c:4114:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partially_grouped_rel’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8064:1: enter_function: entry to ‘create_partitionwise_grouping_paths’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8085:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/plan/planner.c:8087:47: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/plan/planner.c:8144:17: call_function: calling ‘create_ordinary_grouping_paths’ from ‘create_partitionwise_grouping_paths’
# 4112| Assert(partially_grouped_rel);
# 4113|
# 4114|-> if (partially_grouped_rel->pathlist)
# 4115| set_cheapest(partially_grouped_rel);
# 4116|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/plan/planner.c:8320:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8295:1: enter_function: entry to ‘generate_setop_child_grouplist’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8302:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8303:24: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/plan/planner.c:8303:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8304:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/plan/planner.c:8304:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/plan/planner.c:8311:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/plan/planner.c:8320:17: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/plan/planner.c:8320:17: danger: dereference of NULL ‘lg’
# 8318| Assert(lg != NULL);
# 8319| Assert(ct != NULL);
# 8320|-> sgc = (SortGroupClause *) lfirst(lg);
# 8321| coltype = lfirst_oid(ct);
# 8322|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/plan/planner.c:8321:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘ct’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8295:1: enter_function: entry to ‘generate_setop_child_grouplist’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8302:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8303:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_child_grouplist’
postgresql-18.3/src/backend/optimizer/plan/planner.c:8304:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/plan/planner.c:8304:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/plan/planner.c:8311:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/plan/planner.c:8320:17: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/plan/planner.c:8321:17: danger: dereference of NULL ‘ct’
# 8319| Assert(ct != NULL);
# 8320| sgc = (SortGroupClause *) lfirst(lg);
# 8321|-> coltype = lfirst_oid(ct);
# 8322|
# 8323| /* reject if target type isn't the same as the setop target type */
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/optimizer/plan/setrefs.c:2092:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*root.grouping_map’
postgresql-18.3/src/backend/optimizer/plan/setrefs.c:3635:1: enter_function: entry to ‘extract_query_dependencies’
postgresql-18.3/src/backend/optimizer/plan/setrefs.c:3651:9: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/optimizer/plan/setrefs.c:3652:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/plan/setrefs.c:3655:16: call_function: calling ‘extract_query_dependencies_walker’ from ‘extract_query_dependencies’
# 2090| {
# 2091| GroupingFunc *g = (GroupingFunc *) node;
# 2092|-> AttrNumber *grouping_map = root->grouping_map;
# 2093|
# 2094| /* If there are no grouping sets, we don't need this. */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/plan/setrefs.c:2188: warning[nullPointer]: Possible null pointer dereference: bestplan
# 2186|
# 2187| /* Mark the subplan we selected */
# 2188|-> root->isUsedSubplan[bestplan->plan_id - 1] = true;
# 2189|
# 2190| return (Node *) bestplan;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:121:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘target_rte’
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:80:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:105:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:106:12: branch_false: following ‘false’ branch (when ‘command_type != 3’)...
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:108:17: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:108:17: branch_false: following ‘false’ branch (when ‘command_type != 2’)...
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:119:14: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:121:18: danger: dereference of NULL ‘target_rte’
# 119| if ((command_type == CMD_UPDATE || command_type == CMD_DELETE ||
# 120| command_type == CMD_MERGE) &&
# 121|-> !target_rte->inh)
# 122| {
# 123| /* row-identity logic expects to add stuff to processed_tlist */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:398:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:64:1: enter_function: entry to ‘preprocess_targetlist’
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:80:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:105:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:106:12: branch_true: following ‘true’ branch (when ‘command_type == 3’)...
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:107:25: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/prep/preptlist.c:107:25: call_function: calling ‘expand_insert_targetlist’ from ‘preprocess_targetlist’
# 396| * sure we have all the user attributes in the right order.
# 397| */
# 398|-> numattrs = RelationGetNumberOfAttributes(rel);
# 399|
# 400| for (attrno = 1; attrno <= numattrs; attrno++)
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1521:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘curColType’
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1508:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1515:17: branch_true: following ‘true’ branch (when ‘subtlist’ is non-NULL)...
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1515:17: branch_true: ...to here
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1521:64: danger: dereference of NULL ‘curColType’
# 1519| Assert(!subtle->resjunk);
# 1520| Assert(curColType != NULL);
# 1521|-> if (exprType((Node *) subtle->expr) == lfirst_oid(curColType))
# 1522| {
# 1523| /* If first subplan, copy the typmod; else compare */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1613:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1594:1: enter_function: entry to ‘generate_setop_grouplist’
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1600:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_grouplist’
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1601:9: branch_false: ...to here
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1601:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/optimizer/prep/prepunion.c:1613:17: danger: dereference of NULL ‘lg’
# 1611| /* non-resjunk columns should have grouping clauses */
# 1612| Assert(lg != NULL);
# 1613|-> sgc = (SortGroupClause *) lfirst(lg);
# 1614| lg = lnext(grouplist, lg);
# 1615| Assert(sgc->tleSortGroupRef == 0);
Error: COMPILER_WARNING (CWE-457):
postgresql-18.3/src/backend/optimizer/util/clauses.c: scope_hint: In function ‘recheck_cast_function_args.isra.0’
postgresql-18.3/src/backend/optimizer/util/clauses.c:4403:19: warning[-Wmaybe-uninitialized]: ‘actual_arg_types’ may be used uninitialized
# 4403 | rettype = enforce_generic_type_consistency(actual_arg_types,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
# 4404 | declared_arg_types,
# | ~~~~~~~~~~~~~~~~~~~
# 4405 | nargs,
# | ~~~~~~
# 4406 | funcform->prorettype,
# | ~~~~~~~~~~~~~~~~~~~~~
# 4407 | false);
# | ~~~~~~
postgresql-18.3/src/backend/optimizer/util/clauses.c:42: included_from: Included from here.
postgresql-18.3/src/include/parser/parse_coerce.h:85:17: note: by argument 1 of type ‘const Oid *’ to ‘enforce_generic_type_consistency’ declared here
# 85 | extern Oid enforce_generic_type_consistency(const Oid *actual_arg_types,
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/src/backend/optimizer/util/clauses.c:4389:33: note: ‘actual_arg_types’ declared here
# 4389 | Oid actual_arg_types[FUNC_MAX_ARGS];
# | ^~~~~~~~~~~~~~~~
# 4401| Assert(nargs == pronargs);
# 4402| memcpy(declared_arg_types, proargtypes, pronargs * sizeof(Oid));
# 4403|-> rettype = enforce_generic_type_consistency(actual_arg_types,
# 4404| declared_arg_types,
# 4405| nargs,
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/parser/gram.y:17084: error[legacyUninitvar]: Uninitialized variable: encoding
#17082| parser_errposition(@4)));
#17083|
#17084|-> $$ = (Node *) makeJsonFormat(JS_FORMAT_JSON, encoding, @1);
#17085| }
#17086| | FORMAT_LA JSON
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/parser/gram.y:17528: error[legacyUninitvar]: Uninitialized variable: n
#17526| n->rolename = pstrdup($1);
#17527| }
#17528|-> $$ = n;
#17529| }
#17530| | CURRENT_ROLE
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/parser/parse_collate.c:972:58: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘h_cell’
postgresql-18.3/src/backend/parser/parse_collate.c:955:1: enter_function: entry to ‘assign_hypothetical_collations’
postgresql-18.3/src/backend/parser/parse_collate.c:958:30: call_function: inlined call to ‘list_head’ from ‘assign_hypothetical_collations’
postgresql-18.3/src/backend/parser/parse_collate.c:959:40: branch_false: ...to here
postgresql-18.3/src/backend/parser/parse_collate.c:959:30: call_function: inlined call to ‘list_head’ from ‘assign_hypothetical_collations’
postgresql-18.3/src/backend/parser/parse_collate.c:964:34: call_function: inlined call to ‘list_length’ from ‘assign_hypothetical_collations’
postgresql-18.3/src/backend/parser/parse_collate.c:970:16: branch_true: following ‘true’ branch (when ‘extra_args > 0’)...
postgresql-18.3/src/backend/parser/parse_collate.c:972:58: branch_true: ...to here
postgresql-18.3/src/backend/parser/parse_collate.c:972:58: danger: dereference of NULL ‘h_cell’
# 970| while (extra_args-- > 0)
# 971| {
# 972|-> (void) assign_collations_walker((Node *) lfirst(h_cell), loccontext);
# 973| h_cell = lnext(aggref->aggdirectargs, h_cell);
# 974| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/parser/parse_cte.c:1122:74: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/parser/parse_cte.c:1207:1: enter_function: entry to ‘checkWellFormedSelectStmt’
postgresql-18.3/src/backend/parser/parse_cte.c:1231:33: call_function: calling ‘checkWellFormedRecursionWalker’ from ‘checkWellFormedSelectStmt’
# 1120| /* note that recursion could mutate innerwiths list */
# 1121| cell1 = list_head(cstate->innerwiths);
# 1122|-> lfirst(cell1) = lappend((List *) lfirst(cell1), cte);
# 1123| }
# 1124| checkWellFormedSelectStmt(stmt, cstate);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/parser/parse_func.c:2014:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc’
postgresql-18.3/src/backend/parser/parse_func.c:2008:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-18.3/src/backend/parser/parse_func.c:2010:20: branch_true: ...to here
postgresql-18.3/src/backend/parser/parse_func.c:2010:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
postgresql-18.3/src/backend/parser/parse_func.c:2012:20: branch_false: ...to here
postgresql-18.3/src/backend/parser/parse_func.c:2008:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-18.3/src/backend/parser/parse_func.c:2010:20: branch_true: ...to here
postgresql-18.3/src/backend/parser/parse_func.c:2014:70: danger: dereference of NULL ‘lc’
# 2012| if (i >= numposargs)
# 2013| {
# 2014|-> appendStringInfo(&argbuf, "%s => ", (char *) lfirst(lc));
# 2015| lc = lnext(argnames, lc);
# 2016| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/parser/parse_func.c:2271: warning[uninitvar]: Uninitialized variable: argoids
# 2269| */
# 2270| oid = LookupFuncNameInternal(func->args_unspecified ? objtype : OBJECT_ROUTINE,
# 2271|-> func->objname, nargs, argoids,
# 2272| false, missing_ok,
# 2273| &lookupError);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/parser/parse_relation.c:3065:77: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘aliasp_item’
postgresql-18.3/src/backend/parser/parse_relation.c:2751:1: enter_function: entry to ‘expandRTE’
postgresql-18.3/src/backend/parser/parse_relation.c:2758:12: branch_true: following ‘true’ branch (when ‘colnames’ is non-NULL)...
postgresql-18.3/src/backend/parser/parse_relation.c:2759:17: branch_true: ...to here
postgresql-18.3/src/backend/parser/parse_relation.c:2760:12: branch_false: following ‘false’ branch (when ‘colvars’ is NULL)...
postgresql-18.3/src/backend/parser/parse_relation.c:2763:17: branch_false: ...to here
postgresql-18.3/src/backend/parser/parse_relation.c:3044:59: call_function: inlined call to ‘list_head’ from ‘expandRTE’
postgresql-18.3/src/backend/parser/parse_relation.c:3050:33: branch_false: ...to here
postgresql-18.3/src/backend/parser/parse_relation.c:3050:33: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/parser/parse_relation.c:3060:44: branch_true: following ‘true’ branch (when ‘colnames’ is non-NULL)...
postgresql-18.3/src/backend/parser/parse_relation.c:3063:52: branch_true: ...to here
postgresql-18.3/src/backend/parser/parse_relation.c:3063:52: branch_true: following ‘true’ branch (when ‘coltype != 0’)...
postgresql-18.3/src/backend/parser/parse_relation.c:3065:77: branch_true: ...to here
postgresql-18.3/src/backend/parser/parse_relation.c:3065:77: danger: dereference of NULL ‘aliasp_item’
# 3063| if (OidIsValid(coltype))
# 3064| {
# 3065|-> char *label = strVal(lfirst(aliasp_item));
# 3066|
# 3067| *colnames = lappend(*colnames,
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/parser/scan.c:10850:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/backend/parser/scan.c:10729:10: enter_function: entry to ‘core_yyrestart’
postgresql-18.3/src/backend/parser/scan.c:10734:16: call_function: calling ‘core_yyensure_buffer_stack’ from ‘core_yyrestart’
postgresql-18.3/src/backend/parser/scan.c:10734:16: return_function: returning to ‘core_yyrestart’ from ‘core_yyensure_buffer_stack’
postgresql-18.3/src/backend/parser/scan.c:10736:27: call_function: calling ‘core_yy_create_buffer’ from ‘core_yyrestart’
postgresql-18.3/src/backend/parser/scan.c:10736:27: return_function: returning to ‘core_yyrestart’ from ‘core_yy_create_buffer’
postgresql-18.3/src/backend/parser/scan.c:10739:2: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/parser/scan.c:10739:2: branch_false: ...to here
postgresql-18.3/src/backend/parser/scan.c:10739:2: call_function: calling ‘core_yy_init_buffer’ from ‘core_yyrestart’
#10848|
#10849| yy_flush_buffer( b , yyscanner);
#10850|->
#10851| b->yy_input_file = file;
#10852| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/partitioning/partbounds.c:4039:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-18.3/src/backend/partitioning/partbounds.c:3983:1: enter_function: entry to ‘get_qual_for_hash’
postgresql-18.3/src/backend/partitioning/partbounds.c:4020:26: call_function: inlined call to ‘list_head’ from ‘get_qual_for_hash’
postgresql-18.3/src/backend/partitioning/partbounds.c:4023:9: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4023:21: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:4028:21: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4028:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:4039:43: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4039:43: danger: dereference of NULL ‘partexprs_item’
# 4037| else
# 4038| {
# 4039|-> keyCol = (Node *) copyObject(lfirst(partexprs_item));
# 4040| partexprs_item = lnext(key->partexprs, partexprs_item);
# 4041| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/partitioning/partprune.c:2545:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘start’
postgresql-18.3/src/backend/partitioning/partprune.c:2525:1: enter_function: entry to ‘get_steps_using_prefix_recurse’
postgresql-18.3/src/backend/partitioning/partprune.c:2549:12: branch_true: following ‘true’ branch (when ‘cur_keyno < final_keyno’)...
postgresql-18.3/src/backend/partitioning/partprune.c:2559:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-18.3/src/backend/partitioning/partprune.c:2563:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partprune.c:2559:17: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:2575:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-18.3/src/backend/partitioning/partprune.c:2575:17: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/partitioning/partprune.c:2575:17: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:2582:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/partitioning/partprune.c:2585:47: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:2599:37: call_function: calling ‘get_steps_using_prefix_recurse’ from ‘get_steps_using_prefix_recurse’
# 2543|
# 2544| Assert(start != NULL);
# 2545|-> cur_keyno = ((PartClauseInfo *) lfirst(start))->keyno;
# 2546| final_keyno = ((PartClauseInfo *) llast(prefix))->keyno;
# 2547|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/partitioning/partprune.c:2725: warning[uninitvar]: Uninitialized variable: isnull
# 2723|
# 2724| rowHash = compute_partition_hash_value(partnatts, partsupfunc, partcollation,
# 2725|-> values, isnull);
# 2726|
# 2727| greatest_modulus = boundinfo->nindexes;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/partitioning/partprune.c:3516:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc2’
postgresql-18.3/src/backend/partitioning/partprune.c:3444:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-18.3/src/backend/partitioning/partprune.c:3461:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-18.3/src/backend/partitioning/partprune.c:3462:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-18.3/src/backend/partitioning/partprune.c:3468:9: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:3468:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/partitioning/partprune.c:3475:42: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:3482:20: branch_false: following ‘false’ branch (when ‘keyno <= nvalues’)...
postgresql-18.3/src/backend/partitioning/partprune.c:3485:20: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:3485:20: branch_true: following ‘true’ branch (when ‘lc1’ is non-NULL)...
postgresql-18.3/src/backend/partitioning/partprune.c:3492:25: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:3503:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partprune.c:3516:25: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partprune.c:3516:25: danger: dereference of NULL ‘lc2’
# 3514|
# 3515| /* Set up the stepcmpfuncs entry, unless we already did */
# 3516|-> cmpfn = lfirst_oid(lc2);
# 3517| Assert(OidIsValid(cmpfn));
# 3518| if (cmpfn != context->stepcmpfuncs[stateidx].fn_oid)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/partitioning/partprune.c:3560:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[0]’
# 3558|
# 3559| case PARTITION_STRATEGY_LIST:
# 3560|-> return get_matching_list_bounds(context,
# 3561| opstep->opstrategy,
# 3562| values[0], nvalues,
Error: GCC_ANALYZER_WARNING:
postgresql-18.3/src/backend/postmaster/syslogger.c:238:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘1’
postgresql-18.3/src/backend/postmaster/syslogger.c:219:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:221:46: branch_true: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:234:17: release_resource: closed here
postgresql-18.3/src/backend/postmaster/syslogger.c:236:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:238:32: branch_true: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:238:32: danger: ‘1’ could be invalid
# 236| if (fd != -1)
# 237| {
# 238|-> (void) dup2(fd, STDOUT_FILENO);
# 239| (void) dup2(fd, STDERR_FILENO);
# 240| close(fd);
Error: GCC_ANALYZER_WARNING:
postgresql-18.3/src/backend/postmaster/syslogger.c:239:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
postgresql-18.3/src/backend/postmaster/syslogger.c:219:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:221:46: branch_true: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:235:17: release_resource: closed here
postgresql-18.3/src/backend/postmaster/syslogger.c:236:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:238:32: branch_true: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:239:32: danger: ‘2’ could be invalid
# 237| {
# 238| (void) dup2(fd, STDOUT_FILENO);
# 239|-> (void) dup2(fd, STDERR_FILENO);
# 240| close(fd);
# 241| }
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/backend/postmaster/syslogger.c:736:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(syslogPipe[1], 1)’
postgresql-18.3/src/backend/postmaster/syslogger.c:593:1: enter_function: entry to ‘SysLogger_Start’
postgresql-18.3/src/backend/postmaster/syslogger.c:663:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-18.3/src/backend/postmaster/syslogger.c:663:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-18.3/src/backend/postmaster/syslogger.c:708:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:718:13: branch_false: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:718:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:729:17: branch_false: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:736:21: acquire_resource: opened here
postgresql-18.3/src/backend/postmaster/syslogger.c:736:20: danger: ‘dup2(syslogPipe[1], 1)’ leaks here; was opened at [(11)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/10)
# 734| #ifndef WIN32
# 735| fflush(stdout);
# 736|-> if (dup2(syslogPipe[1], STDOUT_FILENO) < 0)
# 737| ereport(FATAL,
# 738| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/backend/postmaster/syslogger.c:741:20: warning[-Wanalyzer-fd-leak]: leak of file descriptor ‘dup2(syslogPipe[1], 2)’
postgresql-18.3/src/backend/postmaster/syslogger.c:593:1: enter_function: entry to ‘SysLogger_Start’
postgresql-18.3/src/backend/postmaster/syslogger.c:663:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-18.3/src/backend/postmaster/syslogger.c:663:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-18.3/src/backend/postmaster/syslogger.c:708:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:718:13: branch_false: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:718:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:729:17: branch_false: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:736:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/postmaster/syslogger.c:740:17: branch_false: ...to here
postgresql-18.3/src/backend/postmaster/syslogger.c:741:21: acquire_resource: opened here
postgresql-18.3/src/backend/postmaster/syslogger.c:741:20: danger: ‘dup2(syslogPipe[1], 2)’ leaks here; was opened at [(13)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/12)
# 739| errmsg("could not redirect stdout: %m")));
# 740| fflush(stderr);
# 741|-> if (dup2(syslogPipe[1], STDERR_FILENO) < 0)
# 742| ereport(FATAL,
# 743| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/regex/rege_dfa.c:1021:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-18.3/src/backend/regex/rege_dfa.c:985:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/regex/rege_dfa.c:990:9: branch_false: ...to here
postgresql-18.3/src/backend/regex/rege_dfa.c:1002:21: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/regex/rege_dfa.c:1004:21: branch_true: ...to here
postgresql-18.3/src/backend/regex/rege_dfa.c:1006:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/src/backend/regex/rege_dfa.c:1009:21: branch_false: ...to here
postgresql-18.3/src/backend/regex/rege_dfa.c:1021:25: danger: dereference of NULL ‘lastap.ss’
# 1019| lastap = ap;
# 1020| assert(ap.ss != NULL);
# 1021|-> lastap.ss->inchain[lastap.co] = ss->inchain[i];
# 1022| }
# 1023| ss->outs[i] = NULL;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/logical/logical.c:2197: warning[uninitvar]: Uninitialized variable: retlsn
# 2195| PG_END_TRY();
# 2196|
# 2197|-> return retlsn;
# 2198| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/logical/reorderbuffer.c:5017: error[legacyUninitvar]: Uninitialized variable: chunksize
# 5015| elog(ERROR, "unexpected type of toast chunk");
# 5016|
# 5017|-> ent->size += chunksize;
# 5018| ent->last_chunk_seq = chunk_seq;
# 5019| ent->num_chunks++;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.c:1113:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1077:28: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1100:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1102:7: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1111:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1113:9: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1113:9: danger: use of uninitialized value ‘yyss’ here
# 1111| if (! yyptr)
# 1112| YYNOMEM;
# 1113|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1114| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1115| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:104:71: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].node’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:104:71: danger: use of uninitialized value ‘yyvsp[2305843009213693951].node’ here
# 102| firstcmd: command opt_semicolon
# 103| {
# 104|-> *replication_parse_result_p = $1;
# 105|
# 106| (void) yynerrs; /* suppress compiler warning */
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:163:77: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:163:77: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 161| var_name: IDENT { $$ = $1; }
# 162| | var_name '.' IDENT
# 163|-> { $$ = psprintf("%s.%s", $1, $3); }
# 164| ;
# 165|
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:190:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:188:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:190:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 188| cmd = makeNode(CreateReplicationSlotCmd);
# 189| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 190|-> cmd->slotname = $2;
# 191| cmd->temporary = $3;
# 192| cmd->options = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:191:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:188:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:191:58: danger: out-of-bounds read at bit -64 but ‘yyvsa’ starts at bit 0
# 189| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 190| cmd->slotname = $2;
# 191|-> cmd->temporary = $3;
# 192| cmd->options = $5;
# 193| $$ = (Node *) cmd;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:201:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:199:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:201:57: danger: out-of-bounds read from byte -24 till byte -17 but ‘yyvsa’ starts at byte 0
# 199| cmd = makeNode(CreateReplicationSlotCmd);
# 200| cmd->kind = REPLICATION_KIND_LOGICAL;
# 201|-> cmd->slotname = $2;
# 202| cmd->temporary = $3;
# 203| cmd->plugin = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:202:58: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:199:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:202:58: danger: out-of-bounds read at bit -128 but ‘yyvsa’ starts at bit 0
# 200| cmd->kind = REPLICATION_KIND_LOGICAL;
# 201| cmd->slotname = $2;
# 202|-> cmd->temporary = $3;
# 203| cmd->plugin = $5;
# 204| cmd->options = $6;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:210:129: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:210:129: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 208|
# 209| create_slot_options:
# 210|-> '(' generic_option_list ')' { $$ = $2; }
# 211| | create_slot_legacy_opt_list { $$ = $1; }
# 212| ;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:216:78: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:216:78: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 214| create_slot_legacy_opt_list:
# 215| create_slot_legacy_opt_list create_slot_legacy_opt
# 216|-> { $$ = lappend($1, $2); }
# 217| | /* EMPTY */
# 218| { $$ = NIL; }
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:275:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:274:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:275:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 273| AlterReplicationSlotCmd *cmd;
# 274| cmd = makeNode(AlterReplicationSlotCmd);
# 275|-> cmd->slotname = $2;
# 276| cmd->options = $4;
# 277| $$ = (Node *) cmd;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:291:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:289:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:291:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 289| cmd = makeNode(StartReplicationCmd);
# 290| cmd->kind = REPLICATION_KIND_PHYSICAL;
# 291|-> cmd->slotname = $2;
# 292| cmd->startpoint = $4;
# 293| cmd->timeline = $5;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:305:57: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:992:1: enter_function: entry to ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:303:47: call_function: inlined call to ‘newNode’ from ‘replication_yyparse’
postgresql-18.3/src/backend/replication/repl_gram.y:305:57: danger: out-of-bounds read from byte -16 till byte -9 but ‘yyvsa’ starts at byte 0
# 303| cmd = makeNode(StartReplicationCmd);
# 304| cmd->kind = REPLICATION_KIND_LOGICAL;
# 305|-> cmd->slotname = $3;
# 306| cmd->startpoint = $5;
# 307| cmd->options = $6;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:371:117: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:371:117: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 369|
# 370| plugin_options:
# 371|-> '(' plugin_opt_list ')' { $$ = $2; }
# 372| | /* EMPTY */ { $$ = NIL; }
# 373| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:382:56: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:382:56: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 380| | plugin_opt_list ',' plugin_opt_elem
# 381| {
# 382|-> $$ = lappend($1, $3);
# 383| }
# 384| ;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:389:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:389:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 387| IDENT plugin_opt_arg
# 388| {
# 389|-> $$ = makeDefElem($1, $2, -1);
# 390| }
# 391| ;
Error: GCC_ANALYZER_WARNING (CWE-127):
postgresql-18.3/src/backend/replication/repl_gram.y:400:78: warning[-Wanalyzer-out-of-bounds]: stack-based buffer under-read
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:400:78: danger: out-of-bounds read from byte -8 till byte -1 but ‘yyvsa’ starts at byte 0
# 398| generic_option_list:
# 399| generic_option_list ',' generic_option
# 400|-> { $$ = lappend($1, $3); }
# 401| | generic_option
# 402| { $$ = list_make1($1); }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:412:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:412:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 410| | ident_or_keyword IDENT
# 411| {
# 412|-> $$ = makeDefElem($1, (Node *) makeString($2), -1);
# 413| }
# 414| | ident_or_keyword SCONST
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:416:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:416:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 414| | ident_or_keyword SCONST
# 415| {
# 416|-> $$ = makeDefElem($1, (Node *) makeString($2), -1);
# 417| }
# 418| | ident_or_keyword UCONST
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/repl_gram.y:420:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].str’
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1150:6: branch_false: following ‘false’ branch (when ‘yyn != -36’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1156:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1159:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1168:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1180:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1187:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1190:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1200:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1207:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1071:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1135:6: branch_false: following ‘false’ branch (when ‘yystate != 34’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1138:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.c:1220:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/repl_gram.c:1222:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_gram.y:420:58: danger: use of uninitialized value ‘yyvsp[2305843009213693951].str’ here
# 418| | ident_or_keyword UCONST
# 419| {
# 420|-> $$ = makeDefElem($1, (Node *) makeInteger($2), -1);
# 421| }
# 422| ;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/replication/repl_scanner.c:2055:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/backend/replication/repl_scanner.c:1934:10: enter_function: entry to ‘replication_yyrestart’
postgresql-18.3/src/backend/replication/repl_scanner.c:1939:16: call_function: calling ‘replication_yyensure_buffer_stack’ from ‘replication_yyrestart’
postgresql-18.3/src/backend/replication/repl_scanner.c:1939:16: return_function: returning to ‘replication_yyrestart’ from ‘replication_yyensure_buffer_stack’
postgresql-18.3/src/backend/replication/repl_scanner.c:1941:27: call_function: calling ‘replication_yy_create_buffer’ from ‘replication_yyrestart’
postgresql-18.3/src/backend/replication/repl_scanner.c:1941:27: return_function: returning to ‘replication_yyrestart’ from ‘replication_yy_create_buffer’
postgresql-18.3/src/backend/replication/repl_scanner.c:1944:2: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/repl_scanner.c:1944:2: branch_false: ...to here
postgresql-18.3/src/backend/replication/repl_scanner.c:1944:2: call_function: calling ‘replication_yy_init_buffer’ from ‘replication_yyrestart’
# 2053|
# 2054| yy_flush_buffer( b , yyscanner);
# 2055|->
# 2056| b->yy_input_file = file;
# 2057| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/syncrep_gram.c:988:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/backend/replication/syncrep_gram.c:946:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:952:28: branch_true: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:975:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:977:7: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:986:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:988:9: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:988:9: danger: use of uninitialized value ‘yyss’ here
# 986| if (! yyptr)
# 987| YYNOMEM;
# 988|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 989| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 990| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/syncrep_gram.y:69:102: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/src/backend/replication/syncrep_gram.c:946:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1013:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1025:6: branch_false: following ‘false’ branch (when ‘yyn != -10’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1031:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1031:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1034:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1043:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1055:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1062:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1065:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1075:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1075:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1082:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:946:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1013:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1095:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1097:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.y:69:102: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 67| standby_config:
# 68| standby_list { $$ = create_syncrep_config("1", $1, SYNC_REP_PRIORITY); }
# 69|-> | NUM '(' standby_list ')' { $$ = create_syncrep_config($1, $3, SYNC_REP_PRIORITY); }
# 70| | ANY NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_QUORUM); }
# 71| | FIRST NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_PRIORITY); }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/replication/syncrep_gram.y:70:98: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvsp[2305843009213693951].list’
postgresql-18.3/src/backend/replication/syncrep_gram.c:946:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1013:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1025:6: branch_false: following ‘false’ branch (when ‘yyn != -10’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1031:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1031:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1034:16: branch_true: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1043:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1055:17: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1062:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1065:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1075:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1075:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1082:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:946:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1010:6: branch_false: following ‘false’ branch (when ‘yystate != 12’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1013:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.c:1095:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/backend/replication/syncrep_gram.c:1097:3: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_gram.y:70:98: danger: use of uninitialized value ‘yyvsp[2305843009213693951].list’ here
# 68| standby_list { $$ = create_syncrep_config("1", $1, SYNC_REP_PRIORITY); }
# 69| | NUM '(' standby_list ')' { $$ = create_syncrep_config($1, $3, SYNC_REP_PRIORITY); }
# 70|-> | ANY NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_QUORUM); }
# 71| | FIRST NUM '(' standby_list ')' { $$ = create_syncrep_config($2, $4, SYNC_REP_PRIORITY); }
# 72| ;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1697:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1576:10: enter_function: entry to ‘syncrep_yyrestart’
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1581:16: call_function: calling ‘syncrep_yyensure_buffer_stack’ from ‘syncrep_yyrestart’
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1581:16: return_function: returning to ‘syncrep_yyrestart’ from ‘syncrep_yyensure_buffer_stack’
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1583:27: call_function: calling ‘syncrep_yy_create_buffer’ from ‘syncrep_yyrestart’
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1583:27: return_function: returning to ‘syncrep_yyrestart’ from ‘syncrep_yy_create_buffer’
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1586:2: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1586:2: branch_false: ...to here
postgresql-18.3/src/backend/replication/syncrep_scanner.c:1586:2: call_function: calling ‘syncrep_yy_init_buffer’ from ‘syncrep_yyrestart’
# 1695|
# 1696| yy_flush_buffer( b , yyscanner);
# 1697|->
# 1698| b->yy_input_file = file;
# 1699| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/statistics/dependencies.c:795:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/src/backend/statistics/dependencies.c:1370:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-18.3/src/backend/statistics/dependencies.c:1397:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/statistics/dependencies.c:1401:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-18.3/src/backend/statistics/dependencies.c:1429:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/statistics/dependencies.c:1433:29: release_memory: ‘expr’ is NULL
postgresql-18.3/src/backend/statistics/dependencies.c:1438:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/statistics/dependencies.c:1445:29: branch_false: ...to here
postgresql-18.3/src/backend/statistics/dependencies.c:1445:29: call_function: calling ‘dependency_is_compatible_clause’ from ‘dependencies_clauselist_selectivity’
# 793| /* OK to proceed with checking "var" */
# 794| }
# 795|-> else if (IsA(clause, ScalarArrayOpExpr))
# 796| {
# 797| /* If it's a scalar array operator, check for Var IN Const. */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/statistics/dependencies.c:1223:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/src/backend/statistics/dependencies.c:1168:1: enter_function: entry to ‘dependency_is_compatible_expression’
postgresql-18.3/src/backend/statistics/dependencies.c:1174:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/statistics/dependencies.c:1179:21: branch_true: ...to here
postgresql-18.3/src/backend/statistics/dependencies.c:1179:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/statistics/dependencies.c:1183:36: branch_false: ...to here
postgresql-18.3/src/backend/statistics/dependencies.c:1183:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/statistics/dependencies.c:1186:17: branch_false: ...to here
postgresql-18.3/src/backend/statistics/dependencies.c:1189:13: call_function: inlined call to ‘is_opclause’ from ‘dependency_is_compatible_expression’
postgresql-18.3/src/backend/statistics/dependencies.c:1223:18: branch_false: ...to here
postgresql-18.3/src/backend/statistics/dependencies.c:1223:18: danger: dereference of NULL ‘clause’
# 1221| /* OK to proceed with checking "var" */
# 1222| }
# 1223|-> else if (IsA(clause, ScalarArrayOpExpr))
# 1224| {
# 1225| /* If it's a scalar array operator, check for Var IN Const. */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/statistics/mcv.c:1710:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-18.3/src/backend/statistics/mcv.c:2126:1: enter_function: entry to ‘mcv_clause_selectivity_or’
postgresql-18.3/src/backend/statistics/mcv.c:2140:23: call_function: calling ‘mcv_get_match_bitmap’ from ‘mcv_clause_selectivity_or’
# 1708| }
# 1709| }
# 1710|-> else if (IsA(clause, ScalarArrayOpExpr))
# 1711| {
# 1712| ScalarArrayOpExpr *expr = (ScalarArrayOpExpr *) clause;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/statistics/mvdistinct.c:365:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/statistics/mvdistinct.c:355:1: enter_function: entry to ‘pg_ndistinct_out’
postgresql-18.3/src/backend/statistics/mvdistinct.c:358:30: call_function: calling ‘statext_ndistinct_deserialize’ from ‘pg_ndistinct_out’
postgresql-18.3/src/backend/statistics/mvdistinct.c:358:30: return_function: returning to ‘pg_ndistinct_out’ from ‘statext_ndistinct_deserialize’
postgresql-18.3/src/backend/statistics/mvdistinct.c:365:25: danger: dereference of NULL ‘statext_ndistinct_deserialize(pg_detoast_datum_packed((char *)*fcinfo.args[0].value))’
# 363| appendStringInfoChar(&str, '{');
# 364|
# 365|-> for (i = 0; i < ndist->nitems; i++)
# 366| {
# 367| int j;
Error: CPPCHECK_WARNING (CWE-909):
postgresql-18.3/src/backend/storage/lmgr/lmgr.c:729: error[uninitStructMember]: Uninitialized struct member: callback.previous
# 727|
# 728| if (oper != XLTW_None)
# 729|-> error_context_stack = callback.previous;
# 730| }
# 731|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/storage/lmgr/lock.c:2000: warning[uninitvar]: Uninitialized variable: result
# 1998| locallock->tag.mode);
# 1999|
# 2000|-> return result;
# 2001| }
# 2002|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/storage/page/bufpage.c:523:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-18.3/src/backend/storage/page/bufpage.c:698:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-18.3/src/backend/storage/page/bufpage.c:722:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/page/bufpage.c:724:17: branch_false: ...to here
postgresql-18.3/src/backend/storage/page/bufpage.c:722:13: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/page/bufpage.c:726:17: branch_false: ...to here
postgresql-18.3/src/backend/storage/page/bufpage.c:722:13: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/page/bufpage.c:735:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-18.3/src/backend/storage/page/bufpage.c:735:9: branch_true: ...to here
postgresql-18.3/src/backend/storage/page/bufpage.c:739:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-18.3/src/backend/storage/page/bufpage.c:776:30: branch_false: ...to here
postgresql-18.3/src/backend/storage/page/bufpage.c:777:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-18.3/src/backend/storage/page/bufpage.c:785:39: branch_false: ...to here
postgresql-18.3/src/backend/storage/page/bufpage.c:785:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/page/bufpage.c:791:17: branch_false: ...to here
postgresql-18.3/src/backend/storage/page/bufpage.c:791:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
# 521| {
# 522| itemidptr = &itemidbase[i];
# 523|-> if (upper != itemidptr->itemoff + itemidptr->alignedlen)
# 524| break;
# 525| upper -= itemidptr->alignedlen;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/storage/smgr/md.c:512:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/storage/smgr/md.c:1744:1: enter_function: entry to ‘_mdfd_getseg’
postgresql-18.3/src/backend/storage/smgr/md.c:1759:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/smgr/md.c:1766:13: branch_false: ...to here
postgresql-18.3/src/backend/storage/smgr/md.c:1766:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/smgr/md.c:1776:12: branch_false: ...to here
postgresql-18.3/src/backend/storage/smgr/md.c:1786:18: branch_true: following ‘true’ branch (when ‘nextsegno <= targetseg’)...
postgresql-18.3/src/backend/storage/smgr/md.c:1788:39: branch_true: ...to here
postgresql-18.3/src/backend/storage/smgr/md.c:1788:39: call_function: calling ‘_mdnblocks’ from ‘_mdfd_getseg’
postgresql-18.3/src/backend/storage/smgr/md.c:1788:39: return_function: returning to ‘_mdfd_getseg’ from ‘_mdnblocks’
postgresql-18.3/src/backend/storage/smgr/md.c:1793:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/storage/smgr/md.c:1796:21: branch_false: ...to here
postgresql-18.3/src/backend/storage/smgr/md.c:1818:33: call_function: calling ‘mdextend’ from ‘_mdfd_getseg’
# 510| Assert(seekpos < (off_t) BLCKSZ * RELSEG_SIZE);
# 511|
# 512|-> if ((nbytes = FileWrite(v->mdfd_vfd, buffer, BLCKSZ, seekpos, WAIT_EVENT_DATA_FILE_EXTEND)) != BLCKSZ)
# 513| {
# 514| if (nbytes < 0)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/tcop/pquery.c:604: warning[uninitvar]: Uninitialized variables: oldContext.type, oldContext.isReset, oldContext.allowInCritSection, oldContext.mem_allocated, oldContext.methods, oldContext.parent, oldContext.firstchild, oldContext.prevchild, oldContext.nextchild, oldContext.name, oldContext.ident, oldContext.reset_cbs
# 602| PG_END_TRY();
# 603|
# 604|-> MemoryContextSwitchTo(oldContext);
# 605|
# 606| ActivePortal = saveActivePortal;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/tcop/pquery.c:1453: warning[uninitvar]: Uninitialized variables: oldContext.type, oldContext.isReset, oldContext.allowInCritSection, oldContext.mem_allocated, oldContext.methods, oldContext.parent, oldContext.firstchild, oldContext.prevchild, oldContext.nextchild, oldContext.name, oldContext.ident, oldContext.reset_cbs
# 1451| PG_END_TRY();
# 1452|
# 1453|-> MemoryContextSwitchTo(oldContext);
# 1454|
# 1455| /* Mark portal not active */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/tcop/pquery.c:1462: warning[uninitvar]: Uninitialized variable: result
# 1460| PortalContext = savePortalContext;
# 1461|
# 1462|-> return result;
# 1463| }
# 1464|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/tsearch/dict_synonym.c:232: error[uninitvar]: Uninitialized variables: &key.outlen, &key.flags
# 230| key.out = NULL;
# 231|
# 232|-> found = (Syn *) bsearch(&key, d->syn, d->len, sizeof(Syn), compareSyn);
# 233| pfree(key.in);
# 234|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/tsearch/spell.c: scope_hint: In function ‘CheckCompoundAffixes’
postgresql-18.3/src/backend/tsearch/spell.c:2320:60: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2320 | if (len > (*ptr)->len && (affbegin = strstr(word, (*ptr)->affix)) != NULL)
# | ^
# 2318| while ((*ptr)->affix)
# 2319| {
# 2320|-> if (len > (*ptr)->len && (affbegin = strstr(word, (*ptr)->affix)) != NULL)
# 2321| {
# 2322| len = (*ptr)->len + (affbegin - word);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/tsearch/spell.c:2320:60: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 2318| while ((*ptr)->affix)
# 2319| {
# 2320|-> if (len > (*ptr)->len && (affbegin = strstr(word, (*ptr)->affix)) != NULL)
# 2321| {
# 2322| len = (*ptr)->len + (affbegin - word);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/ts_parse.c:82:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘res’
postgresql-18.3/src/backend/tsearch/ts_parse.c:540:1: enter_function: entry to ‘hlparsetext’
postgresql-18.3/src/backend/tsearch/ts_parse.c:590:38: call_function: calling ‘LexizeExec’ from ‘hlparsetext’
# 80| else
# 81| list->head = list->tail = newpl;
# 82|-> newpl->next = NULL;
# 83| }
# 84|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser.c:196: error[nullPointer]: Null pointer dereference: lex
# 194| }
# 195| st->list[st->cur].lexeme = palloc(llen + 1);
# 196|-> memcpy(st->list[st->cur].lexeme, lex, llen);
# 197| st->list[st->cur].lexeme[llen] = '\0';
# 198| st->list[st->cur].type = type;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:454: error[ctunullpointer]: Null pointer dereference: prs
# 452| * an alpha character, but not a member of other char classes.
# 453| */
# 454|-> p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:454: warning[nullPointer]: Possible null pointer dereference: prs
# 452| * an alpha character, but not a member of other char classes.
# 453| */
# 454|-> p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:455: error[ctunullpointer]: Null pointer dereference: prs
# 453| */
# 454| p_iswhat(alnum, 1)
# 455|-> p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:455: warning[nullPointer]: Possible null pointer dereference: prs
# 453| */
# 454| p_iswhat(alnum, 1)
# 455|-> p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:456: error[ctunullpointer]: Null pointer dereference: prs
# 454| p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456|-> p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:456: warning[nullPointer]: Possible null pointer dereference: prs
# 454| p_iswhat(alnum, 1)
# 455| p_iswhat(alpha, 1)
# 456|-> p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:457: error[ctunullpointer]: Null pointer dereference: prs
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457|-> p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:457: warning[nullPointer]: Possible null pointer dereference: prs
# 455| p_iswhat(alpha, 1)
# 456| p_iswhat(digit, 0)
# 457|-> p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:458: error[ctunullpointer]: Null pointer dereference: prs
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458|-> p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:458: warning[nullPointer]: Possible null pointer dereference: prs
# 456| p_iswhat(digit, 0)
# 457| p_iswhat(lower, 0)
# 458|-> p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:459: error[ctunullpointer]: Null pointer dereference: prs
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459|-> p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:459: warning[nullPointer]: Possible null pointer dereference: prs
# 457| p_iswhat(lower, 0)
# 458| p_iswhat(print, 0)
# 459|-> p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:460: error[ctunullpointer]: Null pointer dereference: prs
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460|-> p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:460: warning[nullPointer]: Possible null pointer dereference: prs
# 458| p_iswhat(print, 0)
# 459| p_iswhat(punct, 0)
# 460|-> p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:461: error[ctunullpointer]: Null pointer dereference: prs
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461|-> p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
# 463|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:461: warning[nullPointer]: Possible null pointer dereference: prs
# 459| p_iswhat(punct, 0)
# 460| p_iswhat(space, 0)
# 461|-> p_iswhat(upper, 0)
# 462| p_iswhat(xdigit, 0)
# 463|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:462: error[ctunullpointer]: Null pointer dereference: prs
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462|-> p_iswhat(xdigit, 0)
# 463|
# 464| /* p_iseq should be used only for ascii symbols */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:462: warning[nullPointer]: Possible null pointer dereference: prs
# 460| p_iswhat(space, 0)
# 461| p_iswhat(upper, 0)
# 462|-> p_iswhat(xdigit, 0)
# 463|
# 464| /* p_iseq should be used only for ascii symbols */
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:470: error[ctunullpointer]: Null pointer dereference: prs
# 468| {
# 469| Assert(prs->state);
# 470|-> return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
# 471| }
# 472|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:470: warning[nullPointer]: Possible null pointer dereference: prs
# 468| {
# 469| Assert(prs->state);
# 470|-> return ((prs->state->charlen == 1 && *(prs->str + prs->state->posbyte) == c)) ? 1 : 0;
# 471| }
# 472|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:477: error[ctunullpointer]: Null pointer dereference: prs
# 475| {
# 476| Assert(prs->state);
# 477|-> return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
# 478| }
# 479|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:477: warning[nullPointer]: Possible null pointer dereference: prs
# 475| {
# 476| Assert(prs->state);
# 477|-> return (prs->state->posbyte == prs->lenstr || prs->state->charlen == 0) ? 1 : 0;
# 478| }
# 479|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:483: warning[nullPointer]: Possible null pointer dereference: prs
# 481| p_iseqC(TParser *prs)
# 482| {
# 483|-> return p_iseq(prs, prs->c);
# 484| }
# 485|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/tsearch/wparser_def.c:489: warning[nullPointer]: Possible null pointer dereference: prs
# 487| p_isneC(TParser *prs)
# 488| {
# 489|-> return !p_iseq(prs, prs->c);
# 490| }
# 491|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/activity/backend_status.c:1259: error[uninitvar]: Uninitialized variables: &key.backendStatus, &key.backend_xid, &key.backend_xmin, &key.backend_subxact_count, &key.backend_subxact_overflowed
# 1257| */
# 1258| key.proc_number = procNumber;
# 1259|-> return bsearch(&key, localBackendStatusTable, localNumBackends,
# 1260| sizeof(LocalPgBackendStatus), cmp_lbestatus);
# 1261| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/activity/pgstat.c:1161:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1144:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1146:29: branch_true: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1159:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1161:26: danger: dereference of NULL ‘<unknown>’
# 1159| if (p->key.dboid != MyDatabaseId &&
# 1160| p->key.dboid != InvalidOid &&
# 1161|-> !kind_info->accessed_across_databases)
# 1162| continue;
# 1163|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/activity/pgstat.c:1247:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1212:1: enter_function: entry to ‘pgstat_build_snapshot_fixed’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1214:44: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_build_snapshot_fixed’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1247:9: danger: dereference of NULL ‘<unknown>’
# 1245| Assert(!valid[idx]);
# 1246|
# 1247|-> kind_info->snapshot_cb();
# 1248|
# 1249| Assert(!valid[idx]);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/activity/pgstat.c:1287:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1267:1: enter_function: entry to ‘pgstat_prep_pending_entry’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1285:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1287:45: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_prep_pending_entry’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1287:45: danger: dereference of NULL ‘<unknown>’
# 1285| if (entry_ref->pending == NULL)
# 1286| {
# 1287|-> size_t entrysize = pgstat_get_kind_info(kind)->pending_size;
# 1288|
# 1289| Assert(entrysize != (size_t) -1);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/activity/pgstat.c:1328:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1318:1: enter_function: entry to ‘pgstat_delete_pending_entry’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1321:44: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_delete_pending_entry’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1328:13: danger: dereference of NULL ‘<unknown>’
# 1326| Assert(!pgstat_get_kind_info(kind)->fixed_amount);
# 1327|
# 1328|-> if (kind_info->delete_pending_cb)
# 1329| kind_info->delete_pending_cb(entry_ref);
# 1330|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/activity/pgstat.c:1372:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1341:1: enter_function: entry to ‘pgstat_flush_pending_entries’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1358:16: branch_true: following ‘true’ branch (when ‘cur’ is non-NULL)...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1360:34: branch_true: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1372:29: danger: dereference of NULL ‘<unknown>’
# 1370|
# 1371| /* flush the stats, if possible */
# 1372|-> did_flush = kind_info->flush_pending_cb(entry_ref, nowait);
# 1373|
# 1374| Assert(did_flush || nowait);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/activity/pgstat.c:1679:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1570:1: enter_function: entry to ‘pgstat_write_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1593:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1605:9: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1609:50: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1612:47: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_write_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1614:21: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1614:20: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1639:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1644:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1663:22: call_function: inlined call to ‘pgstat_is_kind_valid’ from ‘pgstat_write_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1671:51: branch_true: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1673:29: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_write_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1673:29: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_write_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1679:22: danger: dereference of NULL ‘<unknown>’
# 1677|
# 1678| /* skip if no need to write to file */
# 1679|-> if (!kind_info->write_to_file)
# 1680| continue;
# 1681|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:1351: warning[uninitvar]: Uninitialized variable: dim
# 1349|
# 1350| /* This checks for overflow of array dimensions */
# 1351|-> nitems = ArrayGetNItems(ndim, dim);
# 1352| ArrayCheckBounds(ndim, dim, lBound);
# 1353|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:1352: warning[uninitvar]: Uninitialized variable: lBound
# 1350| /* This checks for overflow of array dimensions */
# 1351| nitems = ArrayGetNItems(ndim, dim);
# 1352|-> ArrayCheckBounds(ndim, dim, lBound);
# 1353|
# 1354| /*
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:1697: warning[uninitvar]: Uninitialized variable: buf
# 1695| }
# 1696|
# 1697|-> PG_RETURN_TEXT_P(cstring_to_text(buf));
# 1698| }
# 1699|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:2902: warning[uninitvar]: Uninitialized variable: dim
# 2900|
# 2901| /* complain if too few source items; we ignore extras, however */
# 2902|-> if (nelems < ArrayGetNItems(nSubscripts, dim))
# 2903| ereport(ERROR,
# 2904| (errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3790:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3785:18: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3785:18: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3788:16: branch_true: following ‘true’ branch (when ‘nelems > 7’)...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3790:21: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3790:21: danger: dereference of NULL ‘bitmap’
# 3788| while (nelems >= 8)
# 3789| {
# 3790|-> if (*bitmap != 0xFF)
# 3791| return true;
# 3792| bitmap++;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3800:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3785:18: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3785:18: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3788:16: branch_false: following ‘false’ branch (when ‘nelems <= 7’)...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3788:16: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3798:16: branch_true: following ‘true’ branch (when ‘nelems > 0’)...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3800:22: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:3800:22: danger: dereference of NULL ‘bitmap’
# 3798| while (nelems > 0)
# 3799| {
# 3800|-> if ((*bitmap & bitmask) == 0)
# 3801| return true;
# 3802| bitmask <<= 1;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:4986:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘destbitmap’
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5709:1: enter_function: entry to ‘makeArrayResultArr’
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5719:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5730:54: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5756:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5757:25: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5757:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5757:25: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/arrayfuncs.c:5757:25: call_function: calling ‘array_bitmap_copy’ from ‘makeArrayResultArr’
# 4984| destbitmap += destoffset / 8;
# 4985| destbitmask = 1 << (destoffset % 8);
# 4986|-> destbitval = *destbitmap;
# 4987| if (srcbitmap)
# 4988| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/dbsize.c:625: warning[uninitvar]: Uninitialized variable: buf
# 623| }
# 624|
# 625|-> PG_RETURN_TEXT_P(cstring_to_text(buf));
# 626| }
# 627|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/inet_cidr_ntop.c:285: warning[uninitvar]: Uninitialized variable: outbuf
# 283| /* Format CIDR /width. */
# 284| (void) SPRINTF((cp, "/%u", bits));
# 285|-> if (strlen(outbuf) + 1 > size)
# 286| goto emsgsize;
# 287| strcpy(dst, outbuf);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonb.c:101: error[legacyUninitvar]: Uninitialized variable: nbytes
# 99| elog(ERROR, "unsupported jsonb version number %d", version);
# 100|
# 101|-> return jsonb_from_cstring(str, nbytes, false, NULL);
# 102| }
# 103|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonb.c:101: error[legacyUninitvar]: Uninitialized variable: str
# 99| elog(ERROR, "unsupported jsonb version number %d", version);
# 100|
# 101|-> return jsonb_from_cstring(str, nbytes, false, NULL);
# 102| }
# 103|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonbsubs.c:152: error[legacyUninitvar]: Uninitialized variable: subExpr
# 150| }
# 151|
# 152|-> upperIndexpr = lappend(upperIndexpr, subExpr);
# 153| }
# 154|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/jsonfuncs.c:5839: warning[nullPointer]: Possible null pointer dereference: res
# 5837| }
# 5838|
# 5839|-> if (res->type == jbvArray)
# 5840| res->val.array.rawScalar = is_scalar;
# 5841|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath.c:127: error[legacyUninitvar]: Uninitialized variable: nbytes
# 125| elog(ERROR, "unsupported jsonpath version number: %d", version);
# 126|
# 127|-> return jsonPathFromCstring(str, nbytes, NULL);
# 128| }
# 129|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath.c:127: error[legacyUninitvar]: Uninitialized variable: str
# 125| elog(ERROR, "unsupported jsonpath version number: %d", version);
# 126|
# 127|-> return jsonPathFromCstring(str, nbytes, NULL);
# 128| }
# 129|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath_exec.c:1317: error[legacyUninitvar]: Uninitialized variable: datum
# 1315| jb = &jbv;
# 1316| jb->type = jbvNumeric;
# 1317|-> jb->val.numeric = DatumGetNumeric(DirectFunctionCall1(int8_numeric,
# 1318| datum));
# 1319|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath_exec.c:1390: error[legacyUninitvar]: Uninitialized variable: bval
# 1388| jb = &jbv;
# 1389| jb->type = jbvBool;
# 1390|-> jb->val.boolean = bval;
# 1391|
# 1392| res = executeNextItem(cxt, jsp, NULL, jb, found, true);
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath_exec.c:1597: error[legacyUninitvar]: Uninitialized variable: datum
# 1595| jb = &jbv;
# 1596| jb->type = jbvNumeric;
# 1597|-> jb->val.numeric = DatumGetNumeric(DirectFunctionCall1(int4_numeric,
# 1598| datum));
# 1599|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1236:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1194:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1200:28: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1223:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1225:7: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1234:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1236:9: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1236:9: danger: use of uninitialized value ‘yyss’ here
# 1234| if (! yyptr)
# 1235| YYNOMEM;
# 1236|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1237| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1238| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1363:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1194:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1258:6: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1258:6: branch_false: following ‘false’ branch (when ‘yystate != 5’)...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1261:3: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1273:6: branch_false: following ‘false’ branch (when ‘yyn != -47’)...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1279:6: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1279:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1282:16: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1313:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1317:7: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_gram.c:1363:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1361| unconditionally makes the parser a bit smaller, and it avoids a
# 1362| GCC warning that YYVAL may be used uninitialized. */
# 1363|-> yyval = yyvsp[1-yylen];
# 1364|
# 1365|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5348:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5227:10: enter_function: entry to ‘jsonpath_yyrestart’
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5232:16: call_function: calling ‘jsonpath_yyensure_buffer_stack’ from ‘jsonpath_yyrestart’
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5232:16: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yyensure_buffer_stack’
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5234:27: call_function: calling ‘jsonpath_yy_create_buffer’ from ‘jsonpath_yyrestart’
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5234:27: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yy_create_buffer’
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5237:2: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5237:2: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/jsonpath_scan.c:5237:2: call_function: calling ‘jsonpath_yy_init_buffer’ from ‘jsonpath_yyrestart’
# 5346|
# 5347| yy_flush_buffer( b , yyscanner);
# 5348|->
# 5349| b->yy_input_file = file;
# 5350| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:510: warning[nullPointer]: Possible null pointer dereference: blocked_instance
# 508|
# 509| lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
# 510|-> conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
# 511|
# 512| /* Now scan the PROCLOCK data for conflicting procs */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:510:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘blocked_instance’
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:483:21: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:485:43: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:497:29: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:509:58: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/lockfuncs.c:510:61: danger: dereference of NULL ‘blocked_instance’
# 508|
# 509| lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
# 510|-> conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
# 511|
# 512| /* Now scan the PROCLOCK data for conflicting procs */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/misc.c:760: warning[uninitvar]: Uninitialized variable: values
# 758| }
# 759|
# 760|-> return HeapTupleGetDatum(heap_form_tuple(tupdesc, values, isnull));
# 761| }
# 762|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/pg_locale.c:1098: error[legacyUninitvar]: Uninitialized variable: result
# 1096| PGLOCALE_SUPPORT_ERROR(collform->collprovider);
# 1097|
# 1098|-> result->is_default = false;
# 1099|
# 1100| Assert((result->collate_is_c && result->collate == NULL) ||
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/pg_locale.c:1181: error[legacyUninitvar]: Uninitialized variable: result
# 1179| PGLOCALE_SUPPORT_ERROR(dbform->datlocprovider);
# 1180|
# 1181|-> result->is_default = true;
# 1182| ReleaseSysCache(tup);
# 1183|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/rangetypes.c:2610: error[ctunullpointer]: Null pointer dereference: value
# 2608|
# 2609| /* Detect whether we need double quotes for this value */
# 2610|-> nq = (value[0] == '\0'); /* force quotes for empty string */
# 2611| for (ptr = value; *ptr; ptr++)
# 2612| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/selfuncs.c:5320:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘basenode’
postgresql-18.3/src/backend/utils/adt/selfuncs.c:5163:1: enter_function: entry to ‘get_restriction_variable’
postgresql-18.3/src/backend/utils/adt/selfuncs.c:5182:9: call_function: calling ‘examine_variable’ from ‘get_restriction_variable’
# 5318| * may have brought separate RelabelTypes into adjacency.
# 5319| */
# 5320|-> while (IsA(basenode, RelabelType))
# 5321| basenode = (Node *) ((RelabelType *) basenode)->arg;
# 5322|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/timestamp.c:3221: error[legacyUninitvar]: Uninitialized variable: result
# 3219| }
# 3220|
# 3221|-> PG_RETURN_TIMESTAMP(result);
# 3222| }
# 3223|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/timestamp.c:3376: error[legacyUninitvar]: Uninitialized variable: result
# 3374| }
# 3375|
# 3376|-> return result;
# 3377| }
# 3378|
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/adt/varlena.c:472: warning[nullPointer]: Possible null pointer dereference: rp
# 470| rp = result = NULL; /* keep compiler quiet */
# 471| }
# 472|-> *rp = '\0';
# 473| PG_RETURN_CSTRING(result);
# 474| }
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/varlena.c:1465:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*state.skiptablemask’
postgresql-18.3/src/backend/utils/adt/varlena.c:4626:1: enter_function: entry to ‘split_part’
postgresql-18.3/src/backend/utils/adt/varlena.c:4640:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/adt/varlena.c:4645:27: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/varlena.c:4645:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/adt/varlena.c:4645:27: branch_true: ...to here
postgresql-18.3/src/backend/utils/adt/varlena.c:4649:12: branch_false: following ‘false’ branch (when ‘inputstring_len > 0’)...
postgresql-18.3/src/backend/utils/adt/varlena.c:4653:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/varlena.c:4653:12: branch_false: following ‘false’ branch (when ‘fldsep_len > 0’)...
postgresql-18.3/src/backend/utils/adt/varlena.c:4663:9: branch_false: ...to here
postgresql-18.3/src/backend/utils/adt/varlena.c:4663:9: call_function: calling ‘text_position_setup’ from ‘split_part’
postgresql-18.3/src/backend/utils/adt/varlena.c:4663:9: return_function: returning to ‘split_part’ from ‘text_position_setup’
postgresql-18.3/src/backend/utils/adt/varlena.c:4665:17: call_function: calling ‘text_position_next’ from ‘split_part’
# 1463| int haystack_len = state->len1;
# 1464| int needle_len = state->len2;
# 1465|-> int skiptablemask = state->skiptablemask;
# 1466| const char *haystack = state->str1;
# 1467| const char *needle = state->str2;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/utils/adt/xid8funcs.c: scope_hint: In function ‘is_visible_fxid’
postgresql-18.3/src/backend/utils/adt/xid8funcs.c:198:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 198 | res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# | ^
# 196| void *res;
# 197|
# 198|-> res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# 199| cmp_fxid);
# 200| /* if found, transaction is still in progress */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/backend/utils/adt/xid8funcs.c:198:21: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 196| void *res;
# 197|
# 198|-> res = bsearch(&value, snap->xip, snap->nxip, sizeof(FullTransactionId),
# 199| cmp_fxid);
# 200| /* if found, transaction is still in progress */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/xml.c:860: warning[uninitvar]: Uninitialized variable: result
# 858| pg_xml_done(xmlerrcxt, false);
# 859|
# 860|-> return result;
# 861| #else
# 862| NO_XML_SUPPORT();
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/xml.c:984: warning[uninitvar]: Uninitialized variable: result
# 982| pg_xml_done(xmlerrcxt, false);
# 983|
# 984|-> return result;
# 985| #else
# 986| NO_XML_SUPPORT();
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/adt/xml.c:2666: warning[uninitvar]: Uninitialized variable: result
# 2664| pg_xml_done(xmlerrcxt, false);
# 2665|
# 2666|-> return result;
# 2667| }
# 2668| #endif /* USE_LIBXML */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/cache/catcache.c:2046: warning[uninitvar]: Uninitialized variable: cl
# 2044| catcache_in_progress_stack = save_in_progress;
# 2045|
# 2046|-> cl->cl_magic = CL_MAGIC;
# 2047| cl->my_cache = cache;
# 2048| cl->refcount = 0; /* for the moment */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/cache/catcache.c:2050: warning[uninitvar]: Uninitialized variable: ordered
# 2048| cl->refcount = 0; /* for the moment */
# 2049| cl->dead = false;
# 2050|-> cl->ordered = ordered;
# 2051| cl->nkeys = nkeys;
# 2052| cl->hash_value = lHashValue;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/cache/catcache.c:2053: warning[uninitvar]: Uninitialized variable: nmembers
# 2051| cl->nkeys = nkeys;
# 2052| cl->hash_value = lHashValue;
# 2053|-> cl->n_members = nmembers;
# 2054|
# 2055| i = 0;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/cache/catcache.c:2320: warning[nullPointer]: Possible null pointer dereference: srckeys
# 2318| int attnum = attnos[i];
# 2319| Form_pg_attribute att = TupleDescAttr(tupdesc, attnum - 1);
# 2320|-> Datum src = srckeys[i];
# 2321| NameData srcname;
# 2322|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/cache/relcache.c:4661:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘check’
postgresql-18.3/src/backend/utils/cache/relcache.c:2585:1: enter_function: entry to ‘RelationRebuildRelation’
postgresql-18.3/src/backend/utils/cache/relcache.c:2659:26: call_function: calling ‘RelationBuildDesc’ from ‘RelationRebuildRelation’
# 4659| }
# 4660|
# 4661|-> check[found].ccenforced = conform->conenforced;
# 4662| check[found].ccvalid = conform->convalidated;
# 4663| check[found].ccnoinherit = conform->connoinherit;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/cache/ts_cache.c:503:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&mapdicts’
postgresql-18.3/src/backend/utils/cache/ts_cache.c:385:1: enter_function: entry to ‘lookup_ts_config_cache’
postgresql-18.3/src/backend/utils/cache/ts_cache.c:424:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:427:43: call_function: inlined call to ‘GETSTRUCT’ from ‘lookup_ts_config_cache’
postgresql-18.3/src/backend/utils/cache/ts_cache.c:432:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:435:20: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:487:80: call_function: inlined call to ‘GETSTRUCT’ from ‘lookup_ts_config_cache’
postgresql-18.3/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:497:36: branch_false: following ‘false’ branch (when ‘ndicts <= 0’)...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:507:47: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:487:80: call_function: inlined call to ‘GETSTRUCT’ from ‘lookup_ts_config_cache’
postgresql-18.3/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-18.3/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-18.3/src/backend/utils/cache/ts_cache.c:503:41: danger: use of uninitialized value ‘&mapdicts’ here
# 501| MemoryContextAlloc(CacheMemoryContext,
# 502| sizeof(Oid) * ndicts);
# 503|-> memcpy(maplists[maxtokentype].dictIds, mapdicts,
# 504| sizeof(Oid) * ndicts);
# 505| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/cache/typcache.c:2901: warning[uninitvar]: Uninitialized variable: &srch.sort_order
# 2899|
# 2900| srch.enum_oid = arg;
# 2901|-> return bsearch(&srch, enumdata->enum_values, enumdata->num_values,
# 2902| sizeof(EnumItem), enum_oid_cmp);
# 2903| }
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/cache/typcache.c:3001: warning[uninitvar]: Uninitialized variable: typmod_table_entry
# 2999| }
# 3000| PG_END_TRY();
# 3001|-> typmod_table_entry->typmod = typmod;
# 3002| typmod_table_entry->shared_tupdesc = shared_dp;
# 3003| dshash_release_lock(CurrentSession->shared_typmod_table,
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/init/postinit.c:1295:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/init/postinit.c:1244:1: enter_function: entry to ‘process_startup_options’
postgresql-18.3/src/backend/utils/init/postinit.c:1286:19: call_function: inlined call to ‘list_head’ from ‘process_startup_options’
postgresql-18.3/src/backend/utils/init/postinit.c:1287:16: branch_true: following ‘true’ branch (when ‘gucopts’ is non-NULL)...
postgresql-18.3/src/backend/utils/init/postinit.c:1292:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/init/postinit.c:1295:17: danger: dereference of NULL ‘<unknown>’
# 1293| gucopts = lnext(port->guc_options, gucopts);
# 1294|
# 1295|-> value = lfirst(gucopts);
# 1296| gucopts = lnext(port->guc_options, gucopts);
# 1297|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/backend/utils/misc/guc-file.c:1608:54: warning[-Wanalyzer-malloc-leak]: leak of ‘GUC_yy_create_buffer(fp, 16384, yyg)’
postgresql-18.3/src/backend/utils/misc/guc-file.l:581:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:601:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:47: branch_true: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1606| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1607| * we need to put in 2 end-of-buffer characters.
# 1608|-> */
# 1609| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1610| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/backend/utils/misc/guc-file.c:1608:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/src/backend/utils/misc/guc-file.l:581:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:601:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:47: branch_true: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1606| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1607| * we need to put in 2 end-of-buffer characters.
# 1608|-> */
# 1609| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1610| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/misc/guc-file.c:1692:12: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘yyscanner’
postgresql-18.3/src/backend/utils/misc/guc-file.l:581:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:601:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:47: branch_true: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1690| b->yy_at_bol = 1;
# 1691| b->yy_buffer_status = YY_BUFFER_NEW;
# 1692|->
# 1693| if ( b == YY_CURRENT_BUFFER )
# 1694| yy_load_buffer_state( yyscanner );
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/backend/utils/misc/guc-file.c:1784:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/src/backend/utils/misc/guc-file.l:581:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:601:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:47: branch_true: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 1782| yy_size_t grow_size = 8 /* arbitrary grow size */;
# 1783|
# 1784|-> num_to_alloc = yyg->yy_buffer_stack_max + grow_size;
# 1785| yyg->yy_buffer_stack = (struct yy_buffer_state**)yyrealloc
# 1786| (yyg->yy_buffer_stack,
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/backend/utils/misc/guc-file.l:391:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/src/backend/utils/misc/guc-file.l:581:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:594:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:601:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:47: branch_true: ...to here
postgresql-18.3/src/backend/utils/misc/guc-file.l:603:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 389| yyg = (struct yyguts_t *) scanner;
# 390|
# 391|-> lex_buffer = yy_create_buffer(fp, YY_BUF_SIZE, scanner);
# 392| yy_switch_to_buffer(lex_buffer, scanner);
# 393|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/misc/guc.c:6677:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eqsgn’
postgresql-18.3/src/backend/utils/misc/guc.c:6649:12: branch_false: following ‘false’ branch (when ‘array’ is non-NULL)...
postgresql-18.3/src/backend/utils/misc/guc.c:6653:13: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc.c:6653:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/misc/guc.c:6657:9: branch_false: ...to here
postgresql-18.3/src/backend/utils/misc/guc.c:6659:21: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/misc/guc.c:6666:21: branch_true: ...to here
postgresql-18.3/src/backend/utils/misc/guc.c:6677:17: danger: dereference of NULL ‘eqsgn’
# 6675|
# 6676| eqsgn = strchr(val, '=');
# 6677|-> *eqsgn = '\0';
# 6678|
# 6679| /* skip if we have permission to delete it */
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-18.3/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:917:20: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: acquire_memory: allocated here
postgresql-18.3/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:917:20: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: danger: ‘block’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 917| if (blksize < required_size)
# 918| break;
# 919|-> block = (AllocBlock) malloc(blksize);
# 920| }
# 921|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/backend/utils/mmgr/aset.c:923:24: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-18.3/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:917:20: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:919:38: acquire_memory: allocated here
postgresql-18.3/src/backend/utils/mmgr/aset.c:914:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/aset.c:916:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:922:12: branch_true: following ‘true’ branch (when ‘block’ is NULL)...
postgresql-18.3/src/backend/utils/mmgr/aset.c:923:24: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/aset.c:923:24: danger: ‘block’ leaks here; was allocated at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 921|
# 922| if (block == NULL)
# 923|-> return MemoryContextAllocationFailure(context, size, flags);
# 924|
# 925| context->mem_allocated += blksize;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/mmgr/dsa.c:845:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1837:1: enter_function: entry to ‘destroy_superblock’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1839:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1839:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1888:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1889:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1901:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1902:17: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1902:17: call_function: calling ‘dsa_free’ from ‘destroy_superblock’
# 843| span_pointer = segment_map->pagemap[pageno];
# 844| span = dsa_get_address(area, span_pointer);
# 845|-> superblock = dsa_get_address(area, span->start);
# 846| object = dsa_get_address(area, dp);
# 847| size_class = span->size_class;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1840:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1837:1: enter_function: entry to ‘destroy_superblock’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1839:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1839:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:1840:46: danger: dereference of NULL ‘dsa_get_address(area, span_pointer)’
# 1838| {
# 1839| dsa_area_span *span = dsa_get_address(area, span_pointer);
# 1840|-> int size_class = span->size_class;
# 1841| dsa_segment_map *segment_map;
# 1842|
Error: GCC_ANALYZER_WARNING (CWE-1335):
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2029:33: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘4294967295’) >= precision of type (‘64’)
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2010:1: enter_function: entry to ‘get_best_segment’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2015:9: call_function: calling ‘check_for_freed_segments_locked’ from ‘get_best_segment’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2015:9: return_function: returning to ‘get_best_segment’ from ‘check_for_freed_segments_locked’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2021:20: call_function: inlined call to ‘contiguous_pages_to_segment_bin’ from ‘get_best_segment’
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2022:18: branch_true: following ‘true’ branch (when ‘bin != 16’)...
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2029:59: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/dsa.c:2029:33: danger: shift by count ‘4294967295’ here
# 2027| * have. We'll re-bin if we see segments with fewer.
# 2028| */
# 2029|-> size_t threshold = (size_t) 1 << (bin - 1);
# 2030| dsa_segment_index segment_index;
# 2031|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1441:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘result.index’
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1476:1: enter_function: entry to ‘FreePageManagerPutInternal’
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1489:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1491:21: branch_true: ...to here
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1491:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1499:26: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1499:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1509:26: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1509:25: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1525:30: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1525:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: following ‘false’ branch (when ‘soft == 0’)...
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1529:34: branch_false: ...to here
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1529:34: call_function: calling ‘FreePageManagerGetInternal’ from ‘FreePageManagerPutInternal’
# 1439| Assert(result.found);
# 1440| if (victim->npages == npages)
# 1441|-> FreePageBtreeRemove(fpm, result.page, result.index);
# 1442| else
# 1443| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/mmgr/freepage.c:1538: error[legacyUninitvar]: Uninitialized variable: root
# 1536|
# 1537| /* Create the btree and move the preexisting range into it. */
# 1538|-> root->hdr.magic = FREE_PAGE_LEAF_MAGIC;
# 1539| root->hdr.nused = 1;
# 1540| relptr_store(base, root->hdr.parent, (FreePageBtree *) NULL);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:546:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘read_page’
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:584:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:586:25: branch_false: ...to here
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-18.3/src/backend/utils/sort/sharedtuplestore.c:546:29: danger: use of uninitialized value ‘read_page’ here
# 544|
# 545| /* Seek and load the chunk header. */
# 546|-> if (BufFileSeekBlock(accessor->read_file, read_page) != 0)
# 547| ereport(ERROR,
# 548| (errcode_for_file_access(),
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:133:17: warning[-Wanalyzer-jump-through-null]: jump through null pointer
<unknown>: branch_false: following ‘false’ branch (when ‘copy_method > 3’)...
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:112:12: branch_false: ...to here
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:112:12: branch_false: following ‘false’ branch (when ‘dry_run == 0’)...
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:123:20: branch_false: ...to here
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:123:20: branch_false: following ‘false’ branch (when ‘strategy_name’ is NULL)...
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:126:26: branch_false: ...to here
postgresql-18.3/src/bin/pg_combinebackup/copy_file.c:133:17: danger: jump through null pointer here
# 131| src, dst, pg_checksum_type_name(checksum_ctx->type));
# 132|
# 133|-> strategy_implementation(src, dst, checksum_ctx);
# 134| }
# 135| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/bin/pg_dump/parallel.c:506: warning[nullPointer]: Possible null pointer dereference: slot
# 504| /* On all platforms, update workerStatus and te[] as well */
# 505| Assert(j < pstate->numWorkers);
# 506|-> slot->workerStatus = WRKR_TERMINATED;
# 507| pstate->te[j] = NULL;
# 508| }
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/bin/pg_dump/pg_backup_archiver.c:2303: warning[nullPointer]: Possible null pointer dereference: fh
# 2301| }
# 2302|
# 2303|-> if ((cnt = fread(sig, 1, 5, fh)) != 5)
# 2304| {
# 2305| if (ferror(fh))
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/bin/pg_dump/pg_dump.c:1601: error[legacyUninitvar]: Uninitialized variable: archiveFormat
# 1599| else
# 1600| pg_fatal("invalid output format \"%s\" specified", format);
# 1601|-> return archiveFormat;
# 1602| }
# 1603|
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:558:22: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:23: acquire_resource: opened here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:14: branch_false: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:558:22: branch_true: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:558:22: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 556| if (!fgets(rawline, sizeof(rawline), ver_fd))
# 557| {
# 558|-> if (!ferror(ver_fd))
# 559| pg_fatal("unexpected empty file \"%s\"", ver_file);
# 560| else
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:558:22: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:23: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:14: branch_false: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:558:22: branch_true: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:558:22: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 556| if (!fgets(rawline, sizeof(rawline), ver_fd))
# 557| {
# 558|-> if (!ferror(ver_fd))
# 559| pg_fatal("unexpected empty file \"%s\"", ver_file);
# 560| else
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:567:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:23: acquire_resource: opened here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:14: branch_false: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:565:16: branch_false: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:567:12: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was opened at [(1)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/0)
# 565| (void) pg_strip_crlf(rawline);
# 566|
# 567|-> if (strcmp(rawline, PG_MAJORVERSION) != 0)
# 568| {
# 569| pg_log_error("data directory is of wrong version");
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:567:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:23: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:551:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:14: branch_false: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:556:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:565:16: branch_false: ...to here
postgresql-18.3/src/bin/pg_resetwal/pg_resetwal.c:567:12: danger: ‘fopen("PG_VERSION", "r")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/0)
# 565| (void) pg_strip_crlf(rawline);
# 566|
# 567|-> if (strcmp(rawline, PG_MAJORVERSION) != 0)
# 568| {
# 569| pg_log_error("data directory is of wrong version");
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:316:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:316:31: danger: infinite loop here
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:316:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:316:31: branch_true: ...to here
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:318:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:316:57: branch_false: ...to here
# 314| {
# 315| START_TIMER;
# 316|-> for (ops = 0; alarm_triggered == false; ops++)
# 317| {
# 318| for (writes = 0; writes < writes_per_op; writes++)
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:419:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:419:31: danger: infinite loop here
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:419:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:419:31: branch_true: ...to here
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:421:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:419:57: branch_false: ...to here
# 417| {
# 418| START_TIMER;
# 419|-> for (ops = 0; alarm_triggered == false; ops++)
# 420| {
# 421| for (writes = 0; writes < writes_per_op; writes++)
Error: GCC_ANALYZER_WARNING (CWE-835):
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:484:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:484:31: danger: infinite loop here
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:484:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:484:31: branch_true: ...to here
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:486:42: branch_false: if it ever follows ‘false’ branch, it will always do so...
postgresql-18.3/src/bin/pg_test_fsync/pg_test_fsync.c:484:57: branch_false: ...to here
# 482| {
# 483| START_TIMER;
# 484|-> for (ops = 0; alarm_triggered == false; ops++)
# 485| {
# 486| for (writes = 0; writes < 16 / writes_size; writes++)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:36: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:107:9: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:31: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:20: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:136:24: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:138:34: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:138:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:140:37: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:36: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/18)
# 140| p = strchr(p, ':');
# 141|
# 142|-> if (p == NULL || strlen(p) <= 1)
# 143| pg_fatal("%d: database cluster state problem", __LINE__);
# 144|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:37: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:107:9: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:31: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:20: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:136:24: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:138:34: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:138:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:140:37: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:36: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:50: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:37: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
# 140| p = strchr(p, ':');
# 141|
# 142|-> if (p == NULL || strlen(p) <= 1)
# 143| pg_fatal("%d: database cluster state problem", __LINE__);
# 144|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/controldata.c:157:40: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:107:9: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:31: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:132:20: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:136:24: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:138:34: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:138:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:140:37: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:142:36: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:157:40: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:159:37: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:157:40: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
# 155| /* Remove trailing newline and leading spaces */
# 156| (void) pg_strip_crlf(p);
# 157|-> while (*p == ' ')
# 158| p++;
# 159| if (strcmp(p, "shut down in recovery") == 0)
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/controldata.c:206:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:102:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:104:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:107:9: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:125:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:125:13: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:125:13: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:192:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:196:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:196:9: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:202:23: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:202:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:206:13: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:206:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:206:12: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:213:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:216:17: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:219:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-18.3/src/bin/pg_upgrade/controldata.c:221:29: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/controldata.c:206:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(25)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/24)
# 204|
# 205| /* Only in <= 9.2 */
# 206|-> if (GET_MAJOR_VERSION(cluster->major_version) <= 902)
# 207| {
# 208| cluster->controldata.data_checksum_version = 0;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/exec.c:45:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/src/bin/pg_upgrade/exec.c:383:1: enter_function: entry to ‘check_bin_dir’
postgresql-18.3/src/bin/pg_upgrade/exec.c:395:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/src/bin/pg_upgrade/exec.c:395:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/src/bin/pg_upgrade/exec.c:396:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/src/bin/pg_upgrade/exec.c:396:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/src/bin/pg_upgrade/exec.c:397:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-18.3/src/bin/pg_upgrade/exec.c:397:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-18.3/src/bin/pg_upgrade/exec.c:404:9: call_function: calling ‘get_bin_version’ from ‘check_bin_dir’
# 43| fflush(NULL);
# 44|
# 45|-> if ((output = popen(cmd, "r")) == NULL ||
# 46| fgets(cmd_output, sizeof(cmd_output), output) == NULL)
# 47| pg_fatal("could not get pg_ctl version data using %s: %m", cmd);
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/bin/pg_upgrade/exec.c:178: warning[nullPointerOutOfResources]: If resource allocation fails, then there is a possible null pointer dereference: log
# 176| * open while the command is running, or we get a share violation.
# 177| */
# 178|-> fclose(log);
# 179|
# 180| #ifdef WIN32
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/bin/pg_upgrade/info.c:216:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-18.3/src/bin/pg_upgrade/info.c:45:1: enter_function: entry to ‘gen_db_file_maps’
postgresql-18.3/src/bin/pg_upgrade/info.c:65:16: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/info.c:68:39: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/info.c:74:20: branch_true: following ‘true’ branch (when ‘new_rel’ is NULL)...
postgresql-18.3/src/bin/pg_upgrade/info.c:80:25: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/info.c:80:25: call_function: calling ‘report_unmatched_relation’ from ‘gen_db_file_maps’
# 214| report_unmatched_relation(const RelInfo *rel, const DbInfo *db, bool is_new_db)
# 215| {
# 216|-> Oid reloid = rel->reloid; /* we might change rel below */
# 217| char reldesc[1000];
# 218| int i;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/option.c:472:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-18.3/src/bin/pg_upgrade/option.c:444:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:446:9: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:450:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:458:12: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:472:23: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_upgrade/option.c:472:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:473:17: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:472:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
# 470| fflush(NULL);
# 471|
# 472|-> if ((output = popen(cmd, "r")) == NULL ||
# 473| fgets(cmd_output, sizeof(cmd_output), output) == NULL)
# 474| pg_fatal("could not get data directory using %s: %m", cmd);
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/bin/pg_upgrade/option.c:525:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
postgresql-18.3/src/bin/pg_upgrade/option.c:502:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:502:13: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:502:13: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:510:32: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:518:27: acquire_resource: opened here
postgresql-18.3/src/bin/pg_upgrade/option.c:518:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:518:20: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:522:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-18.3/src/bin/pg_upgrade/option.c:525:29: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:525:28: danger: ‘fopen(&filename, "r")’ leaks here; was opened at [(5)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/4)
# 523| lineno++)
# 524| {
# 525|-> if (fgets(line, sizeof(line), fp) == NULL)
# 526| pg_fatal("could not read line %d from file \"%s\": %m",
# 527| lineno, filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_upgrade/option.c:525:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
postgresql-18.3/src/bin/pg_upgrade/option.c:502:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:502:13: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:502:13: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:510:32: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:518:27: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_upgrade/option.c:518:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_upgrade/option.c:518:20: branch_false: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:522:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-18.3/src/bin/pg_upgrade/option.c:525:29: branch_true: ...to here
postgresql-18.3/src/bin/pg_upgrade/option.c:525:28: danger: ‘fopen(&filename, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/4)
# 523| lineno++)
# 524| {
# 525|-> if (fgets(line, sizeof(line), fp) == NULL)
# 526| pg_fatal("could not read line %d from file \"%s\": %m",
# 527| lineno, filename);
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c: scope_hint: In function ‘split_path’
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:166:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 166 | sep = strrchr(path, '/');
# | ^
# 164|
# 165| /* split filepath into directory & filename */
# 166|-> sep = strrchr(path, '/');
# 167|
# 168| /* directory path */
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:166:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 164|
# 165| /* split filepath into directory & filename */
# 166|-> sep = strrchr(path, '/');
# 167|
# 168| /* directory path */
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:534:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "w")’
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:494:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:505:22: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:508:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:514:22: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:514:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:517:24: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:520:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:521:50: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:530:24: acquire_resource: opened here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:531:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:534:21: branch_false: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:534:20: danger: ‘fopen(&filename, "w")’ leaks here; was opened at [(9)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/8)
# 532| pg_fatal("could not open file \"%s\": %m", filename);
# 533|
# 534|-> if (fwrite(page, BLCKSZ, 1, file) != 1)
# 535| pg_fatal("could not write file \"%s\": %m", filename);
# 536|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:534:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "w")’
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:494:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:505:22: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:508:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:514:22: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:514:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:517:24: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:520:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:521:50: branch_true: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:530:24: acquire_memory: allocated here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:531:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:534:21: branch_false: ...to here
postgresql-18.3/src/bin/pg_waldump/pg_waldump.c:534:20: danger: ‘fopen(&filename, "w")’ leaks here; was allocated at [(9)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/8)
# 532| pg_fatal("could not open file \"%s\": %m", filename);
# 533|
# 534|-> if (fwrite(page, BLCKSZ, 1, file) != 1)
# 535| pg_fatal("could not write file \"%s\": %m", filename);
# 536|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1113:11: acquire_memory: allocated here
postgresql-18.3/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1120:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1120:12: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1133:10: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: danger: ‘yyptr’ leaks here; was allocated at [(33)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/32)
# 1115| if (! yyptr)
# 1116| YYNOMEM;
# 1117|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: danger: use of uninitialized value ‘yyss’ here
# 1115| if (! yyptr)
# 1116| YYNOMEM;
# 1117|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/bin/pgbench/exprparse.c:1118:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyvs’
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1194:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1204:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1211:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1081:28: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1104:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1106:7: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1115:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1117:9: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1118:9: danger: use of uninitialized value ‘yyvs’ here
# 1116| YYNOMEM;
# 1117| YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1118|-> YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1119| # undef YYSTACK_RELOCATE
# 1120| if (yyss1 != yyssa)
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/bin/pgbench/exprparse.c:1244:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>.ival’
postgresql-18.3/src/bin/pgbench/exprparse.c:1075:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1139:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1142:3: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1154:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1160:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1163:16: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1172:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1184:17: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1191:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/bin/pgbench/exprparse.c:1194:6: branch_true: following ‘true’ branch (when ‘yyn <= 0’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1196:10: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1196:10: branch_false: following ‘false’ branch (when ‘yyn != -1’)...
postgresql-18.3/src/bin/pgbench/exprparse.c:1198:7: branch_false: ...to here
postgresql-18.3/src/bin/pgbench/exprparse.c:1244:3: danger: use of uninitialized value ‘*<unknown>.ival’ here
# 1242| unconditionally makes the parser a bit smaller, and it avoids a
# 1243| GCC warning that YYVAL may be used uninitialized. */
# 1244|-> yyval = yyvsp[1-yylen];
# 1245|
# 1246|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pgbench/exprscan.c:1990:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/src/bin/pgbench/exprscan.l:319:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/src/bin/pgbench/exprscan.l:341:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 1988| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1989| * we need to put in 2 end-of-buffer characters.
# 1990|-> */
# 1991| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1992| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/bin/pgbench/exprscan.c:2033:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/bin/pgbench/exprscan.l:319:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/src/bin/pgbench/exprscan.l:341:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 2031|
# 2032| yy_flush_buffer( b , yyscanner);
# 2033|->
# 2034| b->yy_input_file = file;
# 2035| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pgbench/exprscan.c:2153:3: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-18.3/src/bin/pgbench/exprscan.l:319:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/src/bin/pgbench/exprscan.l:332:19: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pgbench/exprscan.l:333:56: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprscan.l:333:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2151| if ( ! yyg->yy_buffer_stack )
# 2152| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2153|->
# 2154| memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2155|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/pgbench/exprscan.c:2174:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/src/bin/pgbench/exprscan.l:319:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-18.3/src/bin/pgbench/exprscan.l:332:19: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/pgbench/exprscan.l:333:56: branch_true: ...to here
postgresql-18.3/src/bin/pgbench/exprscan.l:333:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2172| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2173|
# 2174|-> /* zero only the new slots.*/
# 2175| memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2176| yyg->yy_buffer_stack_max = num_to_alloc;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/bin/pgbench/pgbench.c:1649: warning[uninitvar]: Uninitialized variables: &key.svalue, &key.value
# 1647| /* Now we can search */
# 1648| key.name = name;
# 1649|-> return (Variable *) bsearch(&key,
# 1650| variables->vars,
# 1651| variables->nvars,
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/bin/pgbench/pgbench.c: scope_hint: In function ‘parseScriptWeight’
postgresql-18.3/src/bin/pgbench/pgbench.c:6247:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6247 | if ((sep = strrchr(option, WSEP)))
# | ^
# 6245| int weight;
# 6246|
# 6247|-> if ((sep = strrchr(option, WSEP)))
# 6248| {
# 6249| int namelen = sep - option;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/bin/pgbench/pgbench.c:6247:18: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 6245| int weight;
# 6246|
# 6247|-> if ((sep = strrchr(option, WSEP)))
# 6248| {
# 6249| int namelen = sep - option;
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/bin/psql/crosstabview.c:363: error[uninitvar]: Uninitialized variables: &elt.sort_value, &elt.rank
# 361| else
# 362| elt.name = NULL;
# 363|-> rp = (pivot_field *) bsearch(&elt,
# 364| piv_rows,
# 365| num_rows,
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/psql/psqlscanslash.c:2473:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/src/bin/psql/psqlscanslash.l:679:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-18.3/src/bin/psql/psqlscanslash.l:689:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-18.3/src/bin/psql/psqlscanslash.l:689:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-18.3/src/bin/psql/psqlscanslash.l:697:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2471| /* yy_ch_buf has to be 2 characters longer than the size given because
# 2472| * we need to put in 2 end-of-buffer characters.
# 2473|-> */
# 2474| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2475| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/bin/psql/psqlscanslash.c:2516:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/bin/psql/psqlscanslash.l:679:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-18.3/src/bin/psql/psqlscanslash.l:689:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-18.3/src/bin/psql/psqlscanslash.l:689:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-18.3/src/bin/psql/psqlscanslash.l:697:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2514|
# 2515| yy_flush_buffer( b , yyscanner);
# 2516|->
# 2517| b->yy_input_file = file;
# 2518| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/psql/psqlscanslash.c:2636:3: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-18.3/src/bin/psql/psqlscanslash.l:540:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-18.3/src/bin/psql/psqlscanslash.l:569:19: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/psql/psqlscanslash.l:570:10: branch_true: ...to here
postgresql-18.3/src/bin/psql/psqlscanslash.l:570:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2634| if ( ! yyg->yy_buffer_stack )
# 2635| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2636|->
# 2637| memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2638|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/bin/psql/psqlscanslash.c:2657:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-18.3/src/bin/psql/psqlscanslash.l:540:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-18.3/src/bin/psql/psqlscanslash.l:569:19: branch_true: following ‘true’ branch...
postgresql-18.3/src/bin/psql/psqlscanslash.l:570:10: branch_true: ...to here
postgresql-18.3/src/bin/psql/psqlscanslash.l:570:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2655| YY_FATAL_ERROR( "out of dynamic memory in yyensure_buffer_stack()" );
# 2656|
# 2657|-> /* zero only the new slots.*/
# 2658| memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2659| yyg->yy_buffer_stack_max = num_to_alloc;
Error: CPPCHECK_WARNING (CWE-562):
postgresql-18.3/src/bin/psql/psqlscanslash.l:492: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 490| /* Set current output target */
# 491| state->output_buf = &mybuf;
# 492|->
# 493| /* Set input source */
# 494| if (state->buffer_stack != NULL)
Error: CPPCHECK_WARNING (CWE-562):
postgresql-18.3/src/bin/psql/psqlscanslash.l:566: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
# 564| /* Set current output target */
# 565| state->output_buf = &mybuf;
# 566|->
# 567| /* Set input source */
# 568| if (state->buffer_stack != NULL)
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/bin/psql/tab-complete.in.c:2576: warning[uninitvar]: Uninitialized variable: argarray
# 2574| COMPLETE_WITH_SCHEMA_QUERY(Query_for_constraint_of_type);
# 2575| }
# 2576|-> /* ALTER DOMAIN <sth> RENAME */
# 2577| else if (Matches("ALTER", "DOMAIN", MatchAny, "RENAME"))
# 2578| COMPLETE_WITH("CONSTRAINT", "TO");
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/bin/psql/tab-complete.in.c:2626: warning[uninitvar]: Uninitialized variable: argarray
# 2624| Matches("ALTER", "VIEW", MatchAny, "ALTER", "COLUMN", MatchAny))
# 2625| COMPLETE_WITH("SET DEFAULT", "DROP DEFAULT");
# 2626|-> /* ALTER VIEW xxx RENAME yyy */
# 2627| else if (Matches("ALTER", "VIEW", MatchAny, "RENAME", MatchAnyExcept("TO")))
# 2628| COMPLETE_WITH("TO");
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/bin/psql/tab-complete.in.c:2714: warning[uninitvar]: Uninitialized variable: argarray
# 2712| /* ALTER STATISTICS <name> */
# 2713| else if (Matches("ALTER", "STATISTICS", MatchAny))
# 2714|-> COMPLETE_WITH("OWNER TO", "RENAME TO", "SET SCHEMA", "SET STATISTICS");
# 2715| /* ALTER STATISTICS <name> SET */
# 2716| else if (Matches("ALTER", "STATISTICS", MatchAny, "SET"))
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/bin/scripts/reindexdb.c:399: warning[nullPointer]: Possible null pointer dereference: process_list
# 397| */
# 398| items_count = 0;
# 399|-> for (cell = process_list->head; cell; cell = cell->next)
# 400| {
# 401| items_count++;
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/common/blkreftable.c:539:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/common/blkreftable.c:474:1: enter_function: entry to ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:489:9: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:489:9: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/src/common/blkreftable.c:492:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/common/blkreftable.c:500:32: branch_true: ...to here
postgresql-18.3/src/common/blkreftable.c:502:36: call_function: calling ‘blockreftable_iterate’ from ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:502:36: return_function: returning to ‘WriteBlockRefTable’ from ‘blockreftable_iterate’
postgresql-18.3/src/common/blkreftable.c:502:24: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/blkreftable.c:517:17: branch_false: ...to here
postgresql-18.3/src/common/blkreftable.c:521:29: branch_true: following ‘true’ branch...
postgresql-18.3/src/common/blkreftable.c:523:70: branch_true: ...to here
postgresql-18.3/src/common/blkreftable.c:528:25: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:528:25: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/src/common/blkreftable.c:538:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/common/blkreftable.c:540:68: branch_true: ...to here
postgresql-18.3/src/common/blkreftable.c:539:61: danger: dereference of NULL ‘blockreftable_lookup(*brtab.hash, key)’
# 537| /* Write the untruncated portion of the chunk length array. */
# 538| if (sentry->nchunks != 0)
# 539|-> BlockRefTableWrite(&buffer, brtentry->chunk_usage,
# 540| sentry->nchunks * sizeof(uint16));
# 541|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/common/blkreftable.c:543:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/common/blkreftable.c:474:1: enter_function: entry to ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:489:9: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:489:9: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/src/common/blkreftable.c:492:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/common/blkreftable.c:500:32: branch_true: ...to here
postgresql-18.3/src/common/blkreftable.c:502:36: call_function: calling ‘blockreftable_iterate’ from ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:502:36: return_function: returning to ‘WriteBlockRefTable’ from ‘blockreftable_iterate’
postgresql-18.3/src/common/blkreftable.c:502:24: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/blkreftable.c:517:17: branch_false: ...to here
postgresql-18.3/src/common/blkreftable.c:521:29: branch_true: following ‘true’ branch...
postgresql-18.3/src/common/blkreftable.c:523:70: branch_true: ...to here
postgresql-18.3/src/common/blkreftable.c:528:25: call_function: calling ‘BlockRefTableWrite’ from ‘WriteBlockRefTable’
postgresql-18.3/src/common/blkreftable.c:528:25: return_function: returning to ‘WriteBlockRefTable’ from ‘BlockRefTableWrite’
postgresql-18.3/src/common/blkreftable.c:538:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/blkreftable.c:543:25: branch_false: ...to here
postgresql-18.3/src/common/blkreftable.c:543:41: danger: dereference of NULL ‘blockreftable_lookup(*brtab.hash, key)’
# 541|
# 542| /* Write the contents of each chunk. */
# 543|-> for (j = 0; j < brtentry->nchunks; ++j)
# 544| {
# 545| if (brtentry->chunk_usage[j] == 0)
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/common/compression.c: scope_hint: In function ‘parse_compress_options’
postgresql-18.3/src/common/compression.c:458:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 458 | sep = strchr(option, ':');
# | ^
# 456| * name.
# 457| */
# 458|-> sep = strchr(option, ':');
# 459| if (sep == NULL)
# 460| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/common/compression.c:458:13: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 456| * name.
# 457| */
# 458|-> sep = strchr(option, ':');
# 459| if (sep == NULL)
# 460| {
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/common/encnames.c:540: warning[uninitvar]: Uninitialized variable: newkey
# 538| }
# 539| *np = '\0';
# 540|-> return newkey;
# 541| }
# 542|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/common/logging.c:139:57: warning[-Wanalyzer-malloc-leak]: leak of ‘sgr_error’
postgresql-18.3/src/common/logging.c:105:12: branch_true: following ‘true’ branch (when ‘pg_color_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:107:21: branch_true: ...to here
postgresql-18.3/src/common/logging.c:107:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:114:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:116:20: branch_true: following ‘true’ branch (when ‘pg_colors_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:118:46: branch_true: ...to here
postgresql-18.3/src/common/logging.c:120:28: branch_true: following ‘true’ branch (when ‘colors’ is non-NULL)...
postgresql-18.3/src/common/logging.c:123:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:139:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:139:69: acquire_memory: allocated here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:142:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:143:68: branch_true: ...to here
postgresql-18.3/src/common/logging.c:144:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:145:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:139:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:139:57: danger: ‘sgr_error’ leaks here; was allocated at [(17)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/16)
# 137|
# 138| if (strcmp(name, "error") == 0)
# 139|-> sgr_error = strdup(value);
# 140| if (strcmp(name, "warning") == 0)
# 141| sgr_warning = strdup(value);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/common/logging.c:141:57: warning[-Wanalyzer-malloc-leak]: leak of ‘sgr_warning’
postgresql-18.3/src/common/logging.c:105:12: branch_true: following ‘true’ branch (when ‘pg_color_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:107:21: branch_true: ...to here
postgresql-18.3/src/common/logging.c:107:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:114:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:116:20: branch_true: following ‘true’ branch (when ‘pg_colors_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:118:46: branch_true: ...to here
postgresql-18.3/src/common/logging.c:120:28: branch_true: following ‘true’ branch (when ‘colors’ is non-NULL)...
postgresql-18.3/src/common/logging.c:123:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:139:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:141:71: acquire_memory: allocated here
postgresql-18.3/src/common/logging.c:142:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:143:68: branch_true: ...to here
postgresql-18.3/src/common/logging.c:144:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:145:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/src/common/logging.c:140:53: branch_false: ...to here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:141:57: danger: ‘sgr_warning’ leaks here; was allocated at [(19)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/18)
# 139| sgr_error = strdup(value);
# 140| if (strcmp(name, "warning") == 0)
# 141|-> sgr_warning = strdup(value);
# 142| if (strcmp(name, "note") == 0)
# 143| sgr_note = strdup(value);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/common/logging.c:143:57: warning[-Wanalyzer-malloc-leak]: leak of ‘sgr_note’
postgresql-18.3/src/common/logging.c:105:12: branch_true: following ‘true’ branch (when ‘pg_color_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:107:21: branch_true: ...to here
postgresql-18.3/src/common/logging.c:107:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:114:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:116:20: branch_true: following ‘true’ branch (when ‘pg_colors_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:118:46: branch_true: ...to here
postgresql-18.3/src/common/logging.c:120:28: branch_true: following ‘true’ branch (when ‘colors’ is non-NULL)...
postgresql-18.3/src/common/logging.c:123:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:139:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:142:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:143:68: branch_true: ...to here
postgresql-18.3/src/common/logging.c:143:68: acquire_memory: allocated here
postgresql-18.3/src/common/logging.c:144:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:145:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/src/common/logging.c:140:53: branch_false: ...to here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:142:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:143:68: branch_true: ...to here
postgresql-18.3/src/common/logging.c:143:57: danger: ‘sgr_note’ leaks here; was allocated at [(21)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/20)
# 141| sgr_warning = strdup(value);
# 142| if (strcmp(name, "note") == 0)
# 143|-> sgr_note = strdup(value);
# 144| if (strcmp(name, "locus") == 0)
# 145| sgr_locus = strdup(value);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/common/logging.c:145:57: warning[-Wanalyzer-malloc-leak]: leak of ‘sgr_locus’
postgresql-18.3/src/common/logging.c:105:12: branch_true: following ‘true’ branch (when ‘pg_color_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:107:21: branch_true: ...to here
postgresql-18.3/src/common/logging.c:107:20: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:114:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:116:20: branch_true: following ‘true’ branch (when ‘pg_colors_env’ is non-NULL)...
postgresql-18.3/src/common/logging.c:118:46: branch_true: ...to here
postgresql-18.3/src/common/logging.c:120:28: branch_true: following ‘true’ branch (when ‘colors’ is non-NULL)...
postgresql-18.3/src/common/logging.c:123:45: branch_true: ...to here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:139:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:142:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:143:68: branch_true: ...to here
postgresql-18.3/src/common/logging.c:144:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:145:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:145:69: acquire_memory: allocated here
postgresql-18.3/src/common/logging.c:125:40: branch_true: following ‘true’ branch (when ‘token’ is non-NULL)...
postgresql-18.3/src/common/logging.c:127:57: branch_true: ...to here
postgresql-18.3/src/common/logging.c:129:44: branch_true: following ‘true’ branch (when ‘e’ is non-NULL)...
postgresql-18.3/src/common/logging.c:134:49: branch_true: ...to here
postgresql-18.3/src/common/logging.c:138:52: branch_false: following ‘false’ branch (when the strings are non-equal)...
postgresql-18.3/src/common/logging.c:140:53: branch_false: ...to here
postgresql-18.3/src/common/logging.c:140:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:141:71: branch_true: ...to here
postgresql-18.3/src/common/logging.c:142:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:143:68: branch_true: ...to here
postgresql-18.3/src/common/logging.c:144:52: branch_true: following ‘true’ branch (when the strings are equal)...
postgresql-18.3/src/common/logging.c:145:69: branch_true: ...to here
postgresql-18.3/src/common/logging.c:145:57: danger: ‘sgr_locus’ leaks here; was allocated at [(23)](sarif:/runs/0/results/3/codeFlows/0/threadFlows/0/locations/22)
# 143| sgr_note = strdup(value);
# 144| if (strcmp(name, "locus") == 0)
# 145|-> sgr_locus = strdup(value);
# 146| }
# 147| }
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/common/sprompt.c:180:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘termout’
postgresql-18.3/src/common/sprompt.c:96:19: acquire_resource: opened here
postgresql-18.3/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-18.3/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-18.3/src/common/sprompt.c:180:16: danger: ‘termout’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 178| }
# 179|
# 180|-> return result;
# 181| }
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/common/sprompt.c:180:16: warning[-Wanalyzer-malloc-leak]: leak of ‘termout’
postgresql-18.3/src/common/sprompt.c:96:19: acquire_memory: allocated here
postgresql-18.3/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-18.3/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-18.3/src/common/sprompt.c:180:16: danger: ‘termout’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 178| }
# 179|
# 180|-> return result;
# 181| }
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/fe_utils/astreamer_file.c:367:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "wb")’
postgresql-18.3/src/fe_utils/astreamer_file.c:362:16: acquire_resource: opened here
postgresql-18.3/src/fe_utils/astreamer_file.c:363:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/astreamer_file.c:367:13: branch_false: ...to here
postgresql-18.3/src/fe_utils/astreamer_file.c:367:12: danger: ‘fopen(filename, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 365|
# 366| #ifndef WIN32
# 367|-> if (chmod(filename, mode))
# 368| pg_fatal("could not set permissions on file \"%s\": %m",
# 369| filename);
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/fe_utils/astreamer_file.c:367:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "wb")’
postgresql-18.3/src/fe_utils/astreamer_file.c:362:16: acquire_memory: allocated here
postgresql-18.3/src/fe_utils/astreamer_file.c:363:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/astreamer_file.c:367:13: branch_false: ...to here
postgresql-18.3/src/fe_utils/astreamer_file.c:367:12: danger: ‘fopen(filename, "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 365|
# 366| #ifndef WIN32
# 367|-> if (chmod(filename, mode))
# 368| pg_fatal("could not set permissions on file \"%s\": %m",
# 369| filename);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/fe_utils/print.c:909:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘width_header’
postgresql-18.3/src/fe_utils/print.c:3549:1: enter_function: entry to ‘printQuery’
postgresql-18.3/src/fe_utils/print.c:3557:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3561:55: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3560:9: call_function: calling ‘printTableInit’ from ‘printQuery’
postgresql-18.3/src/fe_utils/print.c:3560:9: return_function: returning to ‘printQuery’ from ‘printTableInit’
postgresql-18.3/src/fe_utils/print.c:3567:21: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3567:21: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3601:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3609:9: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3609:9: call_function: calling ‘printTable’ from ‘printQuery’
# 907| * display across multiple lines. We check for both cases below.
# 908| */
# 909|-> if (width > 0 && width_wrap[i])
# 910| {
# 911| unsigned int extra_lines;
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/fe_utils/print.c:1040:17: warning[-Wanalyzer-null-argument]: use of NULL ‘bytes_output’ where non-null expected
postgresql-18.3/src/fe_utils/print.c:3549:1: enter_function: entry to ‘printQuery’
postgresql-18.3/src/fe_utils/print.c:3557:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3561:55: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3560:9: call_function: calling ‘printTableInit’ from ‘printQuery’
postgresql-18.3/src/fe_utils/print.c:3560:9: return_function: returning to ‘printQuery’ from ‘printTableInit’
postgresql-18.3/src/fe_utils/print.c:3567:21: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3567:21: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3601:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3609:9: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3609:9: call_function: calling ‘printTable’ from ‘printQuery’
# 1038| }
# 1039|
# 1040|-> memset(bytes_output, 0, col_count * sizeof(int));
# 1041|
# 1042| /*
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/fe_utils/print.c:3432:1: warning[-Wanalyzer-malloc-leak]: leak of ‘fout’
postgresql-18.3/src/fe_utils/print.c:3549:1: enter_function: entry to ‘printQuery’
postgresql-18.3/src/fe_utils/print.c:3557:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3561:55: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3560:9: call_function: calling ‘printTableInit’ from ‘printQuery’
postgresql-18.3/src/fe_utils/print.c:3560:9: return_function: returning to ‘printQuery’ from ‘printTableInit’
postgresql-18.3/src/fe_utils/print.c:3567:21: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3567:21: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3601:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/print.c:3609:9: branch_false: ...to here
postgresql-18.3/src/fe_utils/print.c:3609:9: call_function: calling ‘printTable’ from ‘printQuery’
# 3430| else
# 3431| *is_pager = false;
# 3432|-> }
# 3433|
# 3434| /*
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/fe_utils/psqlscan.c:4571:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/src/fe_utils/psqlscan.l:1122:8: enter_function: entry to ‘psql_scan’
postgresql-18.3/src/fe_utils/psqlscan.l:1137:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-18.3/src/fe_utils/psqlscan.l:1137:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-18.3/src/fe_utils/psqlscan.l:1142:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 4569| /* yy_ch_buf has to be 2 characters longer than the size given because
# 4570| * we need to put in 2 end-of-buffer characters.
# 4571|-> */
# 4572| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 4573| if ( ! b->yy_ch_buf )
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/fe_utils/psqlscan.c:4614:2: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-18.3/src/fe_utils/psqlscan.l:1122:8: enter_function: entry to ‘psql_scan’
postgresql-18.3/src/fe_utils/psqlscan.l:1137:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-18.3/src/fe_utils/psqlscan.l:1137:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-18.3/src/fe_utils/psqlscan.l:1142:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 4612|
# 4613| yy_flush_buffer( b , yyscanner);
# 4614|->
# 4615| b->yy_input_file = file;
# 4616| b->yy_fill_buffer = 1;
Error: GCC_ANALYZER_WARNING (CWE-775):
postgresql-18.3/src/fe_utils/recovery_gen.c:143:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, <unknown>)’
postgresql-18.3/src/fe_utils/recovery_gen.c:139:14: acquire_resource: opened here
postgresql-18.3/src/fe_utils/recovery_gen.c:140:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/recovery_gen.c:143:13: branch_false: ...to here
postgresql-18.3/src/fe_utils/recovery_gen.c:143:13: danger: ‘fopen(&filename, <unknown>)’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
# 141| pg_fatal("could not open file \"%s\": %m", filename);
# 142|
# 143|-> if (fwrite(contents->data, contents->len, 1, cf) != 1)
# 144| pg_fatal("could not write to file \"%s\": %m", filename);
# 145|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/fe_utils/recovery_gen.c:143:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, <unknown>)’
postgresql-18.3/src/fe_utils/recovery_gen.c:139:14: acquire_memory: allocated here
postgresql-18.3/src/fe_utils/recovery_gen.c:140:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/fe_utils/recovery_gen.c:143:13: branch_false: ...to here
postgresql-18.3/src/fe_utils/recovery_gen.c:143:13: danger: ‘fopen(&filename, <unknown>)’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
# 141| pg_fatal("could not open file \"%s\": %m", filename);
# 142|
# 143|-> if (fwrite(contents->data, contents->len, 1, cf) != 1)
# 144| pg_fatal("could not write to file \"%s\": %m", filename);
# 145|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/access/htup_details.h:735:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/cache/relcache.c:5576:1: enter_function: entry to ‘RelationGetIdentityKeyBitmap’
postgresql-18.3/src/backend/utils/cache/relcache.c:5585:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/cache/relcache.c:5589:14: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/relcache.c:5589:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/utils/cache/relcache.c:5595:23: branch_true: ...to here
postgresql-18.3/src/backend/utils/cache/relcache.c:5598:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/cache/relcache.c:5602:21: branch_false: ...to here
postgresql-18.3/src/backend/utils/cache/relcache.c:5602:21: call_function: calling ‘RelationIdGetRelation’ from ‘RelationGetIdentityKeyBitmap’
# 733| GETSTRUCT(const HeapTupleData *tuple)
# 734| {
# 735|-> return ((char *) (tuple->t_data) + tuple->t_data->t_hoff);
# 736| }
# 737|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/access/itup.h:74:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nposting’
postgresql-18.3/src/backend/access/nbtree/nbtxlog.c:1018:1: enter_function: entry to ‘btree_redo’
postgresql-18.3/src/backend/access/nbtree/nbtxlog.c:1036:25: call_function: calling ‘btree_xlog_split’ from ‘btree_redo’
# 72| IndexTupleSize(const IndexTupleData *itup)
# 73| {
# 74|-> return (itup->t_info & INDEX_SIZE_MASK);
# 75| }
# 76|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/access/tableam.h:1022:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-18.3/src/backend/access/heap/heapam_handler.c:685:1: enter_function: entry to ‘heapam_relation_copy_for_cluster’
postgresql-18.3/src/backend/access/heap/heapam_handler.c:729:12: branch_false: following ‘false’ branch (when ‘use_sort == 0’)...
postgresql-18.3/src/backend/access/heap/heapam_handler.c:741:13: branch_false: ...to here
postgresql-18.3/src/backend/access/heap/heapam_handler.c:741:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/heap/heapam_handler.c:743:33: branch_true: ...to here
postgresql-18.3/src/backend/access/heap/heapam_handler.c:802:30: call_function: calling ‘table_scan_getnextslot’ from ‘heapam_relation_copy_for_cluster’
# 1020| table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1021| {
# 1022|-> slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1023|
# 1024| /* We don't expect actual scans using NoMovementScanDirection */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/access/tupmacs.h:28:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/access/brin/brin_tuple.c:553:1: enter_function: entry to ‘brin_deform_tuple’
postgresql-18.3/src/backend/access/brin/brin_tuple.c:565:16: branch_true: following ‘true’ branch (when ‘dMemtuple’ is non-NULL)...
postgresql-18.3/src/backend/access/brin/brin_tuple.c:565:28: branch_true: ...to here
postgresql-18.3/src/backend/access/brin/brin_tuple.c:565:28: call_function: calling ‘brin_memtuple_initialize’ from ‘brin_deform_tuple’
postgresql-18.3/src/backend/access/brin/brin_tuple.c:565:28: return_function: returning to ‘brin_deform_tuple’ from ‘brin_memtuple_initialize’
postgresql-18.3/src/backend/access/brin/brin_tuple.c:568:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/brin/brin_tuple.c:572:14: branch_false: ...to here
postgresql-18.3/src/backend/access/brin/brin_tuple.c:583:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/brin/brin_tuple.c:587:9: branch_false: ...to here
postgresql-18.3/src/backend/access/brin/brin_tuple.c:587:9: call_function: calling ‘brin_deconstruct_tuple’ from ‘brin_deform_tuple’
# 26| att_isnull(int ATT, const bits8 *BITS)
# 27| {
# 28|-> return !(BITS[ATT >> 3] & (1 << (ATT & 0x07)));
# 29| }
# 30|
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13563:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13561| else if (cp >= 0x2C00)
#13562| {
#13563|-> return case_map[cp - 0x2C00 + 2943];
#13564| }
#13565| }
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13570:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13568| if (cp < 0xA7F7)
#13569| {
#13570|-> return case_map[cp - 0xA640 + 3245];
#13571| }
#13572| else if (cp >= 0xAB53)
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13574:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13572| else if (cp >= 0xAB53)
#13573| {
#13574|-> return case_map[cp - 0xAB53 + 3684];
#13575| }
#13576| }
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13587:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13585| if (cp < 0xFB18)
#13586| {
#13587|-> return case_map[cp - 0xFB00 + 3793];
#13588| }
#13589| else if (cp >= 0xFF21)
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13591:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13589| else if (cp >= 0xFF21)
#13590| {
#13591|-> return case_map[cp - 0xFF21 + 3817];
#13592| }
#13593| }
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13598:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13596| if (cp < 0x105BD)
#13597| {
#13598|-> return case_map[cp - 0x10400 + 3875];
#13599| }
#13600| else if (cp >= 0x10C80)
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13602:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13600| else if (cp >= 0x10C80)
#13601| {
#13602|-> return case_map[cp - 0x10C80 + 4320];
#13603| }
#13604| }
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13612:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/common/unicode_case.c:438:1: enter_function: entry to ‘find_case_map’
postgresql-18.3/src/common/unicode_case.c:444:20: call_function: calling ‘case_index’ from ‘find_case_map’
#13610| if (cp < 0x118E0)
#13611| {
#13612|-> return case_map[cp - 0x118A0 + 4582];
#13613| }
#13614| else if (cp >= 0x16E40)
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13616:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/include/common/unicode_case_table.h:13608:28: branch_true: following ‘true’ branch (when ‘cp <= 93823’)...
postgresql-18.3/src/include/common/unicode_case_table.h:13610:36: branch_true: ...to here
postgresql-18.3/src/include/common/unicode_case_table.h:13610:36: branch_false: following ‘false’ branch (when ‘cp > 71903’)...
postgresql-18.3/src/include/common/unicode_case_table.h:13614:41: branch_false: ...to here
postgresql-18.3/src/include/common/unicode_case_table.h:13614:41: branch_true: following ‘true’ branch (when ‘cp > 93759’)...
postgresql-18.3/src/include/common/unicode_case_table.h:13616:57: branch_true: ...to here
postgresql-18.3/src/include/common/unicode_case_table.h:13616:48: danger: read of 2 bytes at offset ‘cp * 2 + 8589756364’ exceeds ‘case_map’
#13614| else if (cp >= 0x16E40)
#13615| {
#13616|-> return case_map[cp - 0x16E40 + 4646];
#13617| }
#13618| }
Error: GCC_ANALYZER_WARNING (CWE-787):
postgresql-18.3/src/include/common/unicode_case_table.h:13623:48: warning[-Wanalyzer-out-of-bounds]: buffer over-read
postgresql-18.3/src/include/common/unicode_case_table.h:13608:28: branch_false: following ‘false’ branch (when ‘cp > 93823’)...
postgresql-18.3/src/include/common/unicode_case_table.h:13619:33: branch_false: ...to here
postgresql-18.3/src/include/common/unicode_case_table.h:13619:33: branch_true: following ‘true’ branch (when ‘cp > 125183’)...
postgresql-18.3/src/include/common/unicode_case_table.h:13621:36: branch_true: ...to here
postgresql-18.3/src/include/common/unicode_case_table.h:13621:36: branch_true: following ‘true’ branch (when ‘cp <= 125251’)...
postgresql-18.3/src/include/common/unicode_case_table.h:13623:57: branch_true: ...to here
postgresql-18.3/src/include/common/unicode_case_table.h:13623:48: danger: read of 2 bytes at offset ‘cp * 2 + 8589693644’ exceeds ‘case_map’
#13621| if (cp < 0x1E944)
#13622| {
#13623|-> return case_map[cp - 0x1E900 + 4710];
#13624| }
#13625| }
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/lib/radixtree.h:1120:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘slot’
postgresql-18.3/src/backend/access/common/tidstore.c:421:1: enter_function: entry to ‘TidStoreIsMember’
postgresql-18.3/src/backend/access/common/tidstore.c:429:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/common/tidstore.c:432:24: branch_false: ...to here
postgresql-18.3/src/backend/access/common/tidstore.c:432:24: call_function: calling ‘local_ts_find’ from ‘TidStoreIsMember’
# 1118| }
# 1119|
# 1120|-> if (RT_CHILDPTR_IS_VALUE(*slot))
# 1121| return (RT_VALUE_TYPE *) slot;
# 1122| else
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elemops’
postgresql-18.3/src/backend/partitioning/partbounds.c:3868:1: enter_function: entry to ‘make_partition_op_expr’
postgresql-18.3/src/backend/partitioning/partbounds.c:3876:19: call_function: calling ‘get_partition_operator’ from ‘make_partition_op_expr’
postgresql-18.3/src/backend/partitioning/partbounds.c:3876:19: return_function: returning to ‘make_partition_op_expr’ from ‘get_partition_operator’
postgresql-18.3/src/backend/partitioning/partbounds.c:3951:50: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:3951:100: call_function: inlined call to ‘list_nth_cell’ from ‘make_partition_op_expr’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘expanded_groups’
postgresql-18.3/src/backend/parser/parse_agg.c:1947:1: enter_function: entry to ‘expand_grouping_sets’
postgresql-18.3/src/backend/parser/parse_agg.c:1954:12: branch_false: following ‘false’ branch (when ‘groupingSets’ is non-NULL)...
postgresql-18.3/src/backend/parser/parse_agg.c:1954:12: branch_false: ...to here
postgresql-18.3/src/backend/parser/parse_agg.c:1957:9: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/parser/parse_agg.c:1980:9: call_function: inlined call to ‘list_nth_cell’ from ‘expand_grouping_sets’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘or_expr_args’
postgresql-18.3/src/backend/partitioning/partbounds.c:4275:1: enter_function: entry to ‘get_qual_for_range’
postgresql-18.3/src/backend/partitioning/partbounds.c:4300:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:4303:39: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4308:29: branch_true: following ‘true’ branch (when ‘k < nparts’)...
postgresql-18.3/src/backend/partitioning/partbounds.c:4310:67: branch_true: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4316:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:4319:33: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4323:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:4326:30: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4326:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/partitioning/partbounds.c:4330:45: branch_false: ...to here
postgresql-18.3/src/backend/partitioning/partbounds.c:4330:45: call_function: calling ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-18.3/src/backend/partitioning/partbounds.c:4330:45: return_function: returning to ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-18.3/src/backend/partitioning/partbounds.c:4336:70: call_function: inlined call to ‘list_length’ from ‘get_qual_for_range’
postgresql-18.3/src/backend/partitioning/partbounds.c:4338:78: call_function: inlined call to ‘list_nth_cell’ from ‘get_qual_for_range’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘resultRelations’
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4632:1: enter_function: entry to ‘ExecInitModifyTable’
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4725:17: call_function: inlined call to ‘list_length’ from ‘ExecInitModifyTable’
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4731:19: call_function: inlined call to ‘newNode’ from ‘ExecInitModifyTable’
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4749:9: release_memory: ‘resultRelations’ is NULL
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4767:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4778:17: branch_false: ...to here
postgresql-18.3/src/backend/executor/nodeModifyTable.c:4780:60: call_function: inlined call to ‘list_nth_cell’ from ‘ExecInitModifyTable’
# 279| Assert(list != NIL);
# 280| Assert(n >= 0 && n < list->length);
# 281|-> return &list->elements[n];
# 282| }
# 283|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/storage/block.h:105:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:648:1: enter_function: entry to ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:657:25: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:659:39: branch_true: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:665:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:690:57: call_function: inlined call to ‘BTreeTupleGetNPosting’ from ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:696:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:709:42: branch_true: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:709:42: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_bottomupdel_finish_pending’
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:709:42: return_function: returning to ‘_bt_bottomupdel_finish_pending’ from ‘BTreeTupleGetHeapTID’
postgresql-18.3/src/backend/access/nbtree/nbtdedup.c:712:48: call_function: inlined call to ‘ItemPointerGetBlockNumber’ from ‘_bt_bottomupdel_finish_pending’
# 103| BlockIdGetBlockNumber(const BlockIdData *blockId)
# 104| {
# 105|-> return (((BlockNumber) blockId->bi_hi) << 16) | ((BlockNumber) blockId->bi_lo);
# 106| }
# 107|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/storage/itemptr.h:116:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4202:1: enter_function: entry to ‘_bt_check_third_page’
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4211:12: branch_false: following ‘false’ branch (when ‘itemsz > 2704’)...
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4219:13: branch_false: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4219:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4226:18: branch_false: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4227:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4231:9: branch_false: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4231:9: branch_true: following ‘true’ branch...
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4231:9: branch_true: ...to here
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4231:9: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_check_third_page’
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4231:9: return_function: returning to ‘_bt_check_third_page’ from ‘BTreeTupleGetHeapTID’
postgresql-18.3/src/backend/access/nbtree/nbtutils.c:4231:9: call_function: inlined call to ‘ItemPointerGetOffsetNumber’ from ‘_bt_check_third_page’
# 114| ItemPointerGetOffsetNumberNoCheck(const ItemPointerData *pointer)
# 115| {
# 116|-> return pointer->ip_posid;
# 117| }
# 118|
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/utils/expandedrecord.h:220:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘newerh’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7577:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7582:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7693:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7695:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7695:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 218| expanded_record_get_tupdesc(ExpandedRecordHeader *erh)
# 219| {
# 220|-> if (likely(erh->er_tupdesc != NULL))
# 221| return erh->er_tupdesc;
# 222| else
Error: CPPCHECK_WARNING (CWE-758):
postgresql-18.3/src/include/utils/memutils.h:222: warning[objectIndex]: The address of variable 'PendingBgWriterStats' might be accessed at non-zero index.
# 220| {
# 221| const unsigned char *p = (const unsigned char *) ptr;
# 222|-> const unsigned char *end = &p[len];
# 223| const unsigned char *aligned_end = (const unsigned char *)
# 224| ((uintptr_t) end & (~(sizeof(size_t) - 1)));
Error: CPPCHECK_WARNING (CWE-758):
postgresql-18.3/src/include/utils/memutils.h:222: warning[objectIndex]: The address of variable 'PendingCheckpointerStats' might be accessed at non-zero index.
# 220| {
# 221| const unsigned char *p = (const unsigned char *) ptr;
# 222|-> const unsigned char *end = &p[len];
# 223| const unsigned char *aligned_end = (const unsigned char *)
# 224| ((uintptr_t) end & (~(sizeof(size_t) - 1)));
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/include/utils/pgstat_internal.h:897:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1754:1: enter_function: entry to ‘pgstat_read_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1776:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1790:14: call_function: inlined call to ‘read_chunk’ from ‘pgstat_read_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1790:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1796:13: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1796:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1796:12: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1910:52: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1915:54: call_function: inlined call to ‘read_chunk’ from ‘pgstat_read_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1915:52: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1921:54: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1928:61: call_function: inlined call to ‘pgstat_get_kind_info’ from ‘pgstat_read_statsfile’
postgresql-18.3/src/backend/utils/activity/pgstat.c:1936:52: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1943:54: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1967:44: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1976:50: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1978:44: branch_false: following ‘false’ branch...
postgresql-18.3/src/backend/utils/activity/pgstat.c:1990:46: branch_false: ...to here
postgresql-18.3/src/backend/utils/activity/pgstat.c:1990:46: call_function: calling ‘pgstat_get_entry_len’ from ‘pgstat_read_statsfile’
# 895| pgstat_get_entry_len(PgStat_Kind kind)
# 896| {
# 897|-> return pgstat_get_kind_info(kind)->shared_data_len;
# 898| }
# 899|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:338:17: warning[-Wanalyzer-malloc-leak]: leak of ‘*((struct json_ctx)*(void *)state).target_field’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:296:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:302:13: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:302:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:304:20: branch_true: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:304:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:321:21: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:321:20: branch_false: following ‘false’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:330:20: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:330:20: branch_false: following ‘false’ branch (when ‘type == 1’)...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:338:38: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:338:38: acquire_memory: allocated here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:338:17: danger: ‘*((struct json_ctx)*(void *)state).target_field’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 336| }
# 337|
# 338|-> *ctx->target_field = strdup(token);
# 339| if (!*ctx->target_field)
# 340| return JSON_OUT_OF_MEMORY;
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1014:28: warning[-Wanalyzer-malloc-leak]: leak of ‘*conn.oauth_token’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1149:1: enter_function: entry to ‘oauth_exchange’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1166:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1169:29: branch_true: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1169:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1176:34: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1176:33: branch_true: following ‘true’ branch...
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1183:38: branch_true: ...to here
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1183:38: call_function: calling ‘setup_token_request’ from ‘oauth_exchange’
# 1012| */
# 1013| conn->oauth_token = strdup(request.token);
# 1014|-> if (!conn->oauth_token)
# 1015| {
# 1016| libpq_append_conn_error(conn, "out of memory");
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1111:20: warning[-Wanalyzer-malloc-leak]: leak of ‘*conn.oauth_issuer_id’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1149:1: enter_function: entry to ‘oauth_exchange’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1166:30: call_function: calling ‘setup_oauth_parameters’ from ‘oauth_exchange’
# 1109| conn->oauth_issuer_id = issuer_from_well_known_uri(conn,
# 1110| conn->oauth_issuer);
# 1111|-> if (!conn->oauth_issuer_id)
# 1112| return false; /* error message already set */
# 1113|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1115:20: warning[-Wanalyzer-malloc-leak]: leak of ‘*conn.oauth_discovery_uri’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1149:1: enter_function: entry to ‘oauth_exchange’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1166:30: call_function: calling ‘setup_oauth_parameters’ from ‘oauth_exchange’
# 1113|
# 1114| conn->oauth_discovery_uri = strdup(conn->oauth_issuer);
# 1115|-> if (!conn->oauth_discovery_uri)
# 1116| {
# 1117| libpq_append_conn_error(conn, "out of memory");
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1128:20: warning[-Wanalyzer-malloc-leak]: leak of ‘*conn.oauth_issuer_id’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1149:1: enter_function: entry to ‘oauth_exchange’
postgresql-18.3/src/interfaces/libpq/fe-auth-oauth.c:1166:30: call_function: calling ‘setup_oauth_parameters’ from ‘oauth_exchange’
# 1126| */
# 1127| conn->oauth_issuer_id = strdup(conn->oauth_issuer);
# 1128|-> if (!conn->oauth_issuer_id)
# 1129| {
# 1130| libpq_append_conn_error(conn, "out of memory");
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7355:18: warning[-Wanalyzer-malloc-leak]: leak of ‘value_copy’
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7333:1: enter_function: entry to ‘conninfo_storeval’
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7355:18: call_function: calling ‘conninfo_find’ from ‘conninfo_storeval’
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7355:18: return_function: returning to ‘conninfo_storeval’ from ‘conninfo_find’
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7356:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7365:12: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7365:12: branch_false: following ‘false’ branch (when ‘uri_decode == 0’)...
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7374:30: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7374:30: acquire_memory: allocated here
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7375:20: branch_false: following ‘false’ branch (when ‘value_copy’ is non-NULL)...
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7382:14: branch_false: ...to here
postgresql-18.3/src/interfaces/libpq/fe-connect.c:7355:18: danger: ‘value_copy’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 7353| }
# 7354|
# 7355|-> option = conninfo_find(connOptions, keyword);
# 7356| if (option == NULL)
# 7357| {
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/interfaces/libpq/fe-exec.c:742:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/interfaces/libpq/fe-exec.c:2360:1: enter_function: entry to ‘PQexecStart’
postgresql-18.3/src/interfaces/libpq/fe-exec.c:2385:26: call_function: calling ‘PQgetResult’ from ‘PQexecStart’
# 740| {
# 741| /* only send DESTROY to successfully-initialized event procs */
# 742|-> if (res->events[i].resultInitialized)
# 743| {
# 744| PGEventResultDestroy evt;
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/interfaces/libpq/fe-secure-openssl.c: scope_hint: In function ‘pgtls_verify_peer_name_matches_certificate_guts’
postgresql-18.3/src/interfaces/libpq/fe-secure-openssl.c:655:30: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 655 | subject_name = X509_get_subject_name(conn->peer);
# | ^
# 653| X509_NAME *subject_name;
# 654|
# 655|-> subject_name = X509_get_subject_name(conn->peer);
# 656| if (subject_name != NULL)
# 657| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/interfaces/libpq/fe-secure-openssl.c:655:30: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 653| X509_NAME *subject_name;
# 654|
# 655|-> subject_name = X509_get_subject_name(conn->peer);
# 656| if (subject_name != NULL)
# 657| {
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/interfaces/libpq/fe-secure-openssl.c:668:140: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘openssl_verify_peer_name_matches_certificate_name’ discards ‘const’ qualifier from pointer target type
# 668 | X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
postgresql-18.3/src/interfaces/libpq/fe-secure-openssl.c:470:78: note: expected ‘ASN1_STRING *’ {aka ‘struct asn1_string_st *’} but argument is of type ‘const ASN1_STRING *’ {aka ‘const struct asn1_string_st *’}
# 470 | openssl_verify_peer_name_matches_certificate_name(PGconn *conn, ASN1_STRING *name_entry,
# | ~~~~~~~~~~~~~^~~~~~~~~~
# 666| (*names_examined)++;
# 667| rc = openssl_verify_peer_name_matches_certificate_name(conn,
# 668|-> X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# 669| &common_name);
# 670|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/interfaces/libpq/fe-secure-openssl.c:668:140: warning[-Wdiscarded-qualifiers]: passing argument 2 of ‘openssl_verify_peer_name_matches_certificate_name’ discards ‘const’ qualifier from pointer target type
# 666| (*names_examined)++;
# 667| rc = openssl_verify_peer_name_matches_certificate_name(conn,
# 668|-> X509_NAME_ENTRY_get_data(X509_NAME_get_entry(subject_name, cn_index)),
# 669| &common_name);
# 670|
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/interfaces/libpq/fe-secure.c:416:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘spinfo.sigpipe_pending’
postgresql-18.3/src/interfaces/libpq/fe-secure.c:416:9: branch_false: following ‘false’ branch...
postgresql-18.3/src/interfaces/libpq/fe-secure.c:416:9: danger: use of uninitialized value ‘spinfo.sigpipe_pending’ here
# 414| }
# 415|
# 416|-> RESTORE_SIGPIPE(conn, spinfo);
# 417|
# 418| /* ensure we return the intended errno to caller */
Error: GCC_ANALYZER_WARNING (CWE-688):
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1206:45: warning[-Wanalyzer-null-argument]: use of NULL ‘colname’ where non-null expected
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1083:1: enter_function: entry to ‘resolve_column_ref’
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1114:17: call_function: inlined call to ‘list_length’ from ‘resolve_column_ref’
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1180:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1183:17: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1190:28: branch_false: following ‘false’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1192:28: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1192:28: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1195:68: branch_true: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1200:40: branch_true: following ‘true’ branch (when ‘i >= 0’)...
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1202:100: branch_true: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_comp.c:1206:45: danger: argument 2 (‘colname’) NULL where non-null expected
# 1204| Assert(fld->dtype == PLPGSQL_DTYPE_RECFIELD &&
# 1205| fld->recparentno == nse->itemno);
# 1206|-> if (strcmp(fld->fieldname, colname) == 0)
# 1207| {
# 1208| return make_datum_param(expr, i, cref->location);
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:5109:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7577:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7582:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7693:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7695:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7695:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 5107| {
# 5108| if (var->datatype->typisarray &&
# 5109|-> !VARATT_IS_EXTERNAL_EXPANDED_RW(DatumGetPointer(newvalue)))
# 5110| {
# 5111| /* array and not already R/W, so apply expand_array */
Error: GCC_ANALYZER_WARNING (CWE-476):
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:8787:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7577:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7582:12: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7693:20: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7695:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-18.3/src/pl/plpgsql/src/pl_exec.c:7695:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 8785| */
# 8786| if (!estate->atomic && !isnull && var->datatype->typlen == -1 &&
# 8787|-> VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
# 8788| {
# 8789| MemoryContext oldcxt;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1885:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1840:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1846:34: branch_true: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1872:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1874:7: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1883:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1883:12: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1885:9: danger: use of uninitialized value ‘yyss’ here
# 1883| if (! yyptr)
# 1884| YYNOMEM;
# 1885|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1886| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1887| YYSTACK_RELOCATE (yyls_alloc, yyls);
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:2016:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1840:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1909:6: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1909:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1912:3: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1924:6: branch_true: following ‘true’ branch (when ‘yyn == -249’)...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1925:5: branch_true: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1996:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:1998:3: branch_false: ...to here
postgresql-18.3/src/pl/plpgsql/src/pl_gram.c:2016:3: danger: use of uninitialized value ‘*<unknown>’ here
# 2014| unconditionally makes the parser a bit smaller, and it avoids a
# 2015| GCC warning that YYVAL may be used uninitialized. */
# 2016|-> yyval = yyvsp[1-yylen];
# 2017|
# 2018| /* Default location. */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/pl/plpython/plpy_exec.c:282: warning[uninitvar]: Uninitialized variable: plerrcontext.previous
# 280| PG_END_TRY();
# 281|
# 282|-> error_context_stack = plerrcontext.previous;
# 283|
# 284| /* Pop old arguments from the stack if they were pushed above */
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/pl/plpython/plpy_exec.c:305: warning[uninitvar]: Uninitialized variable: rv
# 303|
# 304| /* Plain function, just return the Datum value (possibly null) */
# 305|-> return rv;
# 306| }
# 307|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/pl/plpython/plpy_exec.c:1046: warning[uninitvar]: Uninitialized variables: rtup.t_len, rtup.t_self, rtup.t_tableOid, rtup.t_data
# 1044| error_context_stack = plerrcontext.previous;
# 1045|
# 1046|-> return rtup;
# 1047| }
# 1048|
Error: CPPCHECK_WARNING (CWE-457):
postgresql-18.3/src/pl/plpython/plpy_main.c:261: warning[uninitvar]: Uninitialized variable: retval
# 259| PLy_pop_execution_context();
# 260|
# 261|-> return retval;
# 262| }
# 263|
Error: CPPCHECK_WARNING (CWE-758):
postgresql-18.3/src/port/pg_crc32c_sse42_choose.c:100: error[shiftTooManyBitsSigned]: Shifting signed 32-bit value by 31 bits is undefined behaviour
# 98| #ifdef USE_AVX512_CRC32C_WITH_RUNTIME_CHECK
# 99| if (exx[2] & (1 << 10) && /* VPCLMULQDQ */
# 100|-> exx[1] & (1 << 31)) /* AVX512-VL */
# 101| pg_comp_crc32c = pg_comp_crc32c_avx512;
# 102| #endif
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/port/snprintf.c:1439:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘str’
postgresql-18.3/src/port/snprintf.c:1318:1: enter_function: entry to ‘pg_strfromd’
postgresql-18.3/src/port/snprintf.c:1348:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/port/snprintf.c:1357:20: branch_false: ...to here
postgresql-18.3/src/port/snprintf.c:1365:21: branch_false: following ‘false’ branch...
postgresql-18.3/src/port/snprintf.c:1367:25: branch_false: ...to here
postgresql-18.3/src/port/snprintf.c:1400:9: call_function: calling ‘dostr’ from ‘pg_strfromd’
# 1437| }
# 1438| avail = Min(avail, slen);
# 1439|-> memmove(target->bufptr, str, avail);
# 1440| target->bufptr += avail;
# 1441| str += avail;
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/test/isolation/specparse.c:1006:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-18.3/src/test/isolation/specparse.c:964:6: branch_true: following ‘true’ branch...
postgresql-18.3/src/test/isolation/specparse.c:970:28: branch_true: ...to here
postgresql-18.3/src/test/isolation/specparse.c:993:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-18.3/src/test/isolation/specparse.c:995:7: branch_false: ...to here
postgresql-18.3/src/test/isolation/specparse.c:1004:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-18.3/src/test/isolation/specparse.c:1006:9: branch_false: ...to here
postgresql-18.3/src/test/isolation/specparse.c:1006:9: danger: use of uninitialized value ‘yyss’ here
# 1004| if (! yyptr)
# 1005| YYNOMEM;
# 1006|-> YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1007| YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1008| # undef YYSTACK_RELOCATE
Error: GCC_ANALYZER_WARNING (CWE-457):
postgresql-18.3/src/test/isolation/specparse.c:1133:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-18.3/src/test/isolation/specparse.c:964:6: branch_false: following ‘false’ branch...
postgresql-18.3/src/test/isolation/specparse.c:1028:6: branch_false: ...to here
postgresql-18.3/src/test/isolation/specparse.c:1028:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-18.3/src/test/isolation/specparse.c:1031:3: branch_false: ...to here
postgresql-18.3/src/test/isolation/specparse.c:1043:6: branch_true: following ‘true’ branch (when ‘yyn == -14’)...
postgresql-18.3/src/test/isolation/specparse.c:1044:5: branch_true: ...to here
postgresql-18.3/src/test/isolation/specparse.c:1113:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-18.3/src/test/isolation/specparse.c:1115:3: branch_false: ...to here
postgresql-18.3/src/test/isolation/specparse.c:1133:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1131| unconditionally makes the parser a bit smaller, and it avoids a
# 1132| GCC warning that YYVAL may be used uninitialized. */
# 1133|-> yyval = yyvsp[1-yylen];
# 1134|
# 1135|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/test/isolation/specscanner.c:1727:54: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-18.3/src/test/isolation/specscanner.c:1714:21: enter_function: entry to ‘spec_yy_create_buffer’
postgresql-18.3/src/test/isolation/specscanner.c:1718:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_create_buffer’
postgresql-18.3/src/test/isolation/specscanner.c:1719:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/test/isolation/specscanner.c:1722:2: branch_false: ...to here
postgresql-18.3/src/test/isolation/specscanner.c:1727:54: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
# 1725| /* yy_ch_buf has to be 2 characters longer than the size given because
# 1726| * we need to put in 2 end-of-buffer characters.
# 1727|-> */
# 1728| b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) );
# 1729| if ( ! b->yy_ch_buf )
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/test/isolation/specscanner.c:1768: warning[nullPointer]: Possible null pointer dereference: b
# 1766|
# 1767| yy_flush_buffer( b );
# 1768|->
# 1769| b->yy_input_file = file;
# 1770| b->yy_fill_buffer = 1;
Error: CPPCHECK_WARNING (CWE-476):
postgresql-18.3/src/test/isolation/specscanner.c:1769: warning[nullPointer]: Possible null pointer dereference: b
# 1767| yy_flush_buffer( b );
# 1768|
# 1769|-> b->yy_input_file = file;
# 1770| b->yy_fill_buffer = 1;
# 1771|
Error: GCC_ANALYZER_WARNING (CWE-401):
postgresql-18.3/src/test/isolation/specscanner.c:1982:26: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-18.3/src/test/isolation/specscanner.c:1966:17: enter_function: entry to ‘spec_yy_scan_bytes’
postgresql-18.3/src/test/isolation/specscanner.c:1975:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_scan_bytes’
postgresql-18.3/src/test/isolation/specscanner.c:1976:12: branch_false: following ‘false’ branch...
postgresql-18.3/src/test/isolation/specscanner.c:1976:12: branch_false: ...to here
postgresql-18.3/src/test/isolation/specscanner.c:1984:6: call_function: calling ‘spec_yy_scan_buffer’ from ‘spec_yy_scan_bytes’
# 1980| for ( i = 0; i < _yybytes_len; ++i )
# 1981| buf[i] = yybytes[i];
# 1982|->
# 1983| buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1984|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/test/regress/pg_regress.c: scope_hint: In function ‘get_expectfile’
postgresql-18.3/src/test/regress/pg_regress.c:703:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 703 | if (!file || !(file_type = strrchr(file, '.')))
# | ^
# 701| * following the last dot in the file name.
# 702| */
# 703|-> if (!file || !(file_type = strrchr(file, '.')))
# 704| return NULL;
# 705|
Error: COMPILER_WARNING (CWE-704):
postgresql-18.3/src/test/regress/pg_regress.c:703:34: warning[-Wdiscarded-qualifiers]: assignment discards ‘const’ qualifier from pointer target type
# 701| * following the last dot in the file name.
# 702| */
# 703|-> if (!file || !(file_type = strrchr(file, '.')))
# 704| return NULL;
# 705|
Error: CPPCHECK_WARNING (CWE-190):
postgresql-18.3/src/test/regress/regress.c:553: error[integerOverflow]: Signed integer overflow for expression '-32768-1'.
# 551| expected = PG_INT16_MIN;
# 552| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 553|-> expected = PG_INT16_MIN - 1;
# 554| EXPECT_TRUE(!pg_atomic_compare_exchange_u32(&var, &expected, 1));
# 555|