postgresql16-16.8-1.fc43

List of Findings

Error: SHELLCHECK_WARNING (CWE-457): [#def1]
/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): [#def2]
/usr/bin/postgresql-setup:223:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  221|   
#  222|       # must see previous version in PG_VERSION
#  223|->     local old_data_version="`cat "$upgradefrom_data/PG_VERSION"`"
#  224|       if [ ! -f "$upgradefrom_data/PG_VERSION" -o \
#  225|            x"$old_data_version" != x"$upgradefrom_major" ]

Error: SHELLCHECK_WARNING (CWE-477): [#def3]
/usr/bin/postgresql-setup:224:46: warning[SC2166]: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined.
#  222|       # must see previous version in PG_VERSION
#  223|       local old_data_version="`cat "$upgradefrom_data/PG_VERSION"`"
#  224|->     if [ ! -f "$upgradefrom_data/PG_VERSION" -o \
#  225|            x"$old_data_version" != x"$upgradefrom_major" ]
#  226|       then

Error: SHELLCHECK_WARNING (CWE-457): [#def4]
/usr/bin/postgresql-setup:225:36: warning[SC2154]: upgradefrom_major is referenced but not assigned.
#  223|       local old_data_version="`cat "$upgradefrom_data/PG_VERSION"`"
#  224|       if [ ! -f "$upgradefrom_data/PG_VERSION" -o \
#  225|->          x"$old_data_version" != x"$upgradefrom_major" ]
#  226|       then
#  227|           error $"Cannot upgrade because the database in $upgradefrom_data is of"

Error: SHELLCHECK_WARNING (CWE-457): [#def5]
/usr/bin/postgresql-setup:231:16: warning[SC2154]: upgradefrom_engine is referenced but not assigned.
#  229|           exit 1
#  230|       fi
#  231|->     if [ ! -x "$upgradefrom_engine/postgres" ]; then
#  232|           error $"Please install the $upgradefrom_package package."
#  233|           exit 5

Error: SHELLCHECK_WARNING (CWE-457): [#def6]
/usr/bin/postgresql-setup:232:36: warning[SC2154]: upgradefrom_package is referenced but not assigned.
#  230|       fi
#  231|       if [ ! -x "$upgradefrom_engine/postgres" ]; then
#  232|->         error $"Please install the $upgradefrom_package package."
#  233|           exit 5
#  234|       fi

Error: SHELLCHECK_WARNING (CWE-457): [#def7]
/usr/bin/postgresql-setup:278:14: warning[SC2154]: upgradefrom_scls is referenced but not assigned.
#  276|   
#  277|       scls_upgrade_hacks=
#  278|->     test -n "$upgradefrom_scls" && {
#  279|           debug "scls [$upgradefrom_scls] will be enabled"
#  280|           scls_upgrade_hacks="source scl_source enable $upgradefrom_scls"

Error: SHELLCHECK_WARNING (CWE-457): [#def8]
/usr/bin/postgresql-setup:283:12: warning[SC2154]: upgradefrom_redhat_sockets_hack is referenced but not assigned.
#  281|       }
#  282|   
#  283|->     test x"$upgradefrom_redhat_sockets_hack" = xyes && {
#  284|           debug "upgrading from redhat server"
#  285|           socket_hacks="export REDHAT_PGUPGRADE_FROM_RHEL=yes"

Error: SHELLCHECK_WARNING (CWE-457): [#def9]
/usr/bin/postgresql-setup:288:14: warning[SC2154]: upgradefrom_pghost_override is referenced but not assigned.
#  286|       }
#  287|   
#  288|->     test -n "$upgradefrom_pghost_override" && {
#  289|           pghost_override="export PGHOST='$upgradefrom_pghost_override'"
#  290|       }

Error: SHELLCHECK_WARNING (CWE-252): [#def10]
/usr/bin/postgresql-setup:307:9: warning[SC2164]: Use 'cd ... || exit' or 'cd ... || return' in case cd fails.
#  305|           # After creating the empty new-format database, do the upgrade
#  306|           (
#  307|->         cd # pg_upgrade writes to $PWD
#  308|           eval "
#  309|               $scls_upgrade_hacks

Error: SHELLCHECK_WARNING (CWE-457): [#def11]
/usr/bin/postgresql-setup:324:14: warning[SC2154]: add_options is referenced but not assigned.
#  322|               --new-port="$PGPORT" \
#  323|               --username=postgres \
#  324|->             "${add_options[@]}" \
#  325|               >>"$upgrade_log" 2>>"$upgrade_log"
#  326|           )

Error: SHELLCHECK_WARNING (CWE-571): [#def12]
/usr/bin/postgresql-setup:366:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  364|       test 0 = 1 && return 0
#  365|   
#  366|->     local nr_out="`systemctl show -p $nr_option $option_service.service 2>/dev/null`"
#  367|       if [[ "$nr_out" != "$nr_option=no" ]]; then
#  368|           error   $"Note that systemd configuration for '$option_service' changed."

Error: SHELLCHECK_WARNING (CWE-571): [#def13]
/usr/bin/postgresql-setup:380:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  378|       local service="$1"
#  379|   
#  380|->     local systemd_env="$(systemctl show -p Environment "${service}.service")" \
#  381|           || { return; }
#  382|   

Error: SHELLCHECK_WARNING (CWE-571): [#def14]
/usr/bin/postgresql-setup:427:11: warning[SC2155]: Declare and assign separately to avoid masking return values.
#  425|       local service="$2"
#  426|   
#  427|->     local envfiles="$(systemctl show -p EnvironmentFiles "${service}.service")"\
#  428|           || return
#  429|   

Error: SHELLCHECK_WARNING (CWE-563): [#def15]
/usr/bin/postgresql-setup:470:11: warning[SC2034]: port appears unused. Verify use (or export if used externally).
#  468|   {
#  469|       local data=
#  470|->     local port=
#  471|       local unit_pgport=
#  472|       local unit_pgdata=

Error: SHELLCHECK_WARNING (CWE-563): [#def16]
/usr/bin/postgresql-setup:630:13: warning[SC2034]: option_debug appears unused. Verify use (or export if used externally).
#  628|   
#  629|           --debug)
#  630|->             option_debug=1
#  631|               shift
#  632|               ;;

Error: SHELLCHECK_WARNING (CWE-457): [#def17]
/usr/bin/postgresql-setup:705:23: warning[SC2154]: upgradefrom_data_default is referenced but not assigned.
#  703|   
#  704|   if test upgrade = "$option_mode"; then
#  705|->     upgradefrom_data="$upgradefrom_data_default"
#  706|   
#  707|       if test -z "$option_upgradefrom_unit"; then

Error: SHELLCHECK_WARNING (CWE-457): [#def18]
/usr/bin/postgresql-setup:716:37: warning[SC2154]: upgradefrom_id is referenced but not assigned.
#  714|               # a different one, e.g. from postgresql92 to postgresql93, or from
#  715|               # postgresql (system version) to postgresql94 (scl).
#  716|->             option_upgradefrom_unit=$upgradefrom_id
#  717|   
#  718|               # Try to predict situations: postgresql93@second -> postgresql94@second

Error: SHELLCHECK_WARNING (CWE-398): [#def19]
/usr/bin/postgresql-setup:744:13: warning[SC2247]: Flip leading $ and " if this should be a quoted substitution.
#  742|       error_q $"In order to use this script, please remove data_directory entry from"
#  743|       error_q $"configuration file and make sure that the default location"
#  744|->     error_q $"(PGDATA) in .service file is valid."
#  745|       exit 1
#  746|   fi

Error: SHELLCHECK_WARNING (CWE-457): [#def20]
/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): [#def21]
/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): [#def22]
/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): [#def23]
/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): [#def24]
/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: [#def25]
/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: [#def26]
/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): [#def27]
/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): [#def28]
/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): [#def29]
/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): [#def30]
/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): [#def31]
/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): [#def32]
/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: [#def33]
/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): [#def34]
/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): [#def35]
/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): [#def36]
/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): [#def37]
/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): [#def38]
/usr/lib64/pgsql/postgresql-15/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: [#def39]
/usr/lib64/pgsql/postgresql-15/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: [#def40]
/usr/lib64/pgsql/postgresql-15/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): [#def41]
/usr/lib64/pgsql/postgresql-15/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): [#def42]
/usr/lib64/pgsql/postgresql-15/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): [#def43]
/usr/lib64/pgsql/postgresql-15/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): [#def44]
/usr/lib64/pgsql/postgresql-15/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): [#def45]
/usr/lib64/pgsql/postgresql-15/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): [#def46]
/usr/lib64/pgsql/postgresql-15/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: [#def47]
/usr/lib64/pgsql/postgresql-15/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): [#def48]
/usr/lib64/pgsql/postgresql-15/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): [#def49]
/usr/lib64/pgsql/postgresql-15/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): [#def50]
/usr/lib64/pgsql/postgresql-15/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): [#def51]
/usr/lib64/pgsql/postgresql-15/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): [#def52]
/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): [#def53]
/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): [#def54]
/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): [#def55]
/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): [#def56]
/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): [#def57]
/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): [#def58]
/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): [#def59]
/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): [#def60]
/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): [#def61]
/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): [#def62]
/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): [#def63]
/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: [#def64]
/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: [#def65]
/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): [#def66]
postgresql-16.8/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): [#def67]
postgresql-16.8/contrib/cube/cubeparse.c:979:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/contrib/cube/cubeparse.c:937:6: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/cube/cubeparse.c:943:28: branch_true: ...to here
postgresql-16.8/contrib/cube/cubeparse.c:966:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/contrib/cube/cubeparse.c:968:7: branch_false: ...to here
postgresql-16.8/contrib/cube/cubeparse.c:977:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/cube/cubeparse.c:979:9: branch_false: ...to here
postgresql-16.8/contrib/cube/cubeparse.c:979:9: danger: use of uninitialized value ‘yyss’ here
#  977|           if (! yyptr)
#  978|             goto yyexhaustedlab;
#  979|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#  980|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  981|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def68]
postgresql-16.8/contrib/cube/cubescan.c:1299:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/contrib/cube/cubescan.c:1232:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/contrib/cube/cubescan.c:1239:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/cube/cubescan.c:1243:14: branch_false: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1243:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/cube/cubescan.c:1265:33: branch_false: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1270:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/cube/cubescan.c:1279:25: branch_false: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1281:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/contrib/cube/cubescan.c:1285:41: branch_true: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1301:41: call_function: inlined call to ‘cube_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/contrib/cube/cubescan.c:1308:28: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/cube/cubescan.c:1312:40: branch_false: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1281:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/contrib/cube/cubescan.c:1285:41: branch_true: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1290:28: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/cube/cubescan.c:1292:48: branch_true: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1301:41: call_function: inlined call to ‘cube_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/contrib/cube/cubescan.c:1299:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1297|   					b->yy_buf_size *= 2;
# 1298|   
# 1299|-> 				b->yy_ch_buf = (char *)
# 1300|   					/* Include room in for 2 EOB chars. */
# 1301|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def69]
postgresql-16.8/contrib/cube/cubescan.c:1584:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/contrib/cube/cubescan.c:1570:21: enter_function: entry to ‘cube_yy_create_buffer’
postgresql-16.8/contrib/cube/cubescan.c:1574:31: call_function: inlined call to ‘cube_yyalloc’ from ‘cube_yy_create_buffer’
postgresql-16.8/contrib/cube/cubescan.c:1575:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/cube/cubescan.c:1578:9: branch_false: ...to here
postgresql-16.8/contrib/cube/cubescan.c:1584:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 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()" );
# 1586|   

Error: CPPCHECK_WARNING (CWE-476): [#def70]
postgresql-16.8/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): [#def71]
postgresql-16.8/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): [#def72]
postgresql-16.8/contrib/cube/cubescan.c:1838:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/contrib/cube/cubescan.c:1822:17: enter_function: entry to ‘cube_yy_scan_bytes’
postgresql-16.8/contrib/cube/cubescan.c:1831:24: call_function: inlined call to ‘cube_yyalloc’ from ‘cube_yy_scan_bytes’
postgresql-16.8/contrib/cube/cubescan.c:1832:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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): [#def73]
postgresql-16.8/contrib/dblink/dblink.c:673: error[legacyUninitvar]: Uninitialized variable: conn
#  671|   
#  672|   	/* async query send */
#  673|-> 	retval = PQsendQuery(conn, sql);
#  674|   	if (retval != 1)
#  675|   		elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));

Error: CPPCHECK_WARNING (CWE-457): [#def74]
postgresql-16.8/contrib/dblink/dblink.c:673: error[legacyUninitvar]: Uninitialized variable: sql
#  671|   
#  672|   	/* async query send */
#  673|-> 	retval = PQsendQuery(conn, sql);
#  674|   	if (retval != 1)
#  675|   		elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));

Error: CPPCHECK_WARNING (CWE-768): [#def75]
postgresql-16.8/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: GCC_ANALYZER_WARNING (CWE-476): [#def76]
postgresql-16.8/contrib/hstore/hstore_op.c:341:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/contrib/hstore/hstore_op.c:292:1: enter_function: entry to ‘hstore_delete_array’
postgresql-16.8/contrib/hstore/hstore_op.c:307:33: call_function: calling ‘hstoreArrayToPairs’ from ‘hstore_delete_array’
postgresql-16.8/contrib/hstore/hstore_op.c:307:33: return_function: returning to ‘hstore_delete_array’ from ‘hstoreArrayToPairs’
postgresql-16.8/contrib/hstore/hstore_op.c:317:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/contrib/hstore/hstore_op.c:331:25: branch_true: following ‘true’ branch (when ‘i < hs_count’)...
postgresql-16.8/contrib/hstore/hstore_op.c:335:21: branch_true: ...to here
postgresql-16.8/contrib/hstore/hstore_op.c:335:20: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/hstore/hstore_op.c:339:59: branch_false: ...to here
postgresql-16.8/contrib/hstore/hstore_op.c:341:49: release_memory: ‘0’ is NULL
postgresql-16.8/contrib/hstore/hstore_op.c:341:49: release_memory: ‘0’ is NULL
postgresql-16.8/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): [#def77]
postgresql-16.8/contrib/hstore_plpython/hstore_plpython.c:189: warning[uninitvar]: Uninitialized variables: out.vl_len_, out.size_
#  187|   	PG_END_TRY();
#  188|   
#  189|-> 	PG_RETURN_POINTER(out);
#  190|   }

Error: CPPCHECK_WARNING (CWE-476): [#def78]
postgresql-16.8/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): [#def79]
postgresql-16.8/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-476): [#def80]
postgresql-16.8/contrib/ltree/ltree_io.c:346:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/contrib/ltree/ltree_io.c:800:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/contrib/ltree/ltree_io.c:808:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/contrib/ltree/ltree_io.c:811:34: branch_false: ...to here
postgresql-16.8/contrib/ltree/ltree_io.c:812:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  344|   				{
#  345|   					lptr++;
#  346|-> 					lptr->start = ptr;
#  347|   					state = LQPRS_WAITDELIM;
#  348|   					curqlevel->numvar++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def81]
postgresql-16.8/contrib/ltree/ltree_io.c:356:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/contrib/ltree/ltree_io.c:800:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/contrib/ltree/ltree_io.c:808:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/contrib/ltree/ltree_io.c:811:34: branch_false: ...to here
postgresql-16.8/contrib/ltree/ltree_io.c:812:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  354|   				if (t_iseq(ptr, '@'))
#  355|   				{
#  356|-> 					lptr->flag |= LVAR_INCASE;
#  357|   					curqlevel->flag |= LVAR_INCASE;
#  358|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def82]
postgresql-16.8/contrib/ltree/ltree_io.c:361:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/contrib/ltree/ltree_io.c:800:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/contrib/ltree/ltree_io.c:808:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/contrib/ltree/ltree_io.c:811:34: branch_false: ...to here
postgresql-16.8/contrib/ltree/ltree_io.c:812:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  359|   				else if (t_iseq(ptr, '*'))
#  360|   				{
#  361|-> 					lptr->flag |= LVAR_ANYEND;
#  362|   					curqlevel->flag |= LVAR_ANYEND;
#  363|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def83]
postgresql-16.8/contrib/ltree/ltree_io.c:366:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/contrib/ltree/ltree_io.c:800:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/contrib/ltree/ltree_io.c:808:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/contrib/ltree/ltree_io.c:811:34: branch_false: ...to here
postgresql-16.8/contrib/ltree/ltree_io.c:812:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  364|   				else if (t_iseq(ptr, '%'))
#  365|   				{
#  366|-> 					lptr->flag |= LVAR_SUBLEXEME;
#  367|   					curqlevel->flag |= LVAR_SUBLEXEME;
#  368|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def84]
postgresql-16.8/contrib/ltree/ltree_io.c:392:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/contrib/ltree/ltree_io.c:800:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/contrib/ltree/ltree_io.c:808:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/contrib/ltree/ltree_io.c:811:34: branch_false: ...to here
postgresql-16.8/contrib/ltree/ltree_io.c:812:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  390|   				{
#  391|   					/* disallow more chars after a flag */
#  392|-> 					if (lptr->flag)
#  393|   						UNCHAR;
#  394|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def85]
postgresql-16.8/contrib/ltree/ltree_io.c:595:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/contrib/ltree/ltree_io.c:800:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/contrib/ltree/ltree_io.c:808:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/contrib/ltree/ltree_io.c:811:34: branch_false: ...to here
postgresql-16.8/contrib/ltree/ltree_io.c:812:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  593|   		 * position.
#  594|   		 */
#  595|-> 		while (ptr > lptr->start && strchr("@*%", ptr[-1]) != NULL)
#  596|   		{
#  597|   			ptr--;

Error: CPPCHECK_WARNING (CWE-476): [#def86]
postgresql-16.8/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): [#def87]
postgresql-16.8/contrib/pg_trgm/trgm_regexp.c:1999:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/contrib/pg_trgm/trgm_regexp.c:1969:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
postgresql-16.8/contrib/pg_trgm/trgm_regexp.c:1977:17: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/pg_trgm/trgm_regexp.c:1985:28: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/pg_trgm/trgm_regexp.c:1991:99: branch_true: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-457): [#def88]
postgresql-16.8/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): [#def89]
postgresql-16.8/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): [#def90]
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:137:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[1]’
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:314:1: enter_function: entry to ‘pgstat_heap’
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:344:16: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:346:17: branch_true: ...to here
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:372:24: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:344:16: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:346:17: branch_true: ...to here
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:351:20: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:353:25: branch_true: ...to here
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:372:24: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:385:16: branch_false: following ‘false’ branch (when ‘block >= nblocks’)...
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:397:9: call_function: inlined call to ‘table_endscan’ from ‘pgstat_heap’
postgresql-16.8/contrib/pgstattuple/pgstattuple.c:402:16: call_function: calling ‘build_pgstattuple_type’ from ‘pgstat_heap’
#  135|   	i = 0;
#  136|   	snprintf(values[i++], NCHARS, INT64_FORMAT, stat->table_len);
#  137|-> 	snprintf(values[i++], NCHARS, INT64_FORMAT, stat->tuple_count);
#  138|   	snprintf(values[i++], NCHARS, INT64_FORMAT, stat->tuple_len);
#  139|   	snprintf(values[i++], NCHARS, "%.2f", tuple_percent);

Error: CPPCHECK_WARNING (CWE-768): [#def91]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:1408: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(retrieved_attrs)}' depends on order of evaluation of side effects
# 1406|   	 * Items in the list must match order in enum FdwScanPrivateIndex.
# 1407|   	 */
# 1408|-> 	fdw_private = list_make3(makeString(sql.data),
# 1409|   							 retrieved_attrs,
# 1410|   							 makeInteger(fpinfo->fetch_size));

Error: CPPCHECK_WARNING (CWE-768): [#def92]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:1408: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(retrieved_attrs)},(union ListCell){.ptr_value=(makeInteger(fpinfo->fetch_size))}' depends on order of evaluation of side effects
# 1406|   	 * Items in the list must match order in enum FdwScanPrivateIndex.
# 1407|   	 */
# 1408|-> 	fdw_private = list_make3(makeString(sql.data),
# 1409|   							 retrieved_attrs,
# 1410|   							 makeInteger(fpinfo->fetch_size));

Error: CPPCHECK_WARNING (CWE-768): [#def93]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:1896: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)}' depends on order of evaluation of side effects
# 1894|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1895|   	 */
# 1896|-> 	return list_make5(makeString(sql.data),
# 1897|   					  targetAttrs,
# 1898|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def94]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:1896: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)},(union ListCell){.ptr_value=(makeInteger(values_end_len))}' depends on order of evaluation of side effects
# 1894|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1895|   	 */
# 1896|-> 	return list_make5(makeString(sql.data),
# 1897|   					  targetAttrs,
# 1898|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def95]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:1896: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)},(union ListCell){.ptr_value=(makeInteger(values_end_len))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))}' depends on order of evaluation of side effects
# 1894|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1895|   	 */
# 1896|-> 	return list_make5(makeString(sql.data),
# 1897|   					  targetAttrs,
# 1898|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def96]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:1896: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)},(union ListCell){.ptr_value=(makeInteger(values_end_len))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))},(union ListCell){.ptr_value=(retrieved_attrs)}' depends on order of evaluation of side effects
# 1894|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1895|   	 */
# 1896|-> 	return list_make5(makeString(sql.data),
# 1897|   					  targetAttrs,
# 1898|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def97]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:2605: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))}' depends on order of evaluation of side effects
# 2603|   	 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
# 2604|   	 */
# 2605|-> 	fscan->fdw_private = list_make4(makeString(sql.data),
# 2606|   									makeBoolean((retrieved_attrs != NIL)),
# 2607|   									retrieved_attrs,

Error: CPPCHECK_WARNING (CWE-768): [#def98]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:2605: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))},(union ListCell){.ptr_value=(retrieved_attrs)}' depends on order of evaluation of side effects
# 2603|   	 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
# 2604|   	 */
# 2605|-> 	fscan->fdw_private = list_make4(makeString(sql.data),
# 2606|   									makeBoolean((retrieved_attrs != NIL)),
# 2607|   									retrieved_attrs,

Error: CPPCHECK_WARNING (CWE-768): [#def99]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:2605: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))},(union ListCell){.ptr_value=(retrieved_attrs)},(union ListCell){.ptr_value=(makeBoolean(plan->canSetTag))}' depends on order of evaluation of side effects
# 2603|   	 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
# 2604|   	 */
# 2605|-> 	fscan->fdw_private = list_make4(makeString(sql.data),
# 2606|   									makeBoolean((retrieved_attrs != NIL)),
# 2607|   									retrieved_attrs,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def100]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:3480:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fpextra’
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:6003:1: enter_function: entry to ‘add_paths_with_pathkeys_for_rel’
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:6009:32: call_function: calling ‘get_useful_pathkeys_for_relation’ from ‘add_paths_with_pathkeys_for_rel’
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:6009:32: return_function: returning to ‘add_paths_with_pathkeys_for_rel’ from ‘get_useful_pathkeys_for_relation’
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:6061:9: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:6070:17: call_function: calling ‘estimate_path_cost_size’ from ‘add_paths_with_pathkeys_for_rel’
# 3478|   				Assert(foreignrel->reloptkind == RELOPT_UPPER_REL &&
# 3479|   					   fpinfo->stage == UPPERREL_GROUP_AGG);
# 3480|-> 				adjust_foreign_grouping_path_cost(root, pathkeys,
# 3481|   												  retrieved_rows, width,
# 3482|   												  fpextra->limit_tuples,

Error: CPPCHECK_WARNING (CWE-768): [#def101]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:6870: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeBoolean(true))},(union ListCell){.ptr_value=(makeBoolean(false))}' depends on order of evaluation of side effects
# 6868|   	 * Items in the list must match order in enum FdwPathPrivateIndex.
# 6869|   	 */
# 6870|-> 	fdw_private = list_make2(makeBoolean(true), makeBoolean(false));
# 6871|   
# 6872|   	/* Create foreign ordering path */

Error: CPPCHECK_WARNING (CWE-768): [#def102]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:7115: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeBoolean(has_final_sort))},(union ListCell){.ptr_value=(makeBoolean(extra->limit_needed))}' depends on order of evaluation of side effects
# 7113|   	 * Items in the list must match order in enum FdwPathPrivateIndex.
# 7114|   	 */
# 7115|-> 	fdw_private = list_make2(makeBoolean(has_final_sort),
# 7116|   							 makeBoolean(extra->limit_needed));
# 7117|   

Error: CPPCHECK_WARNING (CWE-476): [#def103]
postgresql-16.8/contrib/postgres_fdw/postgres_fdw.c:7481: warning[nullPointer]: Possible null pointer dereference: fsstate
# 7479|   	{
# 7480|   		Assert(fsstate);
# 7481|-> 		tupdesc = fsstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
# 7482|   	}
# 7483|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def104]
postgresql-16.8/contrib/seg/segparse.c:979:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/contrib/seg/segparse.c:937:6: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/seg/segparse.c:943:28: branch_true: ...to here
postgresql-16.8/contrib/seg/segparse.c:966:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/contrib/seg/segparse.c:968:7: branch_false: ...to here
postgresql-16.8/contrib/seg/segparse.c:977:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/seg/segparse.c:979:9: branch_false: ...to here
postgresql-16.8/contrib/seg/segparse.c:979:9: danger: use of uninitialized value ‘yyss’ here
#  977|           if (! yyptr)
#  978|             goto yyexhaustedlab;
#  979|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#  980|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  981|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def105]
postgresql-16.8/contrib/seg/segscan.c:1281:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/contrib/seg/segscan.c:1214:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/contrib/seg/segscan.c:1221:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/seg/segscan.c:1225:14: branch_false: ...to here
postgresql-16.8/contrib/seg/segscan.c:1225:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/seg/segscan.c:1247:33: branch_false: ...to here
postgresql-16.8/contrib/seg/segscan.c:1252:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/seg/segscan.c:1261:25: branch_false: ...to here
postgresql-16.8/contrib/seg/segscan.c:1263:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/contrib/seg/segscan.c:1267:41: branch_true: ...to here
postgresql-16.8/contrib/seg/segscan.c:1283:41: call_function: inlined call to ‘seg_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/contrib/seg/segscan.c:1290:28: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/seg/segscan.c:1294:40: branch_false: ...to here
postgresql-16.8/contrib/seg/segscan.c:1263:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/contrib/seg/segscan.c:1267:41: branch_true: ...to here
postgresql-16.8/contrib/seg/segscan.c:1272:28: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/seg/segscan.c:1274:48: branch_true: ...to here
postgresql-16.8/contrib/seg/segscan.c:1283:41: call_function: inlined call to ‘seg_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/contrib/seg/segscan.c:1281:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1279|   					b->yy_buf_size *= 2;
# 1280|   
# 1281|-> 				b->yy_ch_buf = (char *)
# 1282|   					/* Include room in for 2 EOB chars. */
# 1283|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def106]
postgresql-16.8/contrib/seg/segscan.c:1566:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/contrib/seg/segscan.c:1552:21: enter_function: entry to ‘seg_yy_create_buffer’
postgresql-16.8/contrib/seg/segscan.c:1556:31: call_function: inlined call to ‘seg_yyalloc’ from ‘seg_yy_create_buffer’
postgresql-16.8/contrib/seg/segscan.c:1557:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/seg/segscan.c:1560:9: branch_false: ...to here
postgresql-16.8/contrib/seg/segscan.c:1566:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 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()" );
# 1568|   

Error: CPPCHECK_WARNING (CWE-476): [#def107]
postgresql-16.8/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): [#def108]
postgresql-16.8/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): [#def109]
postgresql-16.8/contrib/seg/segscan.c:1820:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/contrib/seg/segscan.c:1804:17: enter_function: entry to ‘seg_yy_scan_bytes’
postgresql-16.8/contrib/seg/segscan.c:1813:24: call_function: inlined call to ‘seg_yyalloc’ from ‘seg_yy_scan_bytes’
postgresql-16.8/contrib/seg/segscan.c:1814:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-457): [#def110]
postgresql-16.8/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): [#def111]
postgresql-16.8/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): [#def112]
postgresql-16.8/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): [#def113]
postgresql-16.8/contrib/spi/refint.c:160:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-16.8/contrib/spi/refint.c:75:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:80:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:85:13: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:101:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:105:9: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:111:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:119:27: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:129:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:133:9: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:133:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-16.8/contrib/spi/refint.c:136:76: branch_true: ...to here
postgresql-16.8/contrib/spi/refint.c:139:20: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:146:22: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:153:20: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:159:21: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:159:20: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/spi/refint.c:160:33: branch_true: ...to here
postgresql-16.8/contrib/spi/refint.c:160:33: release_memory: ‘argtypes’ is NULL
postgresql-16.8/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): [#def114]
postgresql-16.8/contrib/spi/refint.c:407:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-16.8/contrib/spi/refint.c:275:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:280:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:285:13: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:285:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:290:9: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:297:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:302:9: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:306:12: branch_false: following ‘false’ branch (when ‘nargs > 4’)...
postgresql-16.8/contrib/spi/refint.c:311:17: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:312:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:315:18: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:322:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:331:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:339:27: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:349:12: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:355:17: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:355:17: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:361:9: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:361:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-16.8/contrib/spi/refint.c:364:76: branch_true: ...to here
postgresql-16.8/contrib/spi/refint.c:367:20: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:374:22: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:381:20: branch_false: following ‘false’ branch...
postgresql-16.8/contrib/spi/refint.c:392:20: branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:392:20: branch_false: following ‘false’ branch (when ‘newtuple’ is NULL)...
 branch_false: ...to here
postgresql-16.8/contrib/spi/refint.c:406:20: branch_true: following ‘true’ branch...
postgresql-16.8/contrib/spi/refint.c:407:33: branch_true: ...to here
postgresql-16.8/contrib/spi/refint.c:407:33: release_memory: ‘argtypes’ is NULL
postgresql-16.8/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: CPPCHECK_WARNING (CWE-457): [#def115]
postgresql-16.8/postgresql-15.12/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-401): [#def116]
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1291:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1224:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1231:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1235:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1235:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1257:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1262:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1271:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1273:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1277:45: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1293:41: call_function: calling ‘cube_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1293:41: return_function: returning to ‘yy_get_next_buffer’ from ‘cube_yyrealloc’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1300:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1304:40: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1273:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1277:45: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1282:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1284:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1293:41: call_function: calling ‘cube_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1293:41: return_function: returning to ‘yy_get_next_buffer’ from ‘cube_yyrealloc’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1291:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
# 1289|   					b->yy_buf_size *= 2;
# 1290|   
# 1291|-> 				b->yy_ch_buf = (char *)
# 1292|   					/* Include room in for 2 EOB chars. */
# 1293|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def117]
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1576:12: warning[-Wanalyzer-malloc-leak]: leak of ‘cube_yyalloc(64)’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1562:21: enter_function: entry to ‘cube_yy_create_buffer’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1566:31: call_function: calling ‘cube_yyalloc’ from ‘cube_yy_create_buffer’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1566:31: return_function: returning to ‘cube_yy_create_buffer’ from ‘cube_yyalloc’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1567:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1570:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1576:12: danger: ‘cube_yyalloc(64)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
# 1574|   	 */
# 1575|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 1576|-> 	if ( ! b->yy_ch_buf )
# 1577|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1578|   

Error: CPPCHECK_WARNING (CWE-476): [#def118]
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1616: warning[nullPointer]: Possible null pointer dereference: b
# 1614|   	yy_flush_buffer( b );
# 1615|   
# 1616|-> 	b->yy_input_file = file;
# 1617|   	b->yy_fill_buffer = 1;
# 1618|   

Error: CPPCHECK_WARNING (CWE-476): [#def119]
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1617: warning[nullPointer]: Possible null pointer dereference: b
# 1615|   
# 1616|   	b->yy_input_file = file;
# 1617|-> 	b->yy_fill_buffer = 1;
# 1618|   
# 1619|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def120]
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1830:33: warning[-Wanalyzer-malloc-leak]: leak of ‘cube_yyalloc(n)’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1814:17: enter_function: entry to ‘cube_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1823:24: call_function: calling ‘cube_yyalloc’ from ‘cube_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1823:24: return_function: returning to ‘cube_yy_scan_bytes’ from ‘cube_yyalloc’
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1824:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/cube/cubescan.c:1832:13: call_function: calling ‘cube_yy_scan_buffer’ from ‘cube_yy_scan_bytes’
# 1828|   		buf[i] = yybytes[i];
# 1829|   
# 1830|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1831|   
# 1832|   	b = yy_scan_buffer( buf, n );

Error: CPPCHECK_WARNING (CWE-457): [#def121]
postgresql-16.8/postgresql-15.12/contrib/dblink/dblink.c:721: error[legacyUninitvar]: Uninitialized variable: conn
#  719|   
#  720|   	/* async query send */
#  721|-> 	retval = PQsendQuery(conn, sql);
#  722|   	if (retval != 1)
#  723|   		elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));

Error: CPPCHECK_WARNING (CWE-457): [#def122]
postgresql-16.8/postgresql-15.12/contrib/dblink/dblink.c:721: error[legacyUninitvar]: Uninitialized variable: sql
#  719|   
#  720|   	/* async query send */
#  721|-> 	retval = PQsendQuery(conn, sql);
#  722|   	if (retval != 1)
#  723|   		elog(NOTICE, "could not send query: %s", pchomp(PQerrorMessage(conn)));

Error: CPPCHECK_WARNING (CWE-768): [#def123]
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_io.c:410: error[unknownEvaluationOrder]: Expression '(entry)++->entry' depends on order of evaluation of side effects
#  408|   
#  409|   	for (i = 0; i < pcount; i++)
#  410|-> 		HS_ADDITEM(entry, buf, ptr, pairs[i]);
#  411|   
#  412|   	HS_FINALIZE(out, pcount, buf, ptr);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def124]
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:343:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:294:1: enter_function: entry to ‘hstore_delete_array’
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:309:33: call_function: calling ‘hstoreArrayToPairs’ from ‘hstore_delete_array’
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:309:33: return_function: returning to ‘hstore_delete_array’ from ‘hstoreArrayToPairs’
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:319:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:333:25: branch_true: following ‘true’ branch (when ‘i < hs_count’)...
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:337:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:337:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:341:59: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:343:49: release_memory: ‘0’ is NULL
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:343:49: release_memory: ‘0’ is NULL
postgresql-16.8/postgresql-15.12/contrib/hstore/hstore_op.c:343:40: danger: dereference of NULL ‘hstoreArrayToPairs(pg_detoast_datum((struct varlena *)*fcinfo.args[1].value), &nkeys) + (long unsigned int)j * 40’
#  341|   			int			skeylen = HSTORE_KEYLEN(es, i);
#  342|   
#  343|-> 			if (skeylen == key_pairs[j].keylen)
#  344|   				difference = memcmp(HSTORE_KEY(es, ps, i),
#  345|   									key_pairs[j].key,

Error: CPPCHECK_WARNING (CWE-457): [#def125]
postgresql-16.8/postgresql-15.12/contrib/hstore_plpython/hstore_plpython.c:191: warning[uninitvar]: Uninitialized variables: out.vl_len_, out.size_
#  189|   	PG_END_TRY();
#  190|   
#  191|-> 	PG_RETURN_POINTER(out);
#  192|   }

Error: CPPCHECK_WARNING (CWE-476): [#def126]
postgresql-16.8/postgresql-15.12/contrib/intarray/_intbig_gist.c:168: warning[nullPointer]: Possible null pointer dereference: ptr
#  166|   		while (num--)
#  167|   		{
#  168|-> 			HASH(GETSIGN(res), *ptr, siglen);
#  169|   			ptr++;
#  170|   		}

Error: CPPCHECK_WARNING (CWE-682): [#def127]
postgresql-16.8/postgresql-15.12/contrib/intarray/_intbig_gist.c:169: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
#  167|   		{
#  168|   			HASH(GETSIGN(res), *ptr, siglen);
#  169|-> 			ptr++;
#  170|   		}
#  171|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def128]
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:339:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:781:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:789:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:792:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:793:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  337|   				{
#  338|   					lptr++;
#  339|-> 					lptr->start = ptr;
#  340|   					state = LQPRS_WAITDELIM;
#  341|   					curqlevel->numvar++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def129]
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:349:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:781:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:789:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:792:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:793:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  347|   				if (t_iseq(ptr, '@'))
#  348|   				{
#  349|-> 					lptr->flag |= LVAR_INCASE;
#  350|   					curqlevel->flag |= LVAR_INCASE;
#  351|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def130]
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:354:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:781:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:789:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:792:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:793:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  352|   				else if (t_iseq(ptr, '*'))
#  353|   				{
#  354|-> 					lptr->flag |= LVAR_ANYEND;
#  355|   					curqlevel->flag |= LVAR_ANYEND;
#  356|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def131]
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:359:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:781:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:789:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:792:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:793:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  357|   				else if (t_iseq(ptr, '%'))
#  358|   				{
#  359|-> 					lptr->flag |= LVAR_SUBLEXEME;
#  360|   					curqlevel->flag |= LVAR_SUBLEXEME;
#  361|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def132]
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:382:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:781:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:789:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:792:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:793:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  380|   				{
#  381|   					/* disallow more chars after a flag */
#  382|-> 					if (lptr->flag)
#  383|   						UNCHAR;
#  384|   				}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def133]
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:581:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lptr’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:781:1: enter_function: entry to ‘lquery_recv’
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:789:12: branch_false: following ‘false’ branch (when ‘version == 1’)...
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:792:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/ltree/ltree_io.c:793:15: call_function: calling ‘parse_lquery’ from ‘lquery_recv’
#  579|   		 * position.
#  580|   		 */
#  581|-> 		while (ptr > lptr->start && strchr("@*%", ptr[-1]) != NULL)
#  582|   		{
#  583|   			ptr--;

Error: CPPCHECK_WARNING (CWE-476): [#def134]
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_gin.c:143: warning[nullPointer]: Possible null pointer dereference: (union varattrib_4b*)(trg)
#  141|   	}
#  142|   
#  143|-> 	trglen = ARRNELEM(trg);
#  144|   	*nentries = trglen;
#  145|   

Error: CPPCHECK_WARNING (CWE-457): [#def135]
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:570: warning[uninitvar]: Uninitialized variables: trg.vl_len_, trg.flag
#  568|   	MemoryContextDelete(tmpcontext);
#  569|   
#  570|-> 	return trg;
#  571|   }
#  572|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def136]
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:2011:60: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:1981:16: branch_true: following ‘true’ branch...
 branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:1989:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:1997:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:2003:99: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/pg_trgm/trgm_regexp.c:2011:60: danger: dereference of NULL ‘<unknown>’
# 2009|   				arcs[arcIndex].sourceState = source->snumber;
# 2010|   				arcs[arcIndex].targetState = target->snumber;
# 2011|-> 				arcs[arcIndex].colorTrgm = ctrgm->cnumber;
# 2012|   				arcIndex++;
# 2013|   			}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def137]
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:137:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[1]’
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:314:1: enter_function: entry to ‘pgstat_heap’
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:344:16: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:346:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:372:24: branch_false: following ‘false’ branch (when ‘block > tupblock’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:344:16: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:346:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:351:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:353:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:372:24: branch_false: following ‘false’ branch (when ‘block > tupblock’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:385:16: branch_false: following ‘false’ branch (when ‘block >= nblocks’)...
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:397:9: call_function: inlined call to ‘table_endscan’ from ‘pgstat_heap’
postgresql-16.8/postgresql-15.12/contrib/pgstattuple/pgstattuple.c:402:16: call_function: calling ‘build_pgstattuple_type’ from ‘pgstat_heap’
#  135|   	i = 0;
#  136|   	snprintf(values[i++], NCHARS, INT64_FORMAT, stat->table_len);
#  137|-> 	snprintf(values[i++], NCHARS, INT64_FORMAT, stat->tuple_count);
#  138|   	snprintf(values[i++], NCHARS, INT64_FORMAT, stat->tuple_len);
#  139|   	snprintf(values[i++], NCHARS, "%.2f", tuple_percent);

Error: CPPCHECK_WARNING (CWE-768): [#def138]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:1410: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(retrieved_attrs)}' depends on order of evaluation of side effects
# 1408|   	 * Items in the list must match order in enum FdwScanPrivateIndex.
# 1409|   	 */
# 1410|-> 	fdw_private = list_make3(makeString(sql.data),
# 1411|   							 retrieved_attrs,
# 1412|   							 makeInteger(fpinfo->fetch_size));

Error: CPPCHECK_WARNING (CWE-768): [#def139]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:1410: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(retrieved_attrs)},(union ListCell){.ptr_value=(makeInteger(fpinfo->fetch_size))}' depends on order of evaluation of side effects
# 1408|   	 * Items in the list must match order in enum FdwScanPrivateIndex.
# 1409|   	 */
# 1410|-> 	fdw_private = list_make3(makeString(sql.data),
# 1411|   							 retrieved_attrs,
# 1412|   							 makeInteger(fpinfo->fetch_size));

Error: CPPCHECK_WARNING (CWE-768): [#def140]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:1900: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)}' depends on order of evaluation of side effects
# 1898|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1899|   	 */
# 1900|-> 	return list_make5(makeString(sql.data),
# 1901|   					  targetAttrs,
# 1902|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def141]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:1900: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)},(union ListCell){.ptr_value=(makeInteger(values_end_len))}' depends on order of evaluation of side effects
# 1898|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1899|   	 */
# 1900|-> 	return list_make5(makeString(sql.data),
# 1901|   					  targetAttrs,
# 1902|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def142]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:1900: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)},(union ListCell){.ptr_value=(makeInteger(values_end_len))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))}' depends on order of evaluation of side effects
# 1898|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1899|   	 */
# 1900|-> 	return list_make5(makeString(sql.data),
# 1901|   					  targetAttrs,
# 1902|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def143]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:1900: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(targetAttrs)},(union ListCell){.ptr_value=(makeInteger(values_end_len))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))},(union ListCell){.ptr_value=(retrieved_attrs)}' depends on order of evaluation of side effects
# 1898|   	 * Items in the list must match enum FdwModifyPrivateIndex, above.
# 1899|   	 */
# 1900|-> 	return list_make5(makeString(sql.data),
# 1901|   					  targetAttrs,
# 1902|   					  makeInteger(values_end_len),

Error: CPPCHECK_WARNING (CWE-768): [#def144]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:2601: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))}' depends on order of evaluation of side effects
# 2599|   	 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
# 2600|   	 */
# 2601|-> 	fscan->fdw_private = list_make4(makeString(sql.data),
# 2602|   									makeBoolean((retrieved_attrs != NIL)),
# 2603|   									retrieved_attrs,

Error: CPPCHECK_WARNING (CWE-768): [#def145]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:2601: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))},(union ListCell){.ptr_value=(retrieved_attrs)}' depends on order of evaluation of side effects
# 2599|   	 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
# 2600|   	 */
# 2601|-> 	fscan->fdw_private = list_make4(makeString(sql.data),
# 2602|   									makeBoolean((retrieved_attrs != NIL)),
# 2603|   									retrieved_attrs,

Error: CPPCHECK_WARNING (CWE-768): [#def146]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:2601: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(sql.data))},(union ListCell){.ptr_value=(makeBoolean(retrieved_attrs!=((struct List*)NULL)))},(union ListCell){.ptr_value=(retrieved_attrs)},(union ListCell){.ptr_value=(makeBoolean(plan->canSetTag))}' depends on order of evaluation of side effects
# 2599|   	 * Items in the list must match enum FdwDirectModifyPrivateIndex, above.
# 2600|   	 */
# 2601|-> 	fscan->fdw_private = list_make4(makeString(sql.data),
# 2602|   									makeBoolean((retrieved_attrs != NIL)),
# 2603|   									retrieved_attrs,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def147]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:3479:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fpextra’
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:5799:1: enter_function: entry to ‘add_paths_with_pathkeys_for_rel’
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:5805:32: call_function: calling ‘get_useful_pathkeys_for_relation’ from ‘add_paths_with_pathkeys_for_rel’
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:5805:32: return_function: returning to ‘add_paths_with_pathkeys_for_rel’ from ‘get_useful_pathkeys_for_relation’
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:5857:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:5866:17: call_function: calling ‘estimate_path_cost_size’ from ‘add_paths_with_pathkeys_for_rel’
# 3477|   				Assert(foreignrel->reloptkind == RELOPT_UPPER_REL &&
# 3478|   					   fpinfo->stage == UPPERREL_GROUP_AGG);
# 3479|-> 				adjust_foreign_grouping_path_cost(root, pathkeys,
# 3480|   												  retrieved_rows, width,
# 3481|   												  fpextra->limit_tuples,

Error: CPPCHECK_WARNING (CWE-768): [#def148]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:6664: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeBoolean(true))},(union ListCell){.ptr_value=(makeBoolean(false))}' depends on order of evaluation of side effects
# 6662|   	 * Items in the list must match order in enum FdwPathPrivateIndex.
# 6663|   	 */
# 6664|-> 	fdw_private = list_make2(makeBoolean(true), makeBoolean(false));
# 6665|   
# 6666|   	/* Create foreign ordering path */

Error: CPPCHECK_WARNING (CWE-768): [#def149]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:6909: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeBoolean(has_final_sort))},(union ListCell){.ptr_value=(makeBoolean(extra->limit_needed))}' depends on order of evaluation of side effects
# 6907|   	 * Items in the list must match order in enum FdwPathPrivateIndex.
# 6908|   	 */
# 6909|-> 	fdw_private = list_make2(makeBoolean(has_final_sort),
# 6910|   							 makeBoolean(extra->limit_needed));
# 6911|   

Error: CPPCHECK_WARNING (CWE-476): [#def150]
postgresql-16.8/postgresql-15.12/contrib/postgres_fdw/postgres_fdw.c:7275: warning[nullPointer]: Possible null pointer dereference: fsstate
# 7273|   	{
# 7274|   		Assert(fsstate);
# 7275|-> 		tupdesc = fsstate->ss.ss_ScanTupleSlot->tts_tupleDescriptor;
# 7276|   	}
# 7277|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def151]
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1272:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1205:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1212:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1216:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1216:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1238:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1243:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1252:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1254:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1258:45: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1274:41: call_function: calling ‘seg_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1274:41: return_function: returning to ‘yy_get_next_buffer’ from ‘seg_yyrealloc’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1281:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1285:40: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1254:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1258:45: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1263:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1265:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1274:41: call_function: calling ‘seg_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1274:41: return_function: returning to ‘yy_get_next_buffer’ from ‘seg_yyrealloc’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1272:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
# 1270|   					b->yy_buf_size *= 2;
# 1271|   
# 1272|-> 				b->yy_ch_buf = (char *)
# 1273|   					/* Include room in for 2 EOB chars. */
# 1274|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def152]
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1557:12: warning[-Wanalyzer-malloc-leak]: leak of ‘seg_yyalloc(64)’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1543:21: enter_function: entry to ‘seg_yy_create_buffer’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1547:31: call_function: calling ‘seg_yyalloc’ from ‘seg_yy_create_buffer’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1547:31: return_function: returning to ‘seg_yy_create_buffer’ from ‘seg_yyalloc’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1548:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1551:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1557:12: danger: ‘seg_yyalloc(64)’ leaks here; was allocated at [(4)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/3)
# 1555|   	 */
# 1556|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 1557|-> 	if ( ! b->yy_ch_buf )
# 1558|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1559|   

Error: CPPCHECK_WARNING (CWE-476): [#def153]
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1597: warning[nullPointer]: Possible null pointer dereference: b
# 1595|   	yy_flush_buffer( b );
# 1596|   
# 1597|-> 	b->yy_input_file = file;
# 1598|   	b->yy_fill_buffer = 1;
# 1599|   

Error: CPPCHECK_WARNING (CWE-476): [#def154]
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1598: warning[nullPointer]: Possible null pointer dereference: b
# 1596|   
# 1597|   	b->yy_input_file = file;
# 1598|-> 	b->yy_fill_buffer = 1;
# 1599|   
# 1600|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def155]
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1811:33: warning[-Wanalyzer-malloc-leak]: leak of ‘seg_yyalloc(n)’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1795:17: enter_function: entry to ‘seg_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1804:24: call_function: calling ‘seg_yyalloc’ from ‘seg_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1804:24: return_function: returning to ‘seg_yy_scan_bytes’ from ‘seg_yyalloc’
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1805:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/seg/segscan.c:1813:13: call_function: calling ‘seg_yy_scan_buffer’ from ‘seg_yy_scan_bytes’
# 1809|   		buf[i] = yybytes[i];
# 1810|   
# 1811|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1812|   
# 1813|   	b = yy_scan_buffer( buf, n );

Error: CPPCHECK_WARNING (CWE-457): [#def156]
postgresql-16.8/postgresql-15.12/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): [#def157]
postgresql-16.8/postgresql-15.12/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): [#def158]
postgresql-16.8/postgresql-15.12/contrib/sepgsql/selinux.c:887: warning[uninitvar]: Uninitialized variable: result
#  885|   	PG_END_TRY();
#  886|   
#  887|-> 	return result;
#  888|   }
#  889|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def159]
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:160:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:75:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:80:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:85:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:101:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:105:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:111:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:119:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:129:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:133:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:133:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:136:76: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:139:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:146:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:153:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:159:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:159:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:160:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:160:33: release_memory: ‘argtypes’ is NULL
postgresql-16.8/postgresql-15.12/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): [#def160]
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:407:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘argtypes’
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:275:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:280:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:285:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:285:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:290:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:297:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:302:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:306:12: branch_false: following ‘false’ branch (when ‘nargs > 4’)...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:311:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:312:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:315:18: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:322:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:331:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:339:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:349:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:355:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:355:17: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:361:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:361:21: branch_true: following ‘true’ branch (when ‘i < nkeys’)...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:364:76: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:367:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:374:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:381:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:392:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:392:20: branch_false: following ‘false’ branch (when ‘newtuple’ is NULL)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:406:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:407:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/contrib/spi/refint.c:407:33: release_memory: ‘argtypes’ is NULL
postgresql-16.8/postgresql-15.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def161]
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:1519:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘distances’
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:2408:1: enter_function: entry to ‘brin_minmax_multi_add_value’
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:2440:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:2486:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:2486:17: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:2533:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_minmax_multi.c:2533:21: call_function: calling ‘range_add_value’ from ‘brin_minmax_multi_add_value’
# 1517|   	{
# 1518|   		/* index of the gap between (index) and (index+1) ranges */
# 1519|-> 		int			index = distances[i].index;
# 1520|   
# 1521|   		Assert((index >= 0) && ((index + 1) < neranges));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def162]
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:667:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nullbits’
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:553:1: enter_function: entry to ‘brin_deform_tuple’
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:565:16: branch_true: following ‘true’ branch (when ‘dMemtuple’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:565:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:565:28: call_function: calling ‘brin_memtuple_initialize’ from ‘brin_deform_tuple’
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:565:28: return_function: returning to ‘brin_deform_tuple’ from ‘brin_memtuple_initialize’
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:568:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:572:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:583:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:587:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/brin/brin_tuple.c:587:9: call_function: calling ‘brin_deconstruct_tuple’ from ‘brin_deform_tuple’
#  665|   		 * data area.
#  666|   		 */
#  667|-> 		allnulls[attnum] = nulls && !att_isnull(attnum, nullbits);
#  668|   
#  669|   		/*

Error: CPPCHECK_WARNING (CWE-476): [#def163]
postgresql-16.8/postgresql-15.12/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): [#def164]
postgresql-16.8/postgresql-15.12/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): [#def165]
postgresql-16.8/postgresql-15.12/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): [#def166]
postgresql-16.8/postgresql-15.12/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): [#def167]
postgresql-16.8/postgresql-15.12/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): [#def168]
postgresql-16.8/postgresql-15.12/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): [#def169]
postgresql-16.8/postgresql-15.12/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-476): [#def170]
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:417:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:818:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
#  415|   		if (BufferIsValid(childbuf))
#  416|   		{
#  417|-> 			GinPageGetOpaque(childpage)->flags &= ~GIN_INCOMPLETE_SPLIT;
#  418|   			MarkBufferDirty(childbuf);
#  419|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def171]
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:487:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:818:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
#  485|   		{
#  486|   			data.leftChildBlkno = BufferGetBlockNumber(childbuf);
#  487|-> 			data.rightChildBlkno = GinPageGetOpaque(childpage)->rightlink;
#  488|   		}
#  489|   		else

Error: GCC_ANALYZER_WARNING (CWE-688): [#def172]
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:579:25: warning[-Wanalyzer-null-argument]: use of NULL ‘newrootpg’ where non-null expected
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/gin/ginbtree.c:818:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
#argument 2 of ‘__builtin_memcpy’ must be non-null
#  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): [#def173]
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashfunc.c:321: error[legacyUninitvar]: Uninitialized variable: result
#  319|   	PG_FREE_IF_COPY(key, 0);
#  320|   
#  321|-> 	return result;
#  322|   }
#  323|   

Error: CPPCHECK_WARNING (CWE-457): [#def174]
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashfunc.c:378: error[legacyUninitvar]: Uninitialized variable: result
#  376|   	PG_FREE_IF_COPY(key, 0);
#  377|   
#  378|-> 	return result;
#  379|   }
#  380|   

Error: GCC_ANALYZER_WARNING (CWE-688): [#def175]
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1516:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1521:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1529:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1530:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1530:25: release_memory: ‘cache’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1531:24: release_memory: ‘0’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/access/hash/hashpage.c:1531:17: danger: argument 1 (‘*rel.rd_amcache’) NULL where non-null expected
#argument 1 of ‘__builtin_memcpy’ must be non-null
# 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-476): [#def176]
postgresql-16.8/postgresql-15.12/src/backend/access/heap/../../../../src/include/access/tableam.h:1037:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam_handler.c:680:1: enter_function: entry to ‘heapam_relation_copy_for_cluster’
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam_handler.c:724:12: branch_false: following ‘false’ branch (when ‘use_sort == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam_handler.c:736:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam_handler.c:736:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam_handler.c:738:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam_handler.c:797:30: call_function: calling ‘table_scan_getnextslot’ from ‘heapam_relation_copy_for_cluster’
# 1035|   table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1036|   {
# 1037|-> 	slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1038|   
# 1039|   	/*

Error: CPPCHECK_WARNING (CWE-457): [#def177]
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:5776: error[legacyUninitvar]: Uninitialized variable: status
# 5774|   				}
# 5775|   
# 5776|-> 				result = test_lockmode_for_conflict(status, rawxmax, mode,
# 5777|   													&mytup, &needwait);
# 5778|   

Error: CPPCHECK_WARNING (CWE-457): [#def178]
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:6321: error[legacyUninitvar]: Uninitialized variable: ret
# 6319|   	 * don't bother optimizing that.
# 6320|   	 */
# 6321|-> 	if (!ret)
# 6322|   	{
# 6323|   		UnlockTuple(relation, &oldtup.t_self, InplaceUpdateTupleLock);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def179]
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9972:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9846:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9887:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9918:12: branch_true: following ‘true’ branch (when ‘newaction == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9925:27: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9931:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9934:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9934:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9937:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9940:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9947:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9961:20: branch_true: following ‘true’ branch (when ‘prefixlen != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9966:31: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/heap/heapam.c:9972:63: danger: dereference of NULL ‘oldtup.t_data’
# 9970|   
# 9971|   			/* copy prefix from old tuple */
# 9972|-> 			memcpy(newp, (char *) oldtup.t_data + oldtup.t_data->t_hoff, prefixlen);
# 9973|   			newp += prefixlen;
# 9974|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def180]
postgresql-16.8/postgresql-15.12/src/backend/access/index/../../../../src/include/access/tableam.h:1037:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:796:1: enter_function: entry to ‘systable_inplace_update_begin’
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:816:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:841:20: branch_false: following ‘false’ branch (when ‘retries != 10001’)...
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:844:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:845:24: call_function: calling ‘systable_beginscan’ from ‘systable_inplace_update_begin’
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:845:24: return_function: returning to ‘systable_inplace_update_begin’ from ‘systable_beginscan’
postgresql-16.8/postgresql-15.12/src/backend/access/index/genam.c:847:26: call_function: calling ‘systable_getnext’ from ‘systable_inplace_update_begin’
# 1035|   table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1036|   {
# 1037|-> 	slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1038|   
# 1039|   	/*

Error: GCC_ANALYZER_WARNING (CWE-476): [#def181]
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:1168:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:939:1: enter_function: entry to ‘_bt_strategy’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:959:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:966:9: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:966:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:966:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:967:20: release_memory: ‘leftinterval’ is NULL
postgresql-16.8/postgresql-15.12/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): [#def182]
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:1184:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:939:1: enter_function: entry to ‘_bt_strategy’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:959:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:966:9: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:966:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:966:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtsplitloc.c:968:21: release_memory: ‘rightinterval’ is NULL
postgresql-16.8/postgresql-15.12/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): [#def183]
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2306:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2220:1: enter_function: entry to ‘_bt_truncate’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2238:21: call_function: calling ‘_bt_keep_natts’ from ‘_bt_truncate’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2238:21: return_function: returning to ‘_bt_truncate’ from ‘_bt_keep_natts’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2265:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2284:19: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2297:24: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_truncate’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2297:24: return_function: returning to ‘_bt_truncate’ from ‘BTreeTupleGetHeapTID’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2306:9: danger: dereference of NULL ‘BTreeTupleGetHeapTID(palloc0(newsize))’
# 2304|   	 * legally usable.)
# 2305|   	 */
# 2306|-> 	ItemPointerCopy(BTreeTupleGetMaxHeapTID(lastleft), pivotheaptid);
# 2307|   
# 2308|   	/*

Error: GCC_ANALYZER_WARNING (CWE-476): [#def184]
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2653:1: enter_function: entry to ‘_bt_check_third_page’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2662:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2670:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2678:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_check_third_page’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: return_function: returning to ‘_bt_check_third_page’ from ‘BTreeTupleGetHeapTID’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtutils.c:2682:9: danger: dereference of NULL ‘BTreeTupleGetHeapTID(newtup)’
# 2680|   			 itemsz, RelationGetRelationName(rel));
# 2681|   
# 2682|-> 	ereport(ERROR,
# 2683|   			(errcode(ERRCODE_PROGRAM_LIMIT_EXCEEDED),
# 2684|   			 errmsg("index row size %zu exceeds btree version %u maximum %zu for index \"%s\"",

Error: GCC_ANALYZER_WARNING (CWE-476): [#def185]
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:389:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nposting’
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:309:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:319:51: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:333:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:373:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:378:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:378:53: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:385:28: branch_false: following ‘false’ branch (when ‘off != replacepostingoff’)...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: following ‘false’ branch (when ‘newitemonleft == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:406:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:409:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:412:35: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:378:53: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:385:28: branch_false: following ‘false’ branch (when ‘off != replacepostingoff’)...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: following ‘false’ branch (when ‘newitemonleft == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:406:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:409:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:412:35: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:378:53: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: following ‘true’ branch (when ‘off == replacepostingoff’)...
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:389:37: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/nbtree/nbtxlog.c:389:37: danger: dereference of NULL ‘nposting’
#  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-476): [#def186]
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:801:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1000:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1043:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1043:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1043:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1049:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1055:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1056:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1056:17: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/access/spgist/spgutils.c:1056:17: call_function: inlined call to ‘memcpyInnerDatum’ from ‘spgFormInnerTuple’
#  799|   	if (att->attbyval)
#  800|   	{
#  801|-> 		memcpy(target, &datum, sizeof(Datum));
#  802|   	}
#  803|   	else

Error: CPPCHECK_WARNING (CWE-476): [#def187]
postgresql-16.8/postgresql-15.12/src/backend/access/transam/twophase.c:1033: error[ctunullpointer]: Null pointer dereference: data
# 1031|   	}
# 1032|   
# 1033|-> 	memcpy(((char *) records.tail->data) + records.tail->len, data, len);
# 1034|   	records.tail->len += padlen;
# 1035|   	records.bytes_free -= padlen;

Error: CPPCHECK_WARNING (CWE-682): [#def188]
postgresql-16.8/postgresql-15.12/src/backend/access/transam/xlog.c:1553: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 1551|   		Assert(((XLogPageHeader) cachedPos)->xlp_magic == XLOG_PAGE_MAGIC);
# 1552|   		Assert(((XLogPageHeader) cachedPos)->xlp_pageaddr == ptr - (ptr % XLOG_BLCKSZ));
# 1553|-> 		return cachedPos + ptr % XLOG_BLCKSZ;
# 1554|   	}
# 1555|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def189]
postgresql-16.8/postgresql-15.12/src/backend/access/transam/xlog.c:8100:17: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘start.tv_sec’
postgresql-16.8/postgresql-15.12/src/backend/access/transam/xlog.c:7459:1: enter_function: entry to ‘XLogReportParameters’
postgresql-16.8/postgresql-15.12/src/backend/access/transam/xlog.c:7495:25: call_function: calling ‘XLogFlush’ from ‘XLogReportParameters’
# 8098|   
# 8099|   		INSTR_TIME_SET_CURRENT(duration);
# 8100|-> 		INSTR_TIME_SUBTRACT(duration, start);
# 8101|   		PendingWalStats.wal_sync_time += INSTR_TIME_GET_MICROSEC(duration);
# 8102|   	}

Error: GCC_ANALYZER_WARNING (CWE-131): [#def190]
postgresql-16.8/postgresql-15.12/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-16.8/postgresql-15.12/src/backend/access/transam/xloginsert.c:1177:1: enter_function: entry to ‘log_newpage_buffer’
postgresql-16.8/postgresql-15.12/src/backend/access/transam/xloginsert.c:1189: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-401): [#def191]
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1489:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1422:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1429:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1433:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1433:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1455:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1460:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1469:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1471:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1475:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1491:41: call_function: inlined call to ‘boot_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1498:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1502:40: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1471:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1475:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1480:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1482:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1491:41: call_function: inlined call to ‘boot_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1489:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1487|   					b->yy_buf_size *= 2;
# 1488|   
# 1489|-> 				b->yy_ch_buf = (char *)
# 1490|   					/* Include room in for 2 EOB chars. */
# 1491|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def192]
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1777:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1763:21: enter_function: entry to ‘boot_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1767:31: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1768:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1771:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1777:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1775|   	 */
# 1776|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 1777|-> 	if ( ! b->yy_ch_buf )
# 1778|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1779|   

Error: CPPCHECK_WARNING (CWE-476): [#def193]
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1817: warning[nullPointer]: Possible null pointer dereference: b
# 1815|   	yy_flush_buffer( b );
# 1816|   
# 1817|-> 	b->yy_input_file = file;
# 1818|   	b->yy_fill_buffer = 1;
# 1819|   

Error: CPPCHECK_WARNING (CWE-476): [#def194]
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:1818: warning[nullPointer]: Possible null pointer dereference: b
# 1816|   
# 1817|   	b->yy_input_file = file;
# 1818|-> 	b->yy_fill_buffer = 1;
# 1819|   
# 1820|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def195]
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:2031:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:2015:17: enter_function: entry to ‘boot_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:2024:24: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:2025:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/bootstrap/bootscanner.c:2033:13: call_function: calling ‘boot_yy_scan_buffer’ from ‘boot_yy_scan_bytes’
# 2029|   		buf[i] = yybytes[i];
# 2030|   
# 2031|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2032|   
# 2033|   	b = yy_scan_buffer( buf, n );

Error: CPPCHECK_WARNING (CWE-768): [#def196]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:2341: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(typename)},((union ListCell){.ptr_value=((list_nth_cell(args,0)->ptr_value))})' depends on order of evaluation of side effects
# 2339|   		case OBJECT_DOMCONSTRAINT:
# 2340|   		case OBJECT_TRANSFORM:
# 2341|-> 			objnode = (Node *) list_make2(typename, linitial(args));
# 2342|   			break;
# 2343|   		case OBJECT_PUBLICATION_REL:

Error: CPPCHECK_WARNING (CWE-768): [#def197]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:2344: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(name)},((union ListCell){.ptr_value=((list_nth_cell(args,0)->ptr_value))})' depends on order of evaluation of side effects
# 2342|   			break;
# 2343|   		case OBJECT_PUBLICATION_REL:
# 2344|-> 			objnode = (Node *) list_make2(name, linitial(args));
# 2345|   			break;
# 2346|   		case OBJECT_PUBLICATION_NAMESPACE:

Error: CPPCHECK_WARNING (CWE-768): [#def198]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:2348: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=((list_nth_cell(name,0)->ptr_value))}),((union ListCell){.ptr_value=((list_nth_cell(args,0)->ptr_value))})' depends on order of evaluation of side effects
# 2346|   		case OBJECT_PUBLICATION_NAMESPACE:
# 2347|   		case OBJECT_USER_MAPPING:
# 2348|-> 			objnode = (Node *) list_make2(linitial(name), linitial(args));
# 2349|   			break;
# 2350|   		case OBJECT_DEFACL:

Error: CPPCHECK_WARNING (CWE-768): [#def199]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:2355: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(name)},(union ListCell){.ptr_value=(args)}' depends on order of evaluation of side effects
# 2353|   		case OBJECT_AMOP:
# 2354|   		case OBJECT_AMPROC:
# 2355|-> 			objnode = (Node *) list_make2(name, args);
# 2356|   			break;
# 2357|   		case OBJECT_FUNCTION:

Error: CPPCHECK_WARNING (CWE-768): [#def200]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:4961: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((coll->collname).data))}' depends on order of evaluation of side effects
# 4959|   																  NameStr(coll->collname)));
# 4960|   				if (objname)
# 4961|-> 					*objname = list_make2(schema,
# 4962|   										  pstrdup(NameStr(coll->collname)));
# 4963|   				ReleaseSysCache(collTup);

Error: CPPCHECK_WARNING (CWE-768): [#def201]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5035: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((conForm->conname).data))}' depends on order of evaluation of side effects
# 5033|   																  NameStr(conForm->conname)));
# 5034|   				if (objname)
# 5035|-> 					*objname = list_make2(schema,
# 5036|   										  pstrdup(NameStr(conForm->conname)));
# 5037|   				ReleaseSysCache(conTup);

Error: CPPCHECK_WARNING (CWE-768): [#def202]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5140: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(schema)}' depends on order of evaluation of side effects
# 5138|   								 quote_identifier(NameStr(amForm->amname)));
# 5139|   				if (objname)
# 5140|-> 					*objname = list_make3(pstrdup(NameStr(amForm->amname)),
# 5141|   										  schema,
# 5142|   										  pstrdup(NameStr(opcForm->opcname)));

Error: CPPCHECK_WARNING (CWE-768): [#def203]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5140: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((opcForm->opcname).data))}' depends on order of evaluation of side effects
# 5138|   								 quote_identifier(NameStr(amForm->amname)));
# 5139|   				if (objname)
# 5140|-> 					*objname = list_make3(pstrdup(NameStr(amForm->amname)),
# 5141|   										  schema,
# 5142|   										  pstrdup(NameStr(opcForm->opcname)));

Error: CPPCHECK_WARNING (CWE-768): [#def204]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5220: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltype)},(union ListCell){.ptr_value=(rtype)}' depends on order of evaluation of side effects
# 5218|   					*objname = lappend(*objname,
# 5219|   									   psprintf("%d", amopForm->amopstrategy));
# 5220|-> 					*objargs = list_make2(ltype, rtype);
# 5221|   				}
# 5222|   

Error: CPPCHECK_WARNING (CWE-768): [#def205]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5282: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltype)},(union ListCell){.ptr_value=(rtype)}' depends on order of evaluation of side effects
# 5280|   					*objname = lappend(*objname,
# 5281|   									   psprintf("%d", amprocForm->amprocnum));
# 5282|-> 					*objargs = list_make2(ltype, rtype);
# 5283|   				}
# 5284|   

Error: CPPCHECK_WARNING (CWE-768): [#def206]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5402: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formStatistic->stxname).data))}' depends on order of evaluation of side effects
# 5400|   																  NameStr(formStatistic->stxname)));
# 5401|   				if (objname)
# 5402|-> 					*objname = list_make2(schema,
# 5403|   										  pstrdup(NameStr(formStatistic->stxname)));
# 5404|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def207]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5429: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formParser->prsname).data))}' depends on order of evaluation of side effects
# 5427|   																  NameStr(formParser->prsname)));
# 5428|   				if (objname)
# 5429|-> 					*objname = list_make2(schema,
# 5430|   										  pstrdup(NameStr(formParser->prsname)));
# 5431|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def208]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5456: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formDict->dictname).data))}' depends on order of evaluation of side effects
# 5454|   																  NameStr(formDict->dictname)));
# 5455|   				if (objname)
# 5456|-> 					*objname = list_make2(schema,
# 5457|   										  pstrdup(NameStr(formDict->dictname)));
# 5458|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def209]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5483: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formTmpl->tmplname).data))}' depends on order of evaluation of side effects
# 5481|   																  NameStr(formTmpl->tmplname)));
# 5482|   				if (objname)
# 5483|-> 					*objname = list_make2(schema,
# 5484|   										  pstrdup(NameStr(formTmpl->tmplname)));
# 5485|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def210]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:5510: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formCfg->cfgname).data))}' depends on order of evaluation of side effects
# 5508|   																  NameStr(formCfg->cfgname)));
# 5509|   				if (objname)
# 5510|-> 					*objname = list_make2(schema,
# 5511|   										  pstrdup(NameStr(formCfg->cfgname)));
# 5512|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def211]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:6017: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(pstrdup(schema))}' depends on order of evaluation of side effects
# 6015|   
# 6016|   	if (object)
# 6017|-> 		*object = list_make3(pstrdup(NameStr(amForm->amname)),
# 6018|   							 pstrdup(schema),
# 6019|   							 pstrdup(NameStr(opfForm->opfname)));

Error: CPPCHECK_WARNING (CWE-768): [#def212]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:6017: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(pstrdup(schema))},(union ListCell){.ptr_value=(pstrdup((opfForm->opfname).data))}' depends on order of evaluation of side effects
# 6015|   
# 6016|   	if (object)
# 6017|-> 		*object = list_make3(pstrdup(NameStr(amForm->amname)),
# 6018|   							 pstrdup(schema),
# 6019|   							 pstrdup(NameStr(opfForm->opfname)));

Error: CPPCHECK_WARNING (CWE-768): [#def213]
postgresql-16.8/postgresql-15.12/src/backend/catalog/objectaddress.c:6055: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((relForm->relname).data))}' depends on order of evaluation of side effects
# 6053|   													  NameStr(relForm->relname)));
# 6054|   	if (object)
# 6055|-> 		*object = list_make2(schema, pstrdup(NameStr(relForm->relname)));
# 6056|   
# 6057|   	ReleaseSysCache(relTup);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def214]
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:286:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:253:1: enter_function: entry to ‘has_partition_attrs’
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:261:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:268:26: call_function: inlined call to ‘list_head’ from ‘has_partition_attrs’
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:269:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:271:45: call_function: inlined call to ‘get_partition_col_attnum’ from ‘has_partition_attrs’
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:273:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:286:37: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/partition.c:286:37: danger: dereference of NULL ‘partexprs_item’
#  284|   		{
#  285|   			/* Arbitrary expression */
#  286|-> 			Node	   *expr = (Node *) lfirst(partexprs_item);
#  287|   			Bitmapset  *expr_attrs = NULL;
#  288|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def215]
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:538:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘newlc’
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:72:1: enter_function: entry to ‘ProcedureCreate’
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:129:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:139:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:164:12: branch_false: following ‘false’ branch (when ‘parameterModes == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:186:99: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:188:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:198:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:201:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:210:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:239:12: branch_false: following ‘false’ branch (when ‘paramModes’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:294:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:294:21: branch_true: following ‘true’ branch (when ‘i != 30’)...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:296:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:325:12: branch_false: following ‘false’ branch (when ‘parameterModes == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:328:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:365:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:368:55: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:373:20: branch_true: following ‘true’ branch (when ‘replace != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:378:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:383:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:397:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:409:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:410:39: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:409:21: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:429:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:507:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:514:29: call_function: inlined call to ‘list_length’ from ‘ProcedureCreate’
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:514:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:523:42: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:535:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:540:36: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:548:41: call_function: inlined call to ‘lnext’ from ‘ProcedureCreate’
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:535:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/catalog/pg_proc.c:538:45: danger: dereference of NULL ‘newlc’
#  536|   			{
#  537|   				Node	   *oldDef = (Node *) lfirst(oldlc);
#  538|-> 				Node	   *newDef = (Node *) lfirst(newlc);
#  539|   
#  540|   				if (exprType(oldDef) != exprType(newDef))

Error: CPPCHECK_WARNING (CWE-768): [#def216]
postgresql-16.8/postgresql-15.12/src/backend/catalog/toasting.c:329: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=("chunk_id")},(union ListCell){.ptr_value=("chunk_seq")}' depends on order of evaluation of side effects
#  327|   				 InvalidOid, InvalidOid,
#  328|   				 indexInfo,
#  329|-> 				 list_make2("chunk_id", "chunk_seq"),
#  330|   				 BTREE_AM_OID,
#  331|   				 rel->rd_rel->reltablespace,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def217]
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:611:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:291:1: enter_function: entry to ‘do_analyze_rel’
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:451:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:500:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:500:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:505:23: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:521:19: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:530:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:533:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:538:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:548:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:553:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:561:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:590:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:590:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:596:17: call_function: inlined call to ‘MemoryContextSwitchTo’ from ‘do_analyze_rel’
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:607:31: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:609:60: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:609:39: release_memory: ‘indexdata’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:611:25: danger: dereference of NULL ‘thisdata’
#  609|   			AnlIndexData *thisdata = &indexdata[ind];
#  610|   
#  611|-> 			update_attstats(RelationGetRelid(Irel[ind]), false,
#  612|   							thisdata->attr_cnt, thisdata->vacattrstats);
#  613|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def218]
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:661:47: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:451:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:500:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:500:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:505:23: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:521:19: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:530:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:533:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:538:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:634:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:638:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:656:31: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:658:60: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:658:39: release_memory: ‘indexdata’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:661:47: danger: dereference of NULL ‘thisdata’
#  659|   			double		totalindexrows;
#  660|   
#  661|-> 			totalindexrows = ceil(thisdata->tupleFract * totalrows);
#  662|   			vac_update_relstats(Irel[ind],
#  663|   								RelationGetNumberOfBlocks(Irel[ind]),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def219]
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:855:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:291:1: enter_function: entry to ‘do_analyze_rel’
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:451:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:500:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:500:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:505:23: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:521:19: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:530:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:533:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:538:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:548:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:553:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:561:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:590:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:590:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:591:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/analyze.c:591: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: GCC_ANALYZER_WARNING (CWE-476): [#def220]
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:301:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:280:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:285:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:294:12: branch_true: following ‘true’ branch (when ‘is_from != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:301:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:301:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:301:38: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/copy.c:301:38: danger: dereference of NULL ‘rel’
#  299|   
#  300|   		/* check read-only transaction and parallel mode */
#  301|-> 		if (XactReadOnly && !rel->rd_islocaltemp)
#  302|   			PreventCommandIfReadOnly("COPY FROM");
#  303|   

Error: CPPCHECK_WARNING (CWE-476): [#def221]
postgresql-16.8/postgresql-15.12/src/backend/commands/extension.c:310: error[ctunullpointer]: Null pointer dereference: versionname
#  308|   check_valid_version_name(const char *versionname)
#  309|   {
#  310|-> 	int			namelen = strlen(versionname);
#  311|   
#  312|   	/*

Error: CPPCHECK_WARNING (CWE-476): [#def222]
postgresql-16.8/postgresql-15.12/src/backend/commands/extension.c:310: warning[nullPointer]: Possible null pointer dereference: versionname
#  308|   check_valid_version_name(const char *versionname)
#  309|   {
#  310|-> 	int			namelen = strlen(versionname);
#  311|   
#  312|   	/*

Error: CPPCHECK_WARNING (CWE-476): [#def223]
postgresql-16.8/postgresql-15.12/src/backend/commands/extension.c:3020: warning[nullPointer]: Possible null pointer dereference: versionName
# 3018|   	 * If we're already at that version, just say so
# 3019|   	 */
# 3020|-> 	if (strcmp(oldVersionName, versionName) == 0)
# 3021|   	{
# 3022|   		ereport(NOTICE,

Error: CPPCHECK_WARNING (CWE-457): [#def224]
postgresql-16.8/postgresql-15.12/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): [#def225]
postgresql-16.8/postgresql-15.12/src/backend/commands/tablecmds.c:4893: error[negativeIndex]: Array 'tab->subcmds[11]' accessed at index -1, which is out of bounds.
# 4891|   
# 4892|   	/* Add the subcommand to the appropriate list for phase 2 */
# 4893|-> 	tab->subcmds[pass] = lappend(tab->subcmds[pass], cmd);
# 4894|   }
# 4895|   

Error: CPPCHECK_WARNING (CWE-457): [#def226]
postgresql-16.8/postgresql-15.12/src/backend/commands/tablecmds.c:12228: error[legacyUninitvar]: Uninitialized variable: contype
#12226|   	 * the dependency mechanism, so we're done here.
#12227|   	 */
#12228|-> 	if (contype != CONSTRAINT_CHECK &&
#12229|   		rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
#12230|   	{

Error: CPPCHECK_WARNING (CWE-768): [#def227]
postgresql-16.8/postgresql-15.12/src/backend/commands/tablecmds.c:13809: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(get_namespace_name((rel)->rd_rel->relnamespace)))},(union ListCell){.ptr_value=(makeString(pstrdup((rel->rd_rel->relname).data)))}' depends on order of evaluation of side effects
#13807|   		cmd->objtype = OBJECT_TABCONSTRAINT;
#13808|   		cmd->object = (Node *)
#13809|-> 			list_make3(makeString(get_namespace_name(RelationGetNamespace(rel))),
#13810|   					   makeString(pstrdup(RelationGetRelationName(rel))),
#13811|   					   makeString(pstrdup(conname)));

Error: CPPCHECK_WARNING (CWE-768): [#def228]
postgresql-16.8/postgresql-15.12/src/backend/commands/tablecmds.c:13809: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(get_namespace_name((rel)->rd_rel->relnamespace)))},(union ListCell){.ptr_value=(makeString(pstrdup((rel->rd_rel->relname).data)))},(union ListCell){.ptr_value=(makeString(pstrdup(conname)))}' depends on order of evaluation of side effects
#13807|   		cmd->objtype = OBJECT_TABCONSTRAINT;
#13808|   		cmd->object = (Node *)
#13809|-> 			list_make3(makeString(get_namespace_name(RelationGetNamespace(rel))),
#13810|   					   makeString(pstrdup(RelationGetRelationName(rel))),
#13811|   					   makeString(pstrdup(conname)));

Error: CPPCHECK_WARNING (CWE-768): [#def229]
postgresql-16.8/postgresql-15.12/src/backend/commands/tablecmds.c:13817: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeTypeNameFromNameList((__typeof__(domname))copyObjectImpl(domname)))},(union ListCell){.ptr_value=(makeString(pstrdup(conname)))}' depends on order of evaluation of side effects
#13815|   		cmd->objtype = OBJECT_DOMCONSTRAINT;
#13816|   		cmd->object = (Node *)
#13817|-> 			list_make2(makeTypeNameFromNameList(copyObject(domname)),
#13818|   					   makeString(pstrdup(conname)));
#13819|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def230]
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1761:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘val’
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1545:1: enter_function: entry to ‘deserialize_deflist’
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1571:16: branch_true: following ‘true’ branch (when ‘ptr < endptr’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1573:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1735:12: branch_true: following ‘true’ branch (when ‘state == 7’)...
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1737:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/commands/tsearchcmds.c:1739:50: call_function: calling ‘buildDefItem’ from ‘deserialize_deflist’
# 1759|   {
# 1760|   	/* If input was quoted, always emit as string */
# 1761|-> 	if (!was_quoted && val[0] != '\0')
# 1762|   	{
# 1763|   		int			v;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def231]
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:176:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:137:1: enter_function: entry to ‘ExecInitJunkFilterConversion’
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:166:12: branch_true: following ‘true’ branch (when ‘cleanLength > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:168:43: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:169:21: call_function: inlined call to ‘list_head’ from ‘ExecInitJunkFilterConversion’
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:170:29: branch_true: following ‘true’ branch (when ‘i < cleanLength’)...
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:172:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/execJunk.c:172:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def232]
postgresql-16.8/postgresql-15.12/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): [#def233]
postgresql-16.8/postgresql-15.12/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): [#def234]
postgresql-16.8/postgresql-15.12/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): [#def235]
postgresql-16.8/postgresql-15.12/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): [#def236]
postgresql-16.8/postgresql-15.12/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): [#def237]
postgresql-16.8/postgresql-15.12/src/backend/executor/execScan.c:338: error[legacyUninitvar]: Uninitialized variable: relids
#  336|   					 (int) nodeTag(node->ps.plan));
#  337|   
#  338|-> 			while ((rtindex = bms_next_member(relids, rtindex)) >= 0)
#  339|   			{
#  340|   				Assert(rtindex > 0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def238]
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2285:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘isnull’
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2303:1: enter_function: entry to ‘do_text_output_multiline’
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2308:16: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2313:23: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2314:20: branch_false: following ‘false’ branch (when ‘eol’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2321:31: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/execTuples.c:2326:17: call_function: calling ‘do_tup_output’ from ‘do_text_output_multiline’
# 2283|   	/* insert data */
# 2284|   	memcpy(slot->tts_values, values, natts * sizeof(Datum));
# 2285|-> 	memcpy(slot->tts_isnull, isnull, natts * sizeof(bool));
# 2286|   
# 2287|   	/* mark slot as containing a virtual tuple */

Error: CPPCHECK_WARNING (CWE-457): [#def239]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeAppend.c:1063: warning[uninitvar]: Uninitialized variable: noccurred
# 1061|   	}
# 1062|   	PG_END_TRY();
# 1063|-> 	if (noccurred == 0)
# 1064|   		return;
# 1065|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def240]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:1352:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:3377:1: enter_function: entry to ‘ExecParallelHashTuplePrealloc’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:3390:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:3395:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:3396:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:3397:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeHash.c:3397:25: call_function: calling ‘ExecParallelHashIncreaseNumBatches’ from ‘ExecParallelHashTuplePrealloc’
# 1350|   											   HJTUPLE_OVERHEAD + tuple->t_len,
# 1351|   											   &shared);
# 1352|-> 				copyTuple->hashvalue = hashTuple->hashvalue;
# 1353|   				memcpy(HJTUPLE_MINTUPLE(copyTuple), tuple, tuple->t_len);
# 1354|   				ExecParallelHashPushTuple(&hashtable->buckets.shared[bucketno],

Error: GCC_ANALYZER_WARNING (CWE-476): [#def241]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1229:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1194:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1210:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1216:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1229:31: danger: dereference of NULL ‘leftop’
# 1227|   			Assert(leftop != NULL);
# 1228|   
# 1229|-> 			if (!(IsA(leftop, Var) &&
# 1230|   				  ((Var *) leftop)->varno == INDEX_VAR))
# 1231|   				elog(ERROR, "indexqual doesn't have key on left side");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def242]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1261:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1154:1: enter_function: entry to ‘ExecIndexBuildScanKeys’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1194:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1210:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1216:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1222:43: call_function: inlined call to ‘get_leftop’ from ‘ExecIndexBuildScanKeys’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1224:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1224:39: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1229:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1230:35: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1229:29: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1233:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1234:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1261:29: danger: dereference of NULL ‘rightop’
# 1259|   			Assert(rightop != NULL);
# 1260|   
# 1261|-> 			if (IsA(rightop, Const))
# 1262|   			{
# 1263|   				/* OK, simple constant comparison value */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def243]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1470:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1194:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1210:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1307:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1307:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1447:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1447:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1457:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1465:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1470:31: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1470:31: danger: dereference of NULL ‘leftop’
# 1468|   			Assert(leftop != NULL);
# 1469|   
# 1470|-> 			if (!(IsA(leftop, Var) &&
# 1471|   				  ((Var *) leftop)->varno == INDEX_VAR))
# 1472|   				elog(ERROR, "indexqual doesn't have key on left side");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def244]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1503:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1194:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1210:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1307:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1307:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1447:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1447:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1457:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1465:28: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1465:39: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1470:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1471:35: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1470:29: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1474:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1475:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1494:28: branch_false: following ‘false’ branch (when ‘rightop’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1499:29: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1499:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1503:37: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1503:37: danger: dereference of NULL ‘rightop’
# 1501|   				/* Index AM will handle this like a simple operator */
# 1502|   				flags |= SK_SEARCHARRAY;
# 1503|-> 				if (IsA(rightop, Const))
# 1504|   				{
# 1505|   					/* OK, simple constant comparison value */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def245]
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1584:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1194:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1210:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1307:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1307:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1447:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1447:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1566:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1566:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1577:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1579:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1584:31: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/executor/nodeIndexscan.c:1584:31: danger: dereference of NULL ‘leftop’
# 1582|   			Assert(leftop != NULL);
# 1583|   
# 1584|-> 			if (!(IsA(leftop, Var) &&
# 1585|   				  ((Var *) leftop)->varno == INDEX_VAR))
# 1586|   				elog(ERROR, "NullTest indexqual has wrong key");

Error: CPPCHECK_WARNING (CWE-457): [#def246]
postgresql-16.8/postgresql-15.12/src/backend/lib/dshash.c:971: error[uninitvar]: Uninitialized variable: *bucket_head
#  969|   		dshash_table_item *item;
#  970|   
#  971|-> 		item = dsa_get_address(hash_table->area, *bucket_head);
#  972|   
#  973|   		if (equal_keys(hash_table, key, ENTRY_FROM_ITEM(item)))

Error: CPPCHECK_WARNING (CWE-457): [#def247]
postgresql-16.8/postgresql-15.12/src/backend/lib/dshash.c:1000: error[uninitvar]: Uninitialized variable: *bucket_head
#  998|   		dshash_table_item *bucket_item;
#  999|   
# 1000|-> 		bucket_item = dsa_get_address(hash_table->area, *bucket_head);
# 1001|   
# 1002|   		if (bucket_item == item)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def248]
postgresql-16.8/postgresql-15.12/src/backend/lib/pairingheap.c:275:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pairs’
postgresql-16.8/postgresql-15.12/src/backend/lib/pairingheap.c:251:20: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/lib/pairingheap.c:275:9: branch_true: ...to here
postgresql-16.8/postgresql-15.12/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): [#def249]
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2903:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2908:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2920:13: call_function: inlined call to ‘list_length’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2920:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2927:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2927:13: call_function: inlined call to ‘list_length’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2927:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2935:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2935:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2935:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2937:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2937:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2938:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2941:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2941:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2952:29: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2952:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2953:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2954:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2954:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2955:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2955:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2957:47: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2957:47: call_function: calling ‘PerformRadiusTransaction’ from ‘CheckRADIUSAuth’
# 2901|   	attr->attribute = type;
# 2902|   	attr->length = len + 2;		/* total size includes type and length */
# 2903|-> 	memcpy(attr->data, data, len);
# 2904|   	packet->length += attr->length;
# 2905|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def250]
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2958:100: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘secrets’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2908:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2920:13: call_function: inlined call to ‘list_length’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2920:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2927:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2927:13: call_function: inlined call to ‘list_length’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2927:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2935:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2935:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2935:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2937:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2937:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2938:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2941:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2941:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2952:29: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2952:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2953:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2953:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2954:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2954:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2955:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2955:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2957:47: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:2958:100: danger: dereference of NULL ‘secrets’
# 2956|   	{
# 2957|   		int			ret = PerformRadiusTransaction(lfirst(server),
# 2958|-> 												   lfirst(secrets),
# 2959|   												   radiusports ? lfirst(radiusports) : NULL,
# 2960|   												   identifiers ? lfirst(identifiers) : NULL,

Error: CPPCHECK_WARNING (CWE-457): [#def251]
postgresql-16.8/postgresql-15.12/src/backend/libpq/auth.c:3119: warning[uninitvar]: Uninitialized variable: encryptedpassword
# 3117|   	pfree(cryptvector);
# 3118|   
# 3119|-> 	radius_add_attribute(packet, RADIUS_PASSWORD, encryptedpassword, encryptedpasswordlen);
# 3120|   
# 3121|   	/* Length needs to be in network order on the wire */

Error: CPPCHECK_WARNING (CWE-457): [#def252]
postgresql-16.8/postgresql-15.12/src/backend/libpq/be-fsstubs.c:503: warning[uninitvar]: Uninitialized variable: fd
#  501|   	}
#  502|   	PG_END_TRY();
#  503|-> 	if (fd < 0)
#  504|   		ereport(ERROR,
#  505|   				(errcode_for_file_access(),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def253]
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:960:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2207:1: enter_function: entry to ‘load_hba’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2219:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2228:19: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2228:19: call_function: calling ‘tokenize_auth_file’ from ‘load_hba’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2228:19: return_function: returning to ‘load_hba’ from ‘tokenize_auth_file’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2237:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2243:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2249:32: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2249:32: call_function: calling ‘parse_hba_line’ from ‘load_hba’
#  958|   	Assert(tok_line->fields != NIL);
#  959|   	field = list_head(tok_line->fields);
#  960|-> 	tokens = lfirst(field);
#  961|   	if (tokens->length > 1)
#  962|   	{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def254]
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2331:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2315:1: enter_function: entry to ‘parse_ident_line’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2325:17: call_function: inlined call to ‘list_head’ from ‘parse_ident_line’
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2327:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/libpq/hba.c:2331:9: danger: dereference of NULL ‘<unknown>’
# 2329|   
# 2330|   	/* Get the map token (must exist) */
# 2331|-> 	tokens = lfirst(field);
# 2332|   	IDENT_MULTI_VALUE(tokens);
# 2333|   	token = linitial(tokens);

Error: CPPCHECK_WARNING (CWE-768): [#def255]
postgresql-16.8/postgresql-15.12/src/backend/nodes/makefuncs.c:623: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},(union ListCell){.ptr_value=(rightop)}' depends on order of evaluation of side effects
#  621|   	expr->inputcollid = inputcollid;
#  622|   	if (rightop)
#  623|-> 		expr->args = list_make2(leftop, rightop);
#  624|   	else
#  625|   		expr->args = list_make1(leftop);

Error: CPPCHECK_WARNING (CWE-768): [#def256]
postgresql-16.8/postgresql-15.12/src/backend/nodes/makefuncs.c:695: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(qual1)},(union ListCell){.ptr_value=(qual2)}' depends on order of evaluation of side effects
#  693|   	if (qual2 == NULL)
#  694|   		return qual1;
#  695|-> 	return (Node *) make_andclause(list_make2(qual1, qual2));
#  696|   }
#  697|   

Error: CPPCHECK_WARNING (CWE-768): [#def257]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/indxpath.c:3272: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(rightop)},(union ListCell){.ptr_value=(leftop)}' depends on order of evaluation of side effects
# 3270|   		newclause->opno = expr_op;
# 3271|   		newclause->opfuncid = InvalidOid;
# 3272|-> 		newclause->args = list_make2(rightop, leftop);
# 3273|   
# 3274|   		clause = (Expr *) newclause;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def258]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1431:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr1’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1358:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1374:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1384:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1402:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1402:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1405:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1416:29: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1429:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1429:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1431:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1431:25: danger: dereference of NULL ‘lcr1’
# 1429|   		if (joinrel->partbounds_merged)
# 1430|   		{
# 1431|-> 			child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1432|   			child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1433|   			lcr1 = lnext(parts1, lcr1);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def259]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1432:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr2’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1358:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1374:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1384:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1402:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1402:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1405:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1407:24: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1407:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1408:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1416:29: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1429:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1429:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1431:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/joinrels.c:1432:25: danger: dereference of NULL ‘lcr2’
# 1430|   		{
# 1431|   			child_rel1 = lfirst_node(RelOptInfo, lcr1);
# 1432|-> 			child_rel2 = lfirst_node(RelOptInfo, lcr2);
# 1433|   			lcr1 = lnext(parts1, lcr1);
# 1434|   			lcr2 = lnext(parts2, lcr2);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def260]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/pathkeys.c:137:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘new_pathkey’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/pathkeys.c:1125:1: enter_function: entry to ‘make_pathkeys_for_sortclauses’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/pathkeys.c:1132:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/pathkeys.c:1140:27: call_function: calling ‘make_pathkey_from_sortop’ from ‘make_pathkeys_for_sortclauses’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/pathkeys.c:1140:27: return_function: returning to ‘make_pathkeys_for_sortclauses’ from ‘make_pathkey_from_sortop’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/path/pathkeys.c:1149:22: call_function: calling ‘pathkey_is_redundant’ from ‘make_pathkeys_for_sortclauses’
#  135|   pathkey_is_redundant(PathKey *new_pathkey, List *pathkeys)
#  136|   {
#  137|-> 	EquivalenceClass *new_ec = new_pathkey->pk_eclass;
#  138|   	ListCell   *lc;
#  139|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def261]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/analyzejoins.c:899:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/analyzejoins.c:1079:1: enter_function: entry to ‘is_innerrel_unique_for’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/analyzejoins.c:1126:16: call_function: calling ‘rel_is_distinct_for’ from ‘is_innerrel_unique_for’
#  897|   				/* non-resjunk columns should have grouping clauses */
#  898|   				Assert(lg != NULL);
#  899|-> 				sgc = (SortGroupClause *) lfirst(lg);
#  900|   				lg = lnext(topop->groupClauses, lg);
#  901|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def262]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5062:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5051:1: enter_function: entry to ‘fix_indexqual_clause’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5060:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5060:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-16.8/postgresql-15.12/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): [#def263]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5131:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:4981:1: enter_function: entry to ‘fix_indexqual_references’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:4991:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:4997:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5003:34: call_function: calling ‘fix_indexqual_clause’ from ‘fix_indexqual_references’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:5003:34: return_function: returning to ‘fix_indexqual_references’ from ‘fix_indexqual_clause’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/createplan.c:4997:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/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: CPPCHECK_WARNING (CWE-768): [#def264]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1035: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftjoinlist)},(union ListCell){.ptr_value=(rightjoinlist)}' depends on order of evaluation of side effects
# 1033|   		{
# 1034|   			/* force the join order exactly at this node */
# 1035|-> 			joinlist = list_make1(list_make2(leftjoinlist, rightjoinlist));
# 1036|   		}
# 1037|   		else if (list_length(leftjoinlist) + list_length(rightjoinlist) <=

Error: CPPCHECK_WARNING (CWE-768): [#def265]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1058: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftpart)},(union ListCell){.ptr_value=(rightpart)}' depends on order of evaluation of side effects
# 1056|   			else
# 1057|   				rightpart = (Node *) rightjoinlist;
# 1058|-> 			joinlist = list_make2(leftpart, rightpart);
# 1059|   		}
# 1060|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def266]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1648:40: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘postponed_qual_list’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1084:1: enter_function: entry to ‘process_security_barrier_quals’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1098:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1103:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/initsplan.c:1113:25: call_function: calling ‘distribute_qual_to_rels’ from ‘process_security_barrier_quals’
# 1646|   		pq->qual = clause;
# 1647|   		pq->relids = relids;
# 1648|-> 		*postponed_qual_list = lappend(*postponed_qual_list, pq);
# 1649|   		return;
# 1650|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def267]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:3673:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partially_grouped_rel’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:7306:1: enter_function: entry to ‘create_partitionwise_grouping_paths’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:7327:16: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:7329:47: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:7340:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:7343:32: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/planner.c:7386:17: call_function: calling ‘create_ordinary_grouping_paths’ from ‘create_partitionwise_grouping_paths’
# 3671|   		Assert(partially_grouped_rel);
# 3672|   
# 3673|-> 		if (partially_grouped_rel->pathlist)
# 3674|   			set_cheapest(partially_grouped_rel);
# 3675|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def268]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/setrefs.c:1920:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*root.grouping_map’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/setrefs.c:3323:1: enter_function: entry to ‘extract_query_dependencies’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/setrefs.c:3343:16: call_function: calling ‘extract_query_dependencies_walker’ from ‘extract_query_dependencies’
# 1918|   	{
# 1919|   		GroupingFunc *g = (GroupingFunc *) node;
# 1920|-> 		AttrNumber *grouping_map = root->grouping_map;
# 1921|   
# 1922|   		/* If there are no grouping sets, we don't need this. */

Error: CPPCHECK_WARNING (CWE-476): [#def269]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/plan/setrefs.c:2016: warning[nullPointer]: Possible null pointer dereference: bestplan
# 2014|   
# 2015|   	/* Mark the subplan we selected */
# 2016|-> 	root->isUsedSubplan[bestplan->plan_id - 1] = true;
# 2017|   
# 2018|   	return (Node *) bestplan;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def270]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:120:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘target_rte’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:79:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:104:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:105:12: branch_false: following ‘false’ branch (when ‘command_type != 3’)...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:107:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:107:17: branch_false: following ‘false’ branch (when ‘command_type != 2’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:120:18: danger: dereference of NULL ‘target_rte’
#  118|   	if ((command_type == CMD_UPDATE || command_type == CMD_DELETE ||
#  119|   		 command_type == CMD_MERGE) &&
#  120|-> 		!target_rte->inh)
#  121|   	{
#  122|   		/* row-identity logic expects to add stuff to processed_tlist */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def271]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:373:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:63:1: enter_function: entry to ‘preprocess_targetlist’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:79:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:104:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:105:12: branch_true: following ‘true’ branch (when ‘command_type == 3’)...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:106:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/preptlist.c:106:25: call_function: calling ‘expand_insert_targetlist’ from ‘preprocess_targetlist’
#  371|   	 * sure we have all the user attributes in the right order.
#  372|   	 */
#  373|-> 	numattrs = RelationGetNumberOfAttributes(rel);
#  374|   
#  375|   	for (attrno = 1; attrno <= numattrs; attrno++)

Error: CPPCHECK_WARNING (CWE-768): [#def272]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:482: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lpath_tlist)},(union ListCell){.ptr_value=(rpath_tlist)}' depends on order of evaluation of side effects
#  480|   	 */
#  481|   	tlist = generate_append_tlist(setOp->colTypes, setOp->colCollations, false,
#  482|-> 								  list_make2(lpath_tlist, rpath_tlist),
#  483|   								  refnames_tlist);
#  484|   

Error: CPPCHECK_WARNING (CWE-768): [#def273]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:757: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lpath)},(union ListCell){.ptr_value=(rpath)}' depends on order of evaluation of side effects
#  755|   	if (op->op == SETOP_EXCEPT || dLeftGroups <= dRightGroups)
#  756|   	{
#  757|-> 		pathlist = list_make2(lpath, rpath);
#  758|   		tlist_list = list_make2(lpath_tlist, rpath_tlist);
#  759|   		firstFlag = 0;

Error: CPPCHECK_WARNING (CWE-768): [#def274]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:758: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lpath_tlist)},(union ListCell){.ptr_value=(rpath_tlist)}' depends on order of evaluation of side effects
#  756|   	{
#  757|   		pathlist = list_make2(lpath, rpath);
#  758|-> 		tlist_list = list_make2(lpath_tlist, rpath_tlist);
#  759|   		firstFlag = 0;
#  760|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def275]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:763: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(rpath)},(union ListCell){.ptr_value=(lpath)}' depends on order of evaluation of side effects
#  761|   	else
#  762|   	{
#  763|-> 		pathlist = list_make2(rpath, lpath);
#  764|   		tlist_list = list_make2(rpath_tlist, lpath_tlist);
#  765|   		firstFlag = 1;

Error: CPPCHECK_WARNING (CWE-768): [#def276]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:764: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(rpath_tlist)},(union ListCell){.ptr_value=(lpath_tlist)}' depends on order of evaluation of side effects
#  762|   	{
#  763|   		pathlist = list_make2(rpath, lpath);
#  764|-> 		tlist_list = list_make2(rpath_tlist, lpath_tlist);
#  765|   		firstFlag = 1;
#  766|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def277]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1297:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘curColType’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1259:1: enter_function: entry to ‘generate_append_tlist’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1283:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1288:30: call_function: inlined call to ‘list_head’ from ‘generate_append_tlist’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1290:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1290:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1294:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1297:47: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1297:64: danger: dereference of NULL ‘curColType’
# 1295|   				continue;
# 1296|   			Assert(curColType != NULL);
# 1297|-> 			if (exprType((Node *) subtle->expr) == lfirst_oid(curColType))
# 1298|   			{
# 1299|   				/* If first subplan, copy the typmod; else compare */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def278]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1411:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1387:1: enter_function: entry to ‘generate_setop_grouplist’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1393:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_grouplist’
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1394:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1394:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1399:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1411:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/optimizer/prep/prepunion.c:1411:17: danger: dereference of NULL ‘lg’
# 1409|   		/* non-resjunk columns should have grouping clauses */
# 1410|   		Assert(lg != NULL);
# 1411|-> 		sgc = (SortGroupClause *) lfirst(lg);
# 1412|   		lg = lnext(grouplist, lg);
# 1413|   		Assert(sgc->tleSortGroupRef == 0);

Error: CPPCHECK_WARNING (CWE-768): [#def279]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/util/relnode.c:2025: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(larg)},(union ListCell){.ptr_value=(rarg)}' depends on order of evaluation of side effects
# 2023|   						c->coalescetype = exprType(larg);
# 2024|   						c->coalescecollid = exprCollation(larg);
# 2025|-> 						c->args = list_make2(larg, rarg);
# 2026|   						c->location = -1;
# 2027|   						nullable_partexpr = lappend(nullable_partexpr, c);

Error: CPPCHECK_WARNING (CWE-768): [#def280]
postgresql-16.8/postgresql-15.12/src/backend/optimizer/util/restrictinfo.c:342: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=((list_nth_cell(clause->args,1)->ptr_value))}),((union ListCell){.ptr_value=((list_nth_cell(clause->args,0)->ptr_value))})' depends on order of evaluation of side effects
#  340|   	newclause->opno = comm_op;
#  341|   	newclause->opfuncid = InvalidOid;
#  342|-> 	newclause->args = list_make2(lsecond(clause->args),
#  343|   								 linitial(clause->args));
#  344|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def281]
postgresql-16.8/postgresql-15.12/src/backend/parser/../../../src/include/nodes/pg_list.h:260:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘expanded_groups’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_agg.c:1795:1: enter_function: entry to ‘expand_grouping_sets’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_agg.c:1802:12: branch_false: following ‘false’ branch (when ‘groupingSets’ is non-NULL)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_agg.c:1805:9: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_agg.c:1828:9: call_function: inlined call to ‘list_nth_cell’ from ‘expand_grouping_sets’
#  258|   	Assert(list != NIL);
#  259|   	Assert(n >= 0 && n < list->length);
#  260|-> 	return &list->elements[n];
#  261|   }
#  262|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def282]
postgresql-16.8/postgresql-15.12/src/backend/parser/../../../src/include/nodes/pg_list.h:260:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fargs’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:90:1: enter_function: entry to ‘ParseFuncOrColumn’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:94:33: branch_true: following ‘true’ branch (when ‘fn’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:94:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:124:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:135:13: call_function: inlined call to ‘list_length’ from ‘ParseFuncOrColumn’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:135:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:155:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:179:9: branch_false: following ‘false’ branch (when ‘fargs’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:210:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:210:12: branch_false: following ‘false’ branch (when ‘fargs’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:223:32: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:266:20: call_function: calling ‘func_get_detail’ from ‘ParseFuncOrColumn’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:266:20: return_function: returning to ‘ParseFuncOrColumn’ from ‘func_get_detail’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:294:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:304:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:358:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:367:23: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:368:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:370:49: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:376:20: branch_true: following ‘true’ branch (when ‘aggkind != 110’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:381:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:381:28: branch_true: following ‘true’ branch (when ‘agg_within_group != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:387:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:387:28: branch_false: following ‘false’ branch (when ‘over’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:407:45: call_function: inlined call to ‘list_length’ from ‘ParseFuncOrColumn’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:414:36: branch_false: following ‘false’ branch (when ‘catDirectArgs == numDirectArgs’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:504:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:504:28: branch_true: following ‘true’ branch (when ‘aggkind == 104’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:505:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:505:33: call_function: calling ‘unify_hypothetical_args’ from ‘ParseFuncOrColumn’
#  258|   	Assert(list != NIL);
#  259|   	Assert(n >= 0 && n < list->length);
#  260|-> 	return &list->elements[n];
#  261|   }
#  262|   

Error: CPPCHECK_WARNING (CWE-768): [#def283]
postgresql-16.8/postgresql-15.12/src/backend/parser/analyze.c:2195: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lcolnode)},(union ListCell){.ptr_value=(rcolnode)}' depends on order of evaluation of side effects
# 2193|   			/* select common type, same as CASE et al */
# 2194|   			rescoltype = select_common_type(pstate,
# 2195|-> 											list_make2(lcolnode, rcolnode),
# 2196|   											context,
# 2197|   											&bestexpr);

Error: CPPCHECK_WARNING (CWE-768): [#def284]
postgresql-16.8/postgresql-15.12/src/backend/parser/analyze.c:2250: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lcolnode)},(union ListCell){.ptr_value=(rcolnode)}' depends on order of evaluation of side effects
# 2248|   
# 2249|   			rescoltypmod = select_common_typmod(pstate,
# 2250|-> 												list_make2(lcolnode, rcolnode),
# 2251|   												rescoltype);
# 2252|   

Error: CPPCHECK_WARNING (CWE-768): [#def285]
postgresql-16.8/postgresql-15.12/src/backend/parser/analyze.c:2263: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lcolnode)},(union ListCell){.ptr_value=(rcolnode)}' depends on order of evaluation of side effects
# 2261|   			 */
# 2262|   			rescolcoll = select_common_collation(pstate,
# 2263|-> 												 list_make2(lcolnode, rcolnode),
# 2264|   												 (op->op == SETOP_UNION && op->all));
# 2265|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def286]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:28030:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:27985:6: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:27991:34: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:28017:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:28019:7: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:28028:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:28030:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.c:28030:9: danger: use of uninitialized value ‘yyss’ here
#28028|           if (! yyptr)
#28029|             goto yyexhaustedlab;
#28030|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#28031|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#28032|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: CPPCHECK_WARNING (CWE-768): [#def287]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:1790: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(0x7FFF,-1))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-2].ival,yylsp[-2]))})' depends on order of evaluation of side effects
# 1788|   					TypeName   *t = $1;
# 1789|   
# 1790|-> 					t->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1),
# 1791|   											makeIntConst($3, @3));
# 1792|   					$$ = makeStringConstCast($5, @5, t);

Error: CPPCHECK_WARNING (CWE-768): [#def288]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:4194: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].ielem)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
# 4192|   ExclusionConstraintElem: index_elem WITH any_operator
# 4193|   			{
# 4194|-> 				$$ = list_make2($1, $3);
# 4195|   			}
# 4196|   			/* allow OPERATOR() decoration for the benefit of ruleutils.c */

Error: CPPCHECK_WARNING (CWE-768): [#def289]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:4199: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-5].ielem)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
# 4197|   			| index_elem WITH OPERATOR '(' any_operator ')'
# 4198|   			{
# 4199|-> 				$$ = list_make2($1, $5);
# 4200|   			}
# 4201|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def290]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5064: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(yyvsp[-1].typnam)}' depends on order of evaluation of side effects
# 5062|   					n->action = $4;
# 5063|   					n->objtype = OBJECT_CAST;
# 5064|-> 					n->object = (Node *) list_make2($7, $9);
# 5065|   					$$ = (Node *) n;
# 5066|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def291]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5144: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].typnam)},(union ListCell){.ptr_value=(makeString(yyvsp[0].str))}' depends on order of evaluation of side effects
# 5142|   					n->action = $4;
# 5143|   					n->objtype = OBJECT_TRANSFORM;
# 5144|-> 					n->object = (Node *) list_make2($7, makeString($9));
# 5145|   					$$ = (Node *) n;
# 5146|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def292]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5810: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(events1|events2))},((union ListCell){.ptr_value=(list_concat(columns1,columns2))})' depends on order of evaluation of side effects
# 5808|   					 * should just ignore the columns for non-UPDATE events.
# 5809|   					 */
# 5810|-> 					$$ = list_make2(makeInteger(events1 | events2),
# 5811|   									list_concat(columns1, columns2));
# 5812|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def293]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5817: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<2))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5815|   TriggerOneEvent:
# 5816|   			INSERT
# 5817|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); }
# 5818|   			| DELETE_P
# 5819|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); }

Error: CPPCHECK_WARNING (CWE-768): [#def294]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5819: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<3))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5817|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); }
# 5818|   			| DELETE_P
# 5819|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); }
# 5820|   			| UPDATE
# 5821|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); }

Error: CPPCHECK_WARNING (CWE-768): [#def295]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5821: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<4))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5819|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); }
# 5820|   			| UPDATE
# 5821|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); }
# 5822|   			| UPDATE OF columnList
# 5823|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), $3); }

Error: CPPCHECK_WARNING (CWE-768): [#def296]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5823: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<4))},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
# 5821|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); }
# 5822|   			| UPDATE OF columnList
# 5823|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), $3); }
# 5824|   			| TRUNCATE
# 5825|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); }

Error: CPPCHECK_WARNING (CWE-768): [#def297]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:5825: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<5))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5823|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), $3); }
# 5824|   			| TRUNCATE
# 5825|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); }
# 5826|   		;
# 5827|   

Error: CPPCHECK_WARNING (CWE-768): [#def298]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:6944: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeTypeNameFromNameList(yyvsp[-2].list))},(union ListCell){.ptr_value=(makeString(yyvsp[-5].str))}' depends on order of evaluation of side effects
# 6942|   					 * up here.
# 6943|   					 */
# 6944|-> 					n->object = (Node *) list_make2(makeTypeNameFromNameList($7), makeString($4));
# 6945|   					n->comment = $9;
# 6946|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def299]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:6980: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].typnam)},(union ListCell){.ptr_value=(makeString(yyvsp[-2].str))}' depends on order of evaluation of side effects
# 6978|   
# 6979|   					n->objtype = OBJECT_TRANSFORM;
# 6980|-> 					n->object = (Node *) list_make2($5, makeString($7));
# 6981|   					n->comment = $9;
# 6982|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def300]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:7016: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-5].typnam)},(union ListCell){.ptr_value=(yyvsp[-3].typnam)}' depends on order of evaluation of side effects
# 7014|   
# 7015|   					n->objtype = OBJECT_CAST;
# 7016|-> 					n->object = (Node *) list_make2($5, $7);
# 7017|   					n->comment = $10;
# 7018|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def301]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8352: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((struct List*)NULL)},(union ListCell){.ptr_value=(makeInteger(-1))}' depends on order of evaluation of side effects
# 8350|   aggr_args:	'(' '*' ')'
# 8351|   				{
# 8352|-> 					$$ = list_make2(NIL, makeInteger(-1));
# 8353|   				}
# 8354|   			| '(' aggr_args_list ')'

Error: CPPCHECK_WARNING (CWE-768): [#def302]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8356: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].list)},(union ListCell){.ptr_value=(makeInteger(-1))}' depends on order of evaluation of side effects
# 8354|   			| '(' aggr_args_list ')'
# 8355|   				{
# 8356|-> 					$$ = list_make2($2, makeInteger(-1));
# 8357|   				}
# 8358|   			| '(' ORDER BY aggr_args_list ')'

Error: CPPCHECK_WARNING (CWE-768): [#def303]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8360: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].list)},(union ListCell){.ptr_value=(makeInteger(0))}' depends on order of evaluation of side effects
# 8358|   			| '(' ORDER BY aggr_args_list ')'
# 8359|   				{
# 8360|-> 					$$ = list_make2($4, makeInteger(0));
# 8361|   				}
# 8362|   			| '(' aggr_args_list ORDER BY aggr_args_list ')'

Error: CPPCHECK_WARNING (CWE-768): [#def304]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8504: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(yyvsp[-2].str))},(union ListCell){.ptr_value=(makeString(yyvsp[0].str))}' depends on order of evaluation of side effects
# 8502|   			| Sconst ',' Sconst
# 8503|   				{
# 8504|-> 					$$ = list_make2(makeString($1), makeString($3));
# 8505|   				}
# 8506|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def305]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8783: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(yyvsp[-1].typnam)}' depends on order of evaluation of side effects
# 8781|   				}
# 8782|   			| '(' Typename ',' Typename ')'
# 8783|-> 					{ $$ = list_make2($2, $4); }
# 8784|   			| '(' NONE ',' Typename ')'					/* left unary */
# 8785|   					{ $$ = list_make2(NULL, $4); }

Error: CPPCHECK_WARNING (CWE-768): [#def306]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8785: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=(yyvsp[-1].typnam)}' depends on order of evaluation of side effects
# 8783|   					{ $$ = list_make2($2, $4); }
# 8784|   			| '(' NONE ',' Typename ')'					/* left unary */
# 8785|-> 					{ $$ = list_make2(NULL, $4); }
# 8786|   			| '(' Typename ',' NONE ')'					/* right unary */
# 8787|   					{ $$ = list_make2($2, NULL); }

Error: CPPCHECK_WARNING (CWE-768): [#def307]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8787: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(NULL)}' depends on order of evaluation of side effects
# 8785|   					{ $$ = list_make2(NULL, $4); }
# 8786|   			| '(' Typename ',' NONE ')'					/* right unary */
# 8787|-> 					{ $$ = list_make2($2, NULL); }
# 8788|   		;
# 8789|   

Error: CPPCHECK_WARNING (CWE-768): [#def308]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8903: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].typnam)},(union ListCell){.ptr_value=(yyvsp[-2].typnam)}' depends on order of evaluation of side effects
# 8901|   
# 8902|   					n->removeType = OBJECT_CAST;
# 8903|-> 					n->objects = list_make1(list_make2($5, $7));
# 8904|   					n->behavior = $9;
# 8905|   					n->missing_ok = $3;

Error: CPPCHECK_WARNING (CWE-768): [#def309]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8937: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].objwithargs)},(union ListCell){.ptr_value=(yyvsp[0].objwithargs)}' depends on order of evaluation of side effects
# 8935|   transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes ',' TO SQL_P WITH FUNCTION function_with_argtypes
# 8936|   				{
# 8937|-> 					$$ = list_make2($5, $11);
# 8938|   				}
# 8939|   				| TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes

Error: CPPCHECK_WARNING (CWE-768): [#def310]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8941: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].objwithargs)},(union ListCell){.ptr_value=(yyvsp[-6].objwithargs)}' depends on order of evaluation of side effects
# 8939|   				| TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes
# 8940|   				{
# 8941|-> 					$$ = list_make2($11, $5);
# 8942|   				}
# 8943|   				| FROM SQL_P WITH FUNCTION function_with_argtypes

Error: CPPCHECK_WARNING (CWE-768): [#def311]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8945: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].objwithargs)},(union ListCell){.ptr_value=(NULL)}' depends on order of evaluation of side effects
# 8943|   				| FROM SQL_P WITH FUNCTION function_with_argtypes
# 8944|   				{
# 8945|-> 					$$ = list_make2($5, NULL);
# 8946|   				}
# 8947|   				| TO SQL_P WITH FUNCTION function_with_argtypes

Error: CPPCHECK_WARNING (CWE-768): [#def312]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8949: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=(yyvsp[0].objwithargs)}' depends on order of evaluation of side effects
# 8947|   				| TO SQL_P WITH FUNCTION function_with_argtypes
# 8948|   				{
# 8949|-> 					$$ = list_make2(NULL, $5);
# 8950|   				}
# 8951|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def313]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:8959: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(makeString(yyvsp[-1].str))}' depends on order of evaluation of side effects
# 8957|   
# 8958|   					n->removeType = OBJECT_TRANSFORM;
# 8959|-> 					n->objects = list_make1(list_make2($5, makeString($7)));
# 8960|   					n->behavior = $8;
# 8961|   					n->missing_ok = $3;

Error: CPPCHECK_WARNING (CWE-768): [#def314]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:11430: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].list)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
#11428|   					n->cfgname = $5;
#11429|   					n->tokentype = NIL;
#11430|-> 					n->dicts = list_make2($9,$11);
#11431|   					n->override = false;
#11432|   					n->replace = true;

Error: CPPCHECK_WARNING (CWE-768): [#def315]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:11442: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].list)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
#11440|   					n->cfgname = $5;
#11441|   					n->tokentype = $9;
#11442|-> 					n->dicts = list_make2($11,$13);
#11443|   					n->override = false;
#11444|   					n->replace = true;

Error: CPPCHECK_WARNING (CWE-768): [#def316]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13469: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].alias)},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
#13467|   			alias_clause
#13468|   				{
#13469|-> 					$$ = list_make2($1, NIL);
#13470|   				}
#13471|   			| AS '(' TableFuncElementList ')'

Error: CPPCHECK_WARNING (CWE-768): [#def317]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13473: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
#13471|   			| AS '(' TableFuncElementList ')'
#13472|   				{
#13473|-> 					$$ = list_make2(NULL, $3);
#13474|   				}
#13475|   			| AS ColId '(' TableFuncElementList ')'

Error: CPPCHECK_WARNING (CWE-768): [#def318]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13480: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(a)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
#13478|   
#13479|   					a->aliasname = $2;
#13480|-> 					$$ = list_make2(a, $4);
#13481|   				}
#13482|   			| ColId '(' TableFuncElementList ')'

Error: CPPCHECK_WARNING (CWE-768): [#def319]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13487: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(a)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
#13485|   
#13486|   					a->aliasname = $1;
#13487|-> 					$$ = list_make2(a, $3);
#13488|   				}
#13489|   			| /*EMPTY*/

Error: CPPCHECK_WARNING (CWE-768): [#def320]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13491: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
#13489|   			| /*EMPTY*/
#13490|   				{
#13491|-> 					$$ = list_make2(NULL, NIL);
#13492|   				}
#13493|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def321]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13520: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].list)},(union ListCell){.ptr_value=(yyvsp[0].alias)}' depends on order of evaluation of side effects
#13518|   join_qual: USING '(' name_list ')' opt_alias_clause_for_join_using
#13519|   				{
#13520|-> 					$$ = (Node *) list_make2($3, $5);
#13521|   				}
#13522|   			| ON a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def322]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13646: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].node)},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
#13644|   					n->ordinality = $2;
#13645|   					n->is_rowsfrom = false;
#13646|-> 					n->functions = list_make1(list_make2($1, NIL));
#13647|   					/* alias and coldeflist are set by table_ref production */
#13648|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def323]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13664: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].node)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
#13662|   
#13663|   rowsfrom_item: func_expr_windowless opt_col_def_list
#13664|-> 				{ $$ = list_make2($1, $2); }
#13665|   		;
#13666|   

Error: CPPCHECK_WARNING (CWE-768): [#def324]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:13970: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(0x7FFF,-1))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-1].ival,yylsp[-1]))})' depends on order of evaluation of side effects
#13968|   				{
#13969|   					$$ = $1;
#13970|-> 					$$->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1),
#13971|   											 makeIntConst($3, @3));
#13972|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def325]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14354: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(1<<12,yylsp[-3]))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-1].ival,yylsp[-1]))})' depends on order of evaluation of side effects
#14352|   			| SECOND_P '(' Iconst ')'
#14353|   				{
#14354|-> 					$$ = list_make2(makeIntConst(INTERVAL_MASK(SECOND), @1),
#14355|   									makeIntConst($3, @3));
#14356|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def326]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14403: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)}' depends on order of evaluation of side effects
#14401|   				{
#14402|   					$$ = (Node *) makeFuncCall(SystemFuncName("timezone"),
#14403|-> 											   list_make2($5, $1),
#14404|   											   COERCE_SQL_SYNTAX,
#14405|   											   @2);

Error: CPPCHECK_WARNING (CWE-768): [#def327]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14467: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14465|   				{
#14466|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14467|-> 												 list_make2($3, $5),
#14468|   												 COERCE_EXPLICIT_CALL,
#14469|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def328]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14481: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14479|   				{
#14480|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14481|-> 												 list_make2($4, $6),
#14482|   												 COERCE_EXPLICIT_CALL,
#14483|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def329]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14495: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14493|   				{
#14494|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14495|-> 												 list_make2($3, $5),
#14496|   												 COERCE_EXPLICIT_CALL,
#14497|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def330]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14509: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14507|   				{
#14508|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14509|-> 												 list_make2($4, $6),
#14510|   												 COERCE_EXPLICIT_CALL,
#14511|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def331]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14528: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14526|   				{
#14527|   					FuncCall   *n = makeFuncCall(SystemFuncName("similar_to_escape"),
#14528|-> 												 list_make2($4, $6),
#14529|   												 COERCE_EXPLICIT_CALL,
#14530|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def332]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14546: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14544|   				{
#14545|   					FuncCall   *n = makeFuncCall(SystemFuncName("similar_to_escape"),
#14546|-> 												 list_make2($5, $7),
#14547|   												 COERCE_EXPLICIT_CALL,
#14548|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def333]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14682: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14680|   												   "BETWEEN",
#14681|   												   $1,
#14682|-> 												   (Node *) list_make2($4, $6),
#14683|   												   @2);
#14684|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def334]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14690: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14688|   												   "NOT BETWEEN",
#14689|   												   $1,
#14690|-> 												   (Node *) list_make2($5, $7),
#14691|   												   @2);
#14692|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def335]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14698: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14696|   												   "BETWEEN SYMMETRIC",
#14697|   												   $1,
#14698|-> 												   (Node *) list_make2($4, $6),
#14699|   												   @2);
#14700|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def336]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14706: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14704|   												   "NOT BETWEEN SYMMETRIC",
#14705|   												   $1,
#14706|-> 												   (Node *) list_make2($5, $7),
#14707|   												   @2);
#14708|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def337]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14809: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].node)},((union ListCell){.ptr_value=(makeStringConst(yyvsp[-1].str,yylsp[-1]))})' depends on order of evaluation of side effects
#14807|   				{
#14808|   					$$ = (Node *) makeFuncCall(SystemFuncName("is_normalized"),
#14809|-> 											   list_make2($1, makeStringConst($3, @3)),
#14810|   											   COERCE_SQL_SYNTAX,
#14811|   											   @2);

Error: CPPCHECK_WARNING (CWE-768): [#def338]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:14824: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},((union ListCell){.ptr_value=(makeStringConst(yyvsp[-1].str,yylsp[-1]))})' depends on order of evaluation of side effects
#14822|   				{
#14823|   					$$ = makeNotExpr((Node *) makeFuncCall(SystemFuncName("is_normalized"),
#14824|-> 														   list_make2($1, makeStringConst($4, @4)),
#14825|   														   COERCE_SQL_SYNTAX,
#14826|   														   @2),

Error: CPPCHECK_WARNING (CWE-768): [#def339]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:15287: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].node)},((union ListCell){.ptr_value=(makeStringConst(yyvsp[-1].str,yylsp[-1]))})' depends on order of evaluation of side effects
#15285|   				{
#15286|   					$$ = (Node *) makeFuncCall(SystemFuncName("normalize"),
#15287|-> 											   list_make2($3, makeStringConst($5, @5)),
#15288|   											   COERCE_SQL_SYNTAX,
#15289|   											   @1);

Error: CPPCHECK_WARNING (CWE-768): [#def340]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:15446: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[-1].node)}' depends on order of evaluation of side effects
#15444|   					 * converted to xmlexists(A, B)*/
#15445|   					$$ = (Node *) makeFuncCall(SystemFuncName("xmlexists"),
#15446|-> 											   list_make2($3, $4),
#15447|   											   COERCE_SQL_SYNTAX,
#15448|   											   @1);

Error: CPPCHECK_WARNING (CWE-768): [#def341]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:15458: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},((union ListCell){.ptr_value=(makeBoolAConst(yyvsp[-1].boolean,-1))})' depends on order of evaluation of side effects
#15456|   					XmlExpr *x = (XmlExpr *)
#15457|   						makeXmlExpr(IS_XMLPARSE, NULL, NIL,
#15458|-> 									list_make2($4, makeBoolAConst($5, -1)),
#15459|   									@1);
#15460|   

Error: CPPCHECK_WARNING (CWE-768): [#def342]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:15475: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#15473|   				{
#15474|   					$$ = makeXmlExpr(IS_XMLROOT, NULL, NIL,
#15475|-> 									 list_make3($3, $5, $6), @1);
#15476|   				}
#15477|   			| XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename ')'

Error: CPPCHECK_WARNING (CWE-768): [#def343]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:15475: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[-1].node)}' depends on order of evaluation of side effects
#15473|   				{
#15474|   					$$ = makeXmlExpr(IS_XMLROOT, NULL, NIL,
#15475|-> 									 list_make3($3, $5, $6), @1);
#15476|   				}
#15477|   			| XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename ')'

Error: CPPCHECK_WARNING (CWE-768): [#def344]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:15980: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeStringConst(yyvsp[-2].str,yylsp[-2]))}),(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#15978|   			extract_arg FROM a_expr
#15979|   				{
#15980|-> 					$$ = list_make2(makeStringConst($1, @1), $3);
#15981|   				}
#15982|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def345]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16010: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)}' depends on order of evaluation of side effects
#16008|   				{
#16009|   					/* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */
#16010|-> 					$$ = list_make4($1, $3, $5, $7);
#16011|   				}
#16012|   			| a_expr PLACING a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def346]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16010: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16008|   				{
#16009|   					/* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */
#16010|-> 					$$ = list_make4($1, $3, $5, $7);
#16011|   				}
#16012|   			| a_expr PLACING a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def347]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16010: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16008|   				{
#16009|   					/* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */
#16010|-> 					$$ = list_make4($1, $3, $5, $7);
#16011|   				}
#16012|   			| a_expr PLACING a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def348]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16015: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16013|   				{
#16014|   					/* overlay(A PLACING B FROM C) is converted to overlay(A, B, C) */
#16015|-> 					$$ = list_make3($1, $3, $5);
#16016|   				}
#16017|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def349]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16015: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16013|   				{
#16014|   					/* overlay(A PLACING B FROM C) is converted to overlay(A, B, C) */
#16015|-> 					$$ = list_make3($1, $3, $5);
#16016|   				}
#16017|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def350]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16021: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16019|   /* position_list uses b_expr not a_expr to avoid conflict with general IN */
#16020|   position_list:
#16021|-> 			b_expr IN_P b_expr						{ $$ = list_make2($3, $1); }
#16022|   		;
#16023|   

Error: CPPCHECK_WARNING (CWE-768): [#def351]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16044: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16042|   			a_expr FROM a_expr FOR a_expr
#16043|   				{
#16044|-> 					$$ = list_make3($1, $3, $5);
#16045|   				}
#16046|   			| a_expr FOR a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def352]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16044: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16042|   			a_expr FROM a_expr FOR a_expr
#16043|   				{
#16044|-> 					$$ = list_make3($1, $3, $5);
#16045|   				}
#16046|   			| a_expr FOR a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def353]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16049: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16047|   				{
#16048|   					/* not legal per SQL, but might as well allow it */
#16049|-> 					$$ = list_make3($1, $5, $3);
#16050|   				}
#16051|   			| a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def354]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16049: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[0].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16047|   				{
#16048|   					/* not legal per SQL, but might as well allow it */
#16049|-> 					$$ = list_make3($1, $5, $3);
#16050|   				}
#16051|   			| a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def355]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16060: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16058|   					 * such a call in regular function call syntax.
#16059|   					 */
#16060|-> 					$$ = list_make2($1, $3);
#16061|   				}
#16062|   			| a_expr FOR a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def356]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16075: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},((union ListCell){.ptr_value=(makeIntConst(1,-1))})' depends on order of evaluation of side effects
#16073|   					 * is unknown or doesn't have an implicit cast to int4.
#16074|   					 */
#16075|-> 					$$ = list_make3($1, makeIntConst(1, -1),
#16076|   									makeTypeCast($3,
#16077|   												 SystemTypeName("int4"), -1));

Error: CPPCHECK_WARNING (CWE-768): [#def357]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16075: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},((union ListCell){.ptr_value=(makeIntConst(1,-1))}),((union ListCell){.ptr_value=(makeTypeCast(yyvsp[0].node,SystemTypeName("int4"),-1))})' depends on order of evaluation of side effects
#16073|   					 * is unknown or doesn't have an implicit cast to int4.
#16074|   					 */
#16075|-> 					$$ = list_make3($1, makeIntConst(1, -1),
#16076|   									makeTypeCast($3,
#16077|   												 SystemTypeName("int4"), -1));

Error: CPPCHECK_WARNING (CWE-768): [#def358]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16081: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16079|   			| a_expr SIMILAR a_expr ESCAPE a_expr
#16080|   				{
#16081|-> 					$$ = list_make3($1, $3, $5);
#16082|   				}
#16083|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def359]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16081: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16079|   			| a_expr SIMILAR a_expr ESCAPE a_expr
#16080|   				{
#16081|-> 					$$ = list_make3($1, $3, $5);
#16082|   				}
#16083|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def360]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16405: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(0x7FFF,-1))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-2].ival,yylsp[-2]))})' depends on order of evaluation of side effects
#16403|   					TypeName   *t = $1;
#16404|   
#16405|-> 					t->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1),
#16406|   											makeIntConst($3, @3));
#16407|   					$$ = makeStringConstCast($5, @5, t);

Error: CPPCHECK_WARNING (CWE-457): [#def361]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:16499: error[legacyUninitvar]: Uninitialized variable: n
#16497|   						n->rolename = pstrdup($1);
#16498|   					}
#16499|-> 					$$ = n;
#16500|   				}
#16501|   			| CURRENT_ROLE

Error: CPPCHECK_WARNING (CWE-768): [#def362]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:17930: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(list_concat(directargs,orderedargs))}),(union ListCell){.ptr_value=(ndirectargs)}' depends on order of evaluation of side effects
#17928|   	ndirectargs = makeInteger(list_length(directargs));
#17929|   
#17930|-> 	return list_make2(list_concat(directargs, orderedargs),
#17931|   					  ndirectargs);
#17932|   }

Error: CPPCHECK_WARNING (CWE-768): [#def363]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:18037: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString("pg_catalog"))},(union ListCell){.ptr_value=(makeString(name))}' depends on order of evaluation of side effects
#18035|   SystemFuncName(char *name)
#18036|   {
#18037|-> 	return list_make2(makeString("pg_catalog"), makeString(name));
#18038|   }
#18039|   

Error: CPPCHECK_WARNING (CWE-768): [#def364]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:18049: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString("pg_catalog"))},(union ListCell){.ptr_value=(makeString(name))}' depends on order of evaluation of side effects
#18047|   SystemTypeName(char *name)
#18048|   {
#18049|-> 	return makeTypeNameFromNameList(list_make2(makeString("pg_catalog"),
#18050|   											   makeString(name)));
#18051|   }

Error: CPPCHECK_WARNING (CWE-768): [#def365]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:18118: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lexpr)},(union ListCell){.ptr_value=(rexpr)}' depends on order of evaluation of side effects
#18116|   		}
#18117|   	}
#18118|-> 	return (Node *) makeBoolExpr(AND_EXPR, list_make2(lexpr, rexpr), location);
#18119|   }
#18120|   

Error: CPPCHECK_WARNING (CWE-768): [#def366]
postgresql-16.8/postgresql-15.12/src/backend/parser/gram.y:18135: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lexpr)},(union ListCell){.ptr_value=(rexpr)}' depends on order of evaluation of side effects
#18133|   		}
#18134|   	}
#18135|-> 	return (Node *) makeBoolExpr(OR_EXPR, list_make2(lexpr, rexpr), location);
#18136|   }
#18137|   

Error: CPPCHECK_WARNING (CWE-768): [#def367]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_agg.c:2075: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(make_agg_arg(17,(unsigned int)0))}),((union ListCell){.ptr_value=(make_agg_arg(2281,(unsigned int)0))})' depends on order of evaluation of side effects
# 2073|   
# 2074|   	/* deserialfn always takes BYTEA, INTERNAL and returns INTERNAL */
# 2075|-> 	args = list_make2(make_agg_arg(BYTEAOID, InvalidOid),
# 2076|   					  make_agg_arg(INTERNALOID, InvalidOid));
# 2077|   

Error: CPPCHECK_WARNING (CWE-768): [#def368]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_clause.c:1591: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(l_colvar)},(union ListCell){.ptr_value=(r_colvar)}' depends on order of evaluation of side effects
# 1589|   
# 1590|   	outcoltype = select_common_type(pstate,
# 1591|-> 									list_make2(l_colvar, r_colvar),
# 1592|   									"JOIN/USING",
# 1593|   									NULL);

Error: CPPCHECK_WARNING (CWE-768): [#def369]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_clause.c:1595: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(l_colvar)},(union ListCell){.ptr_value=(r_colvar)}' depends on order of evaluation of side effects
# 1593|   									NULL);
# 1594|   	outcoltypmod = select_common_typmod(pstate,
# 1595|-> 										list_make2(l_colvar, r_colvar),
# 1596|   										outcoltype);
# 1597|   

Error: CPPCHECK_WARNING (CWE-768): [#def370]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_clause.c:1663: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(l_node)},(union ListCell){.ptr_value=(r_node)}' depends on order of evaluation of side effects
# 1661|   				c->coalescetype = outcoltype;
# 1662|   				/* coalescecollid will get set below */
# 1663|-> 				c->args = list_make2(l_node, r_node);
# 1664|   				c->location = -1;
# 1665|   				res_node = (Node *) c;

Error: CPPCHECK_WARNING (CWE-768): [#def371]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_collate.c:377: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(le)},(union ListCell){.ptr_value=(re)}' depends on order of evaluation of side effects
#  375|   
#  376|   					coll = select_common_collation(context->pstate,
#  377|-> 												   list_make2(le, re),
#  378|   												   true);
#  379|   					colls = lappend_oid(colls, coll);

Error: CPPCHECK_WARNING (CWE-768): [#def372]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_cte.c:276: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_clause->cycle_mark_value)},(union ListCell){.ptr_value=(cycle_clause->cycle_mark_default)}' depends on order of evaluation of side effects
#  274|   		cycle_clause->cycle_mark_type =
#  275|   			select_common_type(pstate,
#  276|-> 							   list_make2(cycle_clause->cycle_mark_value,
#  277|   										  cycle_clause->cycle_mark_default),
#  278|   							   "CYCLE", NULL);

Error: CPPCHECK_WARNING (CWE-768): [#def373]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_cte.c:292: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_clause->cycle_mark_value)},(union ListCell){.ptr_value=(cycle_clause->cycle_mark_default)}' depends on order of evaluation of side effects
#  290|   		cycle_clause->cycle_mark_typmod =
#  291|   			select_common_typmod(pstate,
#  292|-> 								 list_make2(cycle_clause->cycle_mark_value,
#  293|   											cycle_clause->cycle_mark_default),
#  294|   								 cycle_clause->cycle_mark_type);

Error: CPPCHECK_WARNING (CWE-768): [#def374]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_cte.c:298: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_clause->cycle_mark_value)},(union ListCell){.ptr_value=(cycle_clause->cycle_mark_default)}' depends on order of evaluation of side effects
#  296|   		cycle_clause->cycle_mark_collation =
#  297|   			select_common_collation(pstate,
#  298|-> 									list_make2(cycle_clause->cycle_mark_value,
#  299|   											   cycle_clause->cycle_mark_default),
#  300|   									true);

Error: CPPCHECK_WARNING (CWE-768): [#def375]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1213: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(result)},(union ListCell){.ptr_value=(cmp)}' depends on order of evaluation of side effects
# 1211|   		else
# 1212|   			result = (Node *) makeBoolExpr(useOr ? OR_EXPR : AND_EXPR,
# 1213|-> 										   list_make2(result, cmp),
# 1214|   										   a->location);
# 1215|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def376]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1252: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">=",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<=",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1250|   	{
# 1251|   		case AEXPR_BETWEEN:
# 1252|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=",
# 1253|   											   aexpr, bexpr,
# 1254|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def377]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1261: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1259|   			break;
# 1260|   		case AEXPR_NOT_BETWEEN:
# 1261|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<",
# 1262|   											   aexpr, bexpr,
# 1263|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def378]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1270: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">=",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<=",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1268|   			break;
# 1269|   		case AEXPR_BETWEEN_SYM:
# 1270|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=",
# 1271|   											   aexpr, bexpr,
# 1272|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def379]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1277: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">=",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(cexpr))copyObjectImpl(cexpr),a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<=",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(bexpr))copyObjectImpl(bexpr),a->location))})' depends on order of evaluation of side effects
# 1275|   											   a->location));
# 1276|   			sub1 = (Node *) makeBoolExpr(AND_EXPR, args, a->location);
# 1277|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=",
# 1278|   											   copyObject(aexpr), copyObject(cexpr),
# 1279|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def380]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1284: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(sub1)},(union ListCell){.ptr_value=(sub2)}' depends on order of evaluation of side effects
# 1282|   											   a->location));
# 1283|   			sub2 = (Node *) makeBoolExpr(AND_EXPR, args, a->location);
# 1284|-> 			args = list_make2(sub1, sub2);
# 1285|   			result = (Node *) makeBoolExpr(OR_EXPR, args, a->location);
# 1286|   			break;

Error: CPPCHECK_WARNING (CWE-768): [#def381]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1288: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1286|   			break;
# 1287|   		case AEXPR_NOT_BETWEEN_SYM:
# 1288|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<",
# 1289|   											   aexpr, bexpr,
# 1290|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def382]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1295: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(cexpr))copyObjectImpl(cexpr),a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(bexpr))copyObjectImpl(bexpr),a->location))})' depends on order of evaluation of side effects
# 1293|   											   a->location));
# 1294|   			sub1 = (Node *) makeBoolExpr(OR_EXPR, args, a->location);
# 1295|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<",
# 1296|   											   copyObject(aexpr), copyObject(cexpr),
# 1297|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def383]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:1302: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(sub1)},(union ListCell){.ptr_value=(sub2)}' depends on order of evaluation of side effects
# 1300|   											   a->location));
# 1301|   			sub2 = (Node *) makeBoolExpr(OR_EXPR, args, a->location);
# 1302|-> 			args = list_make2(sub1, sub2);
# 1303|   			result = (Node *) makeBoolExpr(AND_EXPR, args, a->location);
# 1304|   			break;

Error: CPPCHECK_WARNING (CWE-768): [#def384]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_expr.c:2942: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(result)},(union ListCell){.ptr_value=(cmp)}' depends on order of evaluation of side effects
# 2940|   		else
# 2941|   			result = (Node *) makeBoolExpr(OR_EXPR,
# 2942|-> 										   list_make2(result, cmp),
# 2943|   										   location);
# 2944|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def385]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:1781: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((aarg)->ptr_value)},(union ListCell){.ptr_value=((harg)->ptr_value)}' depends on order of evaluation of side effects
# 1779|   		 */
# 1780|   		commontype = select_common_type(pstate,
# 1781|-> 										list_make2(lfirst(aarg), lfirst(harg)),
# 1782|   										"WITHIN GROUP",
# 1783|   										NULL);

Error: CPPCHECK_WARNING (CWE-768): [#def386]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:1785: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((aarg)->ptr_value)},(union ListCell){.ptr_value=((harg)->ptr_value)}' depends on order of evaluation of side effects
# 1783|   										NULL);
# 1784|   		commontypmod = select_common_typmod(pstate,
# 1785|-> 											list_make2(lfirst(aarg), lfirst(harg)),
# 1786|   											commontype);
# 1787|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def387]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2015:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:1994:1: enter_function: entry to ‘funcname_signature_string’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2006:30: call_function: inlined call to ‘list_length’ from ‘funcname_signature_string’
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2009:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2011:20: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2011:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2013:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2009:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2011:20: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2015:70: danger: dereference of NULL ‘lc’
# 2013|   		if (i >= numposargs)
# 2014|   		{
# 2015|-> 			appendStringInfo(&argbuf, "%s => ", (char *) lfirst(lc));
# 2016|   			lc = lnext(argnames, lc);
# 2017|   		}

Error: CPPCHECK_WARNING (CWE-457): [#def388]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_func.c:2272: warning[uninitvar]: Uninitialized variable: argoids
# 2270|   	 */
# 2271|   	oid = LookupFuncNameInternal(func->args_unspecified ? objtype : OBJECT_ROUTINE,
# 2272|-> 								 func->objname, nargs, argoids,
# 2273|   								 false, missing_ok,
# 2274|   								 &lookupError);

Error: CPPCHECK_WARNING (CWE-768): [#def389]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_oper.c:733: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltree)},(union ListCell){.ptr_value=(rtree)}' depends on order of evaluation of side effects
#  731|   	{
#  732|   		/* otherwise, binary operator */
#  733|-> 		args = list_make2(ltree, rtree);
#  734|   		actual_arg_types[0] = ltypeId;
#  735|   		actual_arg_types[1] = rtypeId;

Error: CPPCHECK_WARNING (CWE-768): [#def390]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_oper.c:835: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltree)},(union ListCell){.ptr_value=(rtree)}' depends on order of evaluation of side effects
#  833|   				 parser_errposition(pstate, location)));
#  834|   
#  835|-> 	args = list_make2(ltree, rtree);
#  836|   	actual_arg_types[0] = ltypeId;
#  837|   	actual_arg_types[1] = rtypeId;

Error: CPPCHECK_WARNING (CWE-768): [#def391]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:538: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(snamespace))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))}' depends on order of evaluation of side effects
#  536|   	altseqstmt = makeNode(AlterSeqStmt);
#  537|   	altseqstmt->sequence = makeRangeVar(snamespace, sname, -1);
#  538|-> 	attnamelist = list_make3(makeString(snamespace),
#  539|   							 makeString(cxt->relation->relname),
#  540|   							 makeString(column->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def392]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:538: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(snamespace))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))},(union ListCell){.ptr_value=(makeString(column->colname))}' depends on order of evaluation of side effects
#  536|   	altseqstmt = makeNode(AlterSeqStmt);
#  537|   	altseqstmt->sequence = makeRangeVar(snamespace, sname, -1);
#  538|-> 	attnamelist = list_make3(makeString(snamespace),
#  539|   							 makeString(cxt->relation->relname),
#  540|   							 makeString(column->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def393]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:1147: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(cxt->relation->schemaname))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))}' depends on order of evaluation of side effects
# 1145|   
# 1146|   			stmt->objtype = OBJECT_COLUMN;
# 1147|-> 			stmt->object = (Node *) list_make3(makeString(cxt->relation->schemaname),
# 1148|   											   makeString(cxt->relation->relname),
# 1149|   											   makeString(def->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def394]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:1147: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(cxt->relation->schemaname))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))},(union ListCell){.ptr_value=(makeString(def->colname))}' depends on order of evaluation of side effects
# 1145|   
# 1146|   			stmt->objtype = OBJECT_COLUMN;
# 1147|-> 			stmt->object = (Node *) list_make3(makeString(cxt->relation->schemaname),
# 1148|   											   makeString(cxt->relation->relname),
# 1149|   											   makeString(def->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def395]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:1372: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(heapRel->schemaname))},(union ListCell){.ptr_value=(makeString(heapRel->relname))}' depends on order of evaluation of side effects
# 1370|   
# 1371|   				stmt->objtype = OBJECT_TABCONSTRAINT;
# 1372|-> 				stmt->object = (Node *) list_make3(makeString(heapRel->schemaname),
# 1373|   												   makeString(heapRel->relname),
# 1374|   												   makeString(n->conname));

Error: CPPCHECK_WARNING (CWE-768): [#def396]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:1372: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(heapRel->schemaname))},(union ListCell){.ptr_value=(makeString(heapRel->relname))},(union ListCell){.ptr_value=(makeString(n->conname))}' depends on order of evaluation of side effects
# 1370|   
# 1371|   				stmt->objtype = OBJECT_TABCONSTRAINT;
# 1372|-> 				stmt->object = (Node *) list_make3(makeString(heapRel->schemaname),
# 1373|   												   makeString(heapRel->relname),
# 1374|   												   makeString(n->conname));

Error: CPPCHECK_WARNING (CWE-768): [#def397]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:1711: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(nspname))},(union ListCell){.ptr_value=(makeString(oprname))}' depends on order of evaluation of side effects
# 1709|   					/* For simplicity we always schema-qualify the op name */
# 1710|   					nspname = get_namespace_name(operform->oprnamespace);
# 1711|-> 					namelist = list_make2(makeString(nspname),
# 1712|   										  makeString(oprname));
# 1713|   					index->excludeOpNames = lappend(index->excludeOpNames,

Error: CPPCHECK_WARNING (CWE-768): [#def398]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:2066: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(nsp_name))},(union ListCell){.ptr_value=(makeString(coll_name))}' depends on order of evaluation of side effects
# 2064|   	nsp_name = get_namespace_name(coll_rec->collnamespace);
# 2065|   	coll_name = pstrdup(NameStr(coll_rec->collname));
# 2066|-> 	result = list_make2(makeString(nsp_name), makeString(coll_name));
# 2067|   
# 2068|   	ReleaseSysCache(ht_coll);

Error: CPPCHECK_WARNING (CWE-768): [#def399]
postgresql-16.8/postgresql-15.12/src/backend/parser/parse_utilcmd.c:2096: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(nsp_name))},(union ListCell){.ptr_value=(makeString(opc_name))}' depends on order of evaluation of side effects
# 2094|   		char	   *opc_name = pstrdup(NameStr(opc_rec->opcname));
# 2095|   
# 2096|-> 		result = list_make2(makeString(nsp_name), makeString(opc_name));
# 2097|   	}
# 2098|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def400]
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8354:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8233:10: enter_function: entry to ‘core_yyrestart’
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8238:9: call_function: calling ‘core_yyensure_buffer_stack’ from ‘core_yyrestart’
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8238:9: return_function: returning to ‘core_yyrestart’ from ‘core_yyensure_buffer_stack’
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8240:13: call_function: calling ‘core_yy_create_buffer’ from ‘core_yyrestart’
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8240:13: return_function: returning to ‘core_yyrestart’ from ‘core_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8243:9: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8243:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/parser/scan.c:8243:9: call_function: calling ‘core_yy_init_buffer’ from ‘core_yyrestart’
# 8352|   	yy_flush_buffer( b , yyscanner);
# 8353|   
# 8354|-> 	b->yy_input_file = file;
# 8355|   	b->yy_fill_buffer = 1;
# 8356|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def401]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/../../../src/include/nodes/pg_list.h:260:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elemops’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:3885:1: enter_function: entry to ‘make_partition_op_expr’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:3893:19: call_function: calling ‘get_partition_operator’ from ‘make_partition_op_expr’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:3893:19: return_function: returning to ‘make_partition_op_expr’ from ‘get_partition_operator’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:3968:50: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:3968:100: call_function: inlined call to ‘list_nth_cell’ from ‘make_partition_op_expr’
#  258|   	Assert(list != NIL);
#  259|   	Assert(n >= 0 && n < list->length);
#  260|-> 	return &list->elements[n];
#  261|   }
#  262|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def402]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/../../../src/include/nodes/pg_list.h:260:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘or_expr_args’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4292:1: enter_function: entry to ‘get_qual_for_range’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4317:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4320:39: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4325:29: branch_true: following ‘true’ branch (when ‘i < nparts’)...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4327:67: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4334:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4337:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4340:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4344:46: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4345:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4348:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4348:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4352:45: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4352:45: call_function: calling ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4352:45: return_function: returning to ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4358:70: call_function: inlined call to ‘list_length’ from ‘get_qual_for_range’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4360:78: call_function: inlined call to ‘list_nth_cell’ from ‘get_qual_for_range’
#  258|   	Assert(list != NIL);
#  259|   	Assert(n >= 0 && n < list->length);
#  260|-> 	return &list->elements[n];
#  261|   }
#  262|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def403]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4056:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4000:1: enter_function: entry to ‘get_qual_for_hash’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4037:26: call_function: inlined call to ‘list_head’ from ‘get_qual_for_hash’
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4040:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4045:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4045:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4056:43: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partbounds.c:4056:43: danger: dereference of NULL ‘partexprs_item’
# 4054|   		else
# 4055|   		{
# 4056|-> 			keyCol = (Node *) copyObject(lfirst(partexprs_item));
# 4057|   			partexprs_item = lnext(key->partexprs, partexprs_item);
# 4058|   		}

Error: CPPCHECK_WARNING (CWE-768): [#def404]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:1852: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(new_booltest)},(union ListCell){.ptr_value=(nulltest)}' depends on order of evaluation of side effects
# 1850|   			nulltest->location = -1;
# 1851|   
# 1852|-> 			new_clauses = list_make2(new_booltest, nulltest);
# 1853|   			or_clause = list_make1(makeBoolExpr(OR_EXPR, new_clauses, -1));
# 1854|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def405]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2506:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘start’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2486:1: enter_function: entry to ‘get_steps_using_prefix_recurse’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2510:12: branch_true: following ‘true’ branch (when ‘cur_keyno < final_keyno’)...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2520:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2524:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2520:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2536:17: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2536:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2543:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2546:47: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:2560:37: call_function: calling ‘get_steps_using_prefix_recurse’ from ‘get_steps_using_prefix_recurse’
# 2504|   
# 2505|   	Assert(start != NULL);
# 2506|-> 	cur_keyno = ((PartClauseInfo *) lfirst(start))->keyno;
# 2507|   	final_keyno = ((PartClauseInfo *) llast(prefix))->keyno;
# 2508|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def406]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3478:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc2’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3406:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3423:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3424:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3430:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3437:42: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3437:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3444:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3444:20: branch_false: following ‘false’ branch (when ‘keyno <= nvalues’)...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3447:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3447:20: branch_true: following ‘true’ branch (when ‘lc1’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3454:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3465:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3478:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3478:25: danger: dereference of NULL ‘lc2’
# 3476|   
# 3477|   			/* Set up the stepcmpfuncs entry, unless we already did */
# 3478|-> 			cmpfn = lfirst_oid(lc2);
# 3479|   			Assert(OidIsValid(cmpfn));
# 3480|   			if (cmpfn != context->stepcmpfuncs[stateidx].fn_oid)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def407]
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3522:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[0]’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3406:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3423:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3424:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3424:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3430:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3509:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/partitioning/partprune.c:3522:32: danger: use of uninitialized value ‘values[0]’ here
# 3520|   
# 3521|   		case PARTITION_STRATEGY_LIST:
# 3522|-> 			return get_matching_list_bounds(context,
# 3523|   											opstep->opstrategy,
# 3524|   											values[0], nvalues,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def408]
postgresql-16.8/postgresql-15.12/src/backend/postmaster/../../../src/include/lib/ilist.h:596:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rw’
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:892:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:895:13: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:895:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:910:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:910:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:926:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:926:14: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:927:12: branch_false: following ‘false’ branch (when ‘rw’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:935:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/postmaster/bgworker.c:942:9: call_function: inlined call to ‘slist_push_head’ from ‘RegisterBackgroundWorker’
#  594|   {
#  595|   	node->next = head->head.next;
#  596|-> 	head->head.next = node;
#  597|   
#  598|   	slist_check(head);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def409]
postgresql-16.8/postgresql-15.12/src/backend/postmaster/postmaster.c:2347:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/postmaster/postmaster.c:4327:1: enter_function: entry to ‘BackendInitialize’
postgresql-16.8/postgresql-15.12/src/backend/postmaster/postmaster.c:4453:18: call_function: calling ‘ProcessStartupPacket’ from ‘BackendInitialize’
# 2345|   		if (strchr(port->user_name, '@') ==
# 2346|   			port->user_name + strlen(port->user_name) - 1)
# 2347|-> 			*strchr(port->user_name, '@') = '\0';
# 2348|   		else
# 2349|   		{

Error: GCC_ANALYZER_WARNING: [#def410]
postgresql-16.8/postgresql-15.12/src/backend/postmaster/syslogger.c:213:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
postgresql-16.8/postgresql-15.12/src/backend/postmaster/syslogger.c:567:1: enter_function: entry to ‘SysLogger_Start’
postgresql-16.8/postgresql-15.12/src/backend/postmaster/syslogger.c:572:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/postmaster/syslogger.c:593:13: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/postmaster/syslogger.c:635:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-16.8/postgresql-15.12/src/backend/postmaster/syslogger.c:635:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-16.8/postgresql-15.12/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-401): [#def411]
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:613:31: warning[-Wanalyzer-malloc-leak]: leak of ‘newdfa(v, &*sub.cnfa, &*v_15(D)->g.cmap, 0)’
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:920:1: enter_function: entry to ‘lacon’
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:932:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:938:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:942:13: call_function: calling ‘getladfa’ from ‘lacon’
#  611|   {
#  612|   	struct dfa *d;
#  613|-> 	size_t		nss = cnfa->nstates * 2;
#  614|   	int			wordsper = (cnfa->nstates + UBITS - 1) / UBITS;
#  615|   	bool		ismalloced = false;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def412]
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:680:9: warning[-Wanalyzer-malloc-leak]: leak of ‘sml’
postgresql-16.8/postgresql-15.12/src/backend/regex/regexec.c:363:1: enter_function: entry to ‘getsubdfa’
postgresql-16.8/postgresql-15.12/src/backend/regex/regexec.c:370:21: call_function: calling ‘newdfa’ from ‘getsubdfa’
#  678|   	d->search = d->ssets;
#  679|   	d->backno = -1;				/* may be set by caller */
#  680|-> 	d->backmin = d->backmax = 0;
#  681|   
#  682|   	/* initialization of sset fields is done as needed */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def413]
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:1025:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:977:1: enter_function: entry to ‘getvacant’
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:988:14: call_function: calling ‘pickss’ from ‘getvacant’
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:988:14: return_function: returning to ‘getvacant’ from ‘pickss’
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:989:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:994:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:1006:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:1008:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:1010:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:1013:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/regex/rege_dfa.c:1025:25: danger: dereference of NULL ‘lastap.ss’
# 1023|   				lastap = ap;
# 1024|   			assert(ap.ss != NULL);
# 1025|-> 			lastap.ss->inchain[lastap.co] = ss->inchain[i];
# 1026|   		}
# 1027|   		ss->outs[i] = NULL;

Error: CPPCHECK_WARNING (CWE-457): [#def414]
postgresql-16.8/postgresql-15.12/src/backend/regex/regexec.c:226: warning[uninitvar]: Uninitialized variable: v->pmatch
#  224|   		else
#  225|   			v->pmatch = (regmatch_t *) MALLOC(v->nmatch * sizeof(regmatch_t));
#  226|-> 		if (v->pmatch == NULL)
#  227|   			return REG_ESPACE;
#  228|   		zapallsubs(v->pmatch, v->nmatch);

Error: CPPCHECK_WARNING (CWE-457): [#def415]
postgresql-16.8/postgresql-15.12/src/backend/replication/logical/reorderbuffer.c:4614: error[legacyUninitvar]: Uninitialized variable: chunksize
# 4612|   		elog(ERROR, "unexpected type of toast chunk");
# 4613|   
# 4614|-> 	ent->size += chunksize;
# 4615|   	ent->last_chunk_seq = chunk_seq;
# 4616|   	ent->num_chunks++;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def416]
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:1963:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.l:284:1: enter_function: entry to ‘replication_scanner_is_replication_command’
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.l:286:22: call_function: calling ‘replication_yylex’ from ‘replication_scanner_is_replication_command’
# 1961|   	 */
# 1962|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 1963|-> 	if ( ! b->yy_ch_buf )
# 1964|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1965|   

Error: CPPCHECK_WARNING (CWE-476): [#def417]
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2003: warning[nullPointer]: Possible null pointer dereference: b
# 2001|   	yy_flush_buffer( b );
# 2002|   
# 2003|-> 	b->yy_input_file = file;
# 2004|   	b->yy_fill_buffer = 1;
# 2005|   

Error: CPPCHECK_WARNING (CWE-476): [#def418]
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2004: warning[nullPointer]: Possible null pointer dereference: b
# 2002|   
# 2003|   	b->yy_input_file = file;
# 2004|-> 	b->yy_fill_buffer = 1;
# 2005|   
# 2006|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def419]
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2217:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2201:17: enter_function: entry to ‘replication_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2210:24: call_function: inlined call to ‘replication_yyalloc’ from ‘replication_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2211:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/repl_scanner.c:2219:13: call_function: calling ‘replication_yy_scan_buffer’ from ‘replication_yy_scan_bytes’
# 2215|   		buf[i] = yybytes[i];
# 2216|   
# 2217|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 2218|   
# 2219|   	b = yy_scan_buffer( buf, n );

Error: GCC_ANALYZER_WARNING (CWE-401): [#def420]
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1353:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1286:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1293:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1297:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1297:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1319:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1324:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1333:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1335:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1339:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1355:41: call_function: inlined call to ‘syncrep_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1362:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1366:40: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1335:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1339:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1344:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1346:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1355:41: call_function: inlined call to ‘syncrep_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1353:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1351|   					b->yy_buf_size *= 2;
# 1352|   
# 1353|-> 				b->yy_ch_buf = (char *)
# 1354|   					/* Include room in for 2 EOB chars. */
# 1355|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def421]
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1638:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1624:21: enter_function: entry to ‘syncrep_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1628:31: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1629:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1632:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1638:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1636|   	 */
# 1637|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 1638|-> 	if ( ! b->yy_ch_buf )
# 1639|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1640|   

Error: CPPCHECK_WARNING (CWE-476): [#def422]
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1678: warning[nullPointer]: Possible null pointer dereference: b
# 1676|   	yy_flush_buffer( b );
# 1677|   
# 1678|-> 	b->yy_input_file = file;
# 1679|   	b->yy_fill_buffer = 1;
# 1680|   

Error: CPPCHECK_WARNING (CWE-476): [#def423]
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1679: warning[nullPointer]: Possible null pointer dereference: b
# 1677|   
# 1678|   	b->yy_input_file = file;
# 1679|-> 	b->yy_fill_buffer = 1;
# 1680|   
# 1681|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def424]
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1892:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1876:17: enter_function: entry to ‘syncrep_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1885:24: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1886:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/replication/syncrep_scanner.c:1894:13: call_function: calling ‘syncrep_yy_scan_buffer’ from ‘syncrep_yy_scan_bytes’
# 1890|   		buf[i] = yybytes[i];
# 1891|   
# 1892|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1893|   
# 1894|   	b = yy_scan_buffer( buf, n );

Error: CPPCHECK_WARNING (CWE-768): [#def425]
postgresql-16.8/postgresql-15.12/src/backend/rewrite/rewriteSearchCycle.c:192: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeVar(1,path_varattno,2287,-1,0,0))}),(union ListCell){.ptr_value=(arr)}' depends on order of evaluation of side effects
#  190|   
#  191|   	fexpr = makeFuncExpr(F_ARRAY_CAT, RECORDARRAYOID,
#  192|-> 						 list_make2(makeVar(1, path_varattno, RECORDARRAYOID, -1, 0, 0),
#  193|   									arr),
#  194|   						 InvalidOid, InvalidOid, COERCE_EXPLICIT_CALL);

Error: CPPCHECK_WARNING (CWE-768): [#def426]
postgresql-16.8/postgresql-15.12/src/backend/rewrite/rewriteSearchCycle.c:558: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_col_rowexpr)},((union ListCell){.ptr_value=(makeVar(1,cpa_attno,2287,-1,0,0))})' depends on order of evaluation of side effects
#  556|   		saoe->opno = RECORD_EQ_OP;
#  557|   		saoe->useOr = true;
#  558|-> 		saoe->args = list_make2(cycle_col_rowexpr,
#  559|   								makeVar(1, cpa_attno, RECORDARRAYOID, -1, 0, 0));
#  560|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def427]
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:797:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1373:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1400:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1404:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1432:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1436:29: release_memory: ‘expr’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1436:29: release_memory: ‘expr’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1436:29: release_memory: ‘expr’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1441:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1448:29: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1448: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): [#def428]
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1225:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1373:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1400:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1404:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1432:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1436:29: release_memory: ‘expr’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1436:29: release_memory: ‘expr’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1436:29: release_memory: ‘expr’ is NULL
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1441:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1448:29: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1448:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1452:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/statistics/dependencies.c:1452:34: call_function: calling ‘dependency_is_compatible_expression’ from ‘dependencies_clauselist_selectivity’
# 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): [#def429]
postgresql-16.8/postgresql-15.12/src/backend/statistics/mcv.c:1716:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-16.8/postgresql-15.12/src/backend/statistics/mcv.c:2132:1: enter_function: entry to ‘mcv_clause_selectivity_or’
postgresql-16.8/postgresql-15.12/src/backend/statistics/mcv.c:2146:23: call_function: calling ‘mcv_get_match_bitmap’ from ‘mcv_clause_selectivity_or’
# 1714|   			}
# 1715|   		}
# 1716|-> 		else if (IsA(clause, ScalarArrayOpExpr))
# 1717|   		{
# 1718|   			ScalarArrayOpExpr *expr = (ScalarArrayOpExpr *) clause;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def430]
postgresql-16.8/postgresql-15.12/src/backend/statistics/mvdistinct.c:366:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/statistics/mvdistinct.c:356:1: enter_function: entry to ‘pg_ndistinct_out’
postgresql-16.8/postgresql-15.12/src/backend/statistics/mvdistinct.c:359:30: call_function: calling ‘statext_ndistinct_deserialize’ from ‘pg_ndistinct_out’
postgresql-16.8/postgresql-15.12/src/backend/statistics/mvdistinct.c:359:30: return_function: returning to ‘pg_ndistinct_out’ from ‘statext_ndistinct_deserialize’
postgresql-16.8/postgresql-15.12/src/backend/statistics/mvdistinct.c:366:25: danger: dereference of NULL ‘statext_ndistinct_deserialize(pg_detoast_datum_packed((struct varlena *)*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): [#def431]
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/lmgr.c:725: error[uninitStructMember]: Uninitialized struct member: callback.previous
#  723|   
#  724|   	if (oper != XLTW_None)
#  725|-> 		error_context_stack = callback.previous;
#  726|   }
#  727|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def432]
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1730:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘proc’
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1714:1: enter_function: entry to ‘ProcLockWakeup’
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1723:12: branch_false: following ‘false’ branch (when ‘queue_size != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1726:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1728:16: branch_true: following ‘true’ branch (when ‘queue_size > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1730:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1736:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1737:26: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1736:21: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1741:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1742:32: call_function: calling ‘ProcWakeup’ from ‘ProcLockWakeup’
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1742:32: return_function: returning to ‘ProcLockWakeup’ from ‘ProcWakeup’
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1728:16: branch_true: following ‘true’ branch (when ‘queue_size > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1730:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/lmgr/proc.c:1730:33: danger: dereference of NULL ‘proc’
# 1728|   	while (queue_size-- > 0)
# 1729|   	{
# 1730|-> 		LOCKMODE	lockmode = proc->waitLockMode;
# 1731|   
# 1732|   		/*

Error: GCC_ANALYZER_WARNING (CWE-457): [#def433]
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:524:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘nline < i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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-457): [#def434]
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:544:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.offsetindex’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘nline >= i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:742:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘nline >= i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:742:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:743:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:745:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘nline < i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
#  542|   
#  543|   			itemidptr = &itemidbase[i];
#  544|-> 			lp = PageGetItemId(page, itemidptr->offsetindex + 1);
#  545|   
#  546|   			if (copy_head != itemidptr->itemoff + itemidptr->alignedlen)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def435]
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:622:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘nline >= i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:742:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘nline >= i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:742:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:743:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:745:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘nline < i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
#  620|   			{
#  621|   				itemidptr = &itemidbase[i];
#  622|-> 				if (upper != itemidptr->itemoff + itemidptr->alignedlen)
#  623|   					break;
#  624|   				upper -= itemidptr->alignedlen;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def436]
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:648:30: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.offsetindex’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:736:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘nline >= i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:742:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘nline >= i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:742:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:743:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:745:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘nline < i’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
#  646|   
#  647|   			itemidptr = &itemidbase[i];
#  648|-> 			lp = PageGetItemId(page, itemidptr->offsetindex + 1);
#  649|   
#  650|   			/* copy pending tuples when we detect a gap */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def437]
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:483:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1241:1: enter_function: entry to ‘_mdfd_getseg’
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1256:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1263:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1263:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1273:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1283:18: branch_true: following ‘true’ branch (when ‘nextsegno <= targetseg’)...
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1285:39: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1285:39: call_function: calling ‘_mdnblocks’ from ‘_mdfd_getseg’
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1285:39: return_function: returning to ‘_mdfd_getseg’ from ‘_mdnblocks’
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1290:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1293:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1293:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1294:40: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1294:25: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1310:28: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/storage/smgr/md.c:1314:33: call_function: calling ‘mdextend’ from ‘_mdfd_getseg’
#  481|   	Assert(seekpos < (off_t) BLCKSZ * RELSEG_SIZE);
#  482|   
#  483|-> 	if ((nbytes = FileWrite(v->mdfd_vfd, buffer, BLCKSZ, seekpos, WAIT_EVENT_DATA_FILE_EXTEND)) != BLCKSZ)
#  484|   	{
#  485|   		if (nbytes < 0)

Error: CPPCHECK_WARNING (CWE-457): [#def438]
postgresql-16.8/postgresql-15.12/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): [#def439]
postgresql-16.8/postgresql-15.12/src/backend/tsearch/ts_parse.c:81:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘res’
postgresql-16.8/postgresql-15.12/src/backend/tsearch/ts_parse.c:539:1: enter_function: entry to ‘hlparsetext’
postgresql-16.8/postgresql-15.12/src/backend/tsearch/ts_parse.c:589:38: call_function: calling ‘LexizeExec’ from ‘hlparsetext’
#   79|   	else
#   80|   		list->head = list->tail = newpl;
#   81|-> 	newpl->next = NULL;
#   82|   }
#   83|   

Error: CPPCHECK_WARNING (CWE-476): [#def440]
postgresql-16.8/postgresql-15.12/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): [#def441]
postgresql-16.8/postgresql-15.12/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): [#def442]
postgresql-16.8/postgresql-15.12/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): [#def443]
postgresql-16.8/postgresql-15.12/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): [#def444]
postgresql-16.8/postgresql-15.12/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): [#def445]
postgresql-16.8/postgresql-15.12/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): [#def446]
postgresql-16.8/postgresql-15.12/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): [#def447]
postgresql-16.8/postgresql-15.12/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): [#def448]
postgresql-16.8/postgresql-15.12/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): [#def449]
postgresql-16.8/postgresql-15.12/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): [#def450]
postgresql-16.8/postgresql-15.12/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): [#def451]
postgresql-16.8/postgresql-15.12/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): [#def452]
postgresql-16.8/postgresql-15.12/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): [#def453]
postgresql-16.8/postgresql-15.12/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): [#def454]
postgresql-16.8/postgresql-15.12/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): [#def455]
postgresql-16.8/postgresql-15.12/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): [#def456]
postgresql-16.8/postgresql-15.12/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): [#def457]
postgresql-16.8/postgresql-15.12/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): [#def458]
postgresql-16.8/postgresql-15.12/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): [#def459]
postgresql-16.8/postgresql-15.12/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): [#def460]
postgresql-16.8/postgresql-15.12/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): [#def461]
postgresql-16.8/postgresql-15.12/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): [#def462]
postgresql-16.8/postgresql-15.12/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): [#def463]
postgresql-16.8/postgresql-15.12/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): [#def464]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:1352: warning[uninitvar]: Uninitialized variable: dim
# 1350|   
# 1351|   	/* This checks for overflow of array dimensions */
# 1352|-> 	nitems = ArrayGetNItems(ndim, dim);
# 1353|   	ArrayCheckBounds(ndim, dim, lBound);
# 1354|   

Error: CPPCHECK_WARNING (CWE-457): [#def465]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:1353: warning[uninitvar]: Uninitialized variable: lBound
# 1351|   	/* This checks for overflow of array dimensions */
# 1352|   	nitems = ArrayGetNItems(ndim, dim);
# 1353|-> 	ArrayCheckBounds(ndim, dim, lBound);
# 1354|   
# 1355|   	/*

Error: CPPCHECK_WARNING (CWE-457): [#def466]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:1709: warning[uninitvar]: Uninitialized variable: buf
# 1707|   	}
# 1708|   
# 1709|-> 	PG_RETURN_TEXT_P(cstring_to_text(buf));
# 1710|   }
# 1711|   

Error: CPPCHECK_WARNING (CWE-457): [#def467]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:2914: warning[uninitvar]: Uninitialized variable: dim
# 2912|   
# 2913|   		/* complain if too few source items; we ignore extras, however */
# 2914|-> 		if (nelems < ArrayGetNItems(nSubscripts, dim))
# 2915|   			ereport(ERROR,
# 2916|   					(errcode(ERRCODE_ARRAY_SUBSCRIPT_ERROR),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def468]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:3629:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5904:1: enter_function: entry to ‘array_fill_internal’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5922:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5928:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5928:13: call_function: calling ‘array_contains_nulls’ from ‘array_fill_internal’
# 3627|   	while (nelems >= 8)
# 3628|   	{
# 3629|-> 		if (*bitmap != 0xFF)
# 3630|   			return true;
# 3631|   		bitmap++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def469]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:3639:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5904:1: enter_function: entry to ‘array_fill_internal’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5922:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5928:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5928:13: call_function: calling ‘array_contains_nulls’ from ‘array_fill_internal’
# 3637|   	while (nelems > 0)
# 3638|   	{
# 3639|-> 		if ((*bitmap & bitmask) == 0)
# 3640|   			return true;
# 3641|   		bitmask <<= 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def470]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:4825:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘destbitmap’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5524:1: enter_function: entry to ‘makeArrayResultArr’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5534:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5545:54: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5571:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5572:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5572:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5572:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/arrayfuncs.c:5572:25: call_function: calling ‘array_bitmap_copy’ from ‘makeArrayResultArr’
# 4823|   	destbitmap += destoffset / 8;
# 4824|   	destbitmask = 1 << (destoffset % 8);
# 4825|-> 	destbitval = *destbitmap;
# 4826|   	if (srcbitmap)
# 4827|   	{

Error: CPPCHECK_WARNING (CWE-457): [#def471]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/dbsize.c:594: warning[uninitvar]: Uninitialized variable: buf
#  592|   	}
#  593|   
#  594|-> 	PG_RETURN_TEXT_P(cstring_to_text(buf));
#  595|   }
#  596|   

Error: CPPCHECK_WARNING (CWE-457): [#def472]
postgresql-16.8/postgresql-15.12/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): [#def473]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb.c:125: error[legacyUninitvar]: Uninitialized variable: nbytes
#  123|   		elog(ERROR, "unsupported jsonb version number %d", version);
#  124|   
#  125|-> 	return jsonb_from_cstring(str, nbytes);
#  126|   }
#  127|   

Error: CPPCHECK_WARNING (CWE-457): [#def474]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb.c:125: error[legacyUninitvar]: Uninitialized variable: str
#  123|   		elog(ERROR, "unsupported jsonb version number %d", version);
#  124|   
#  125|-> 	return jsonb_from_cstring(str, nbytes);
#  126|   }
#  127|   

Error: COMPILER_WARNING (CWE-457): [#def475]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb_util.c: scope_hint: In function ‘compareJsonbContainers’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb_util.c:295:34: warning[-Wmaybe-uninitialized]: ‘va.type’ may be used uninitialized
#  295 |                         res = (va.type > vb.type) ? 1 : -1;
#      |                                ~~^~~~~
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb_util.c:203:33: note: ‘va’ declared here
#  203 |                 JsonbValue      va,
#      |                                 ^~
#  293|   			Assert(vb.type != jbvBinary);
#  294|   			/* Type-defined order */
#  295|-> 			res = (va.type > vb.type) ? 1 : -1;
#  296|   		}
#  297|   	}

Error: COMPILER_WARNING (CWE-457): [#def476]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb_util.c:295:44: warning[-Wmaybe-uninitialized]: ‘vb.type’ may be used uninitialized
#  295 |                         res = (va.type > vb.type) ? 1 : -1;
#      |                                          ~~^~~~~
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonb_util.c:204:41: note: ‘vb’ declared here
#  204 |                                         vb;
#      |                                         ^~
#  293|   			Assert(vb.type != jbvBinary);
#  294|   			/* Type-defined order */
#  295|-> 			res = (va.type > vb.type) ? 1 : -1;
#  296|   		}
#  297|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def477]
postgresql-16.8/postgresql-15.12/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): [#def478]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonfuncs.c:5430: warning[nullPointer]: Possible null pointer dereference: res
# 5428|   	}
# 5429|   
# 5430|-> 	if (res->type == jbvArray)
# 5431|   		res->val.array.rawScalar = is_scalar;
# 5432|   

Error: CPPCHECK_WARNING (CWE-457): [#def479]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath.c:122: error[legacyUninitvar]: Uninitialized variable: nbytes
#  120|   		elog(ERROR, "unsupported jsonpath version number: %d", version);
#  121|   
#  122|-> 	return jsonPathFromCstring(str, nbytes);
#  123|   }
#  124|   

Error: CPPCHECK_WARNING (CWE-457): [#def480]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath.c:122: error[legacyUninitvar]: Uninitialized variable: str
#  120|   		elog(ERROR, "unsupported jsonpath version number: %d", version);
#  121|   
#  122|-> 	return jsonPathFromCstring(str, nbytes);
#  123|   }
#  124|   

Error: CPPCHECK_WARNING (CWE-768): [#def481]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_exec.c:2453: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(jvl->singleton)},(union ListCell){.ptr_value=(jbv)}' depends on order of evaluation of side effects
# 2451|   	if (jvl->singleton)
# 2452|   	{
# 2453|-> 		jvl->list = list_make2(jvl->singleton, jbv);
# 2454|   		jvl->singleton = NULL;
# 2455|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def482]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_gram.c:1310:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.l:457:1: enter_function: entry to ‘parsejsonpath’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.l:463:13: call_function: calling ‘jsonpath_yyparse’ from ‘parsejsonpath’
# 1308|           if (! yyptr)
# 1309|             goto yyexhaustedlab;
# 1310|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1311|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1312|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-476): [#def483]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.c:4110:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.l:457:1: enter_function: entry to ‘parsejsonpath’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.l:461:9: call_function: calling ‘jsonpath_scanner_init’ from ‘parsejsonpath’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.l:461:9: return_function: returning to ‘parsejsonpath’ from ‘jsonpath_scanner_init’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/jsonpath_scan.l:463:13: call_function: calling ‘jsonpath_yyparse’ from ‘parsejsonpath’
# 4108|   	yy_flush_buffer( b );
# 4109|   
# 4110|-> 	b->yy_input_file = file;
# 4111|   	b->yy_fill_buffer = 1;
# 4112|   

Error: CPPCHECK_WARNING (CWE-476): [#def484]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/lockfuncs.c:490: warning[nullPointer]: Possible null pointer dereference: blocked_instance
#  488|   
#  489|   		lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
#  490|-> 		conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
#  491|   
#  492|   		/* Now scan the PROCLOCK data for conflicting procs */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def485]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/lockfuncs.c:490:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘blocked_instance’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/lockfuncs.c:463:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/lockfuncs.c:465:43: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/lockfuncs.c:490:61: danger: dereference of NULL ‘blocked_instance’
#  488|   
#  489|   		lockMethodTable = GetLockTagsMethodTable(&(blocked_instance->locktag));
#  490|-> 		conflictMask = lockMethodTable->conflictTab[blocked_instance->waitLockMode];
#  491|   
#  492|   		/* Now scan the PROCLOCK data for conflicting procs */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def486]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/regexp.c:171:32: warning[-Wanalyzer-malloc-leak]: leak of ‘re_temp.cre_pat’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/regexp.c:1939:1: enter_function: entry to ‘regexp_fixed_prefix’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/regexp.c:1958:14: call_function: calling ‘RE_compile_and_cache’ from ‘regexp_fixed_prefix’
#  169|   			}
#  170|   
#  171|-> 			return &re_array[0].cre_re;
#  172|   		}
#  173|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def487]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/regproc.c:442: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(get_namespace_name_or_temp(procform->pronamespace))},(union ListCell){.ptr_value=(pstrdup((procform->proname).data))}' depends on order of evaluation of side effects
#  440|   	nargs = procform->pronargs;
#  441|   
#  442|-> 	*objnames = list_make2(get_namespace_name_or_temp(procform->pronamespace),
#  443|   						   pstrdup(NameStr(procform->proname)));
#  444|   	*objargs = NIL;

Error: CPPCHECK_WARNING (CWE-768): [#def488]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/regproc.c:881: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(get_namespace_name_or_temp(oprForm->oprnamespace))},(union ListCell){.ptr_value=(pstrdup((oprForm->oprname).data))}' depends on order of evaluation of side effects
#  879|   
#  880|   	oprForm = (Form_pg_operator) GETSTRUCT(opertup);
#  881|-> 	*objnames = list_make2(get_namespace_name_or_temp(oprForm->oprnamespace),
#  882|   						   pstrdup(NameStr(oprForm->oprname)));
#  883|   	*objargs = NIL;

Error: CPPCHECK_WARNING (CWE-768): [#def489]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/ri_triggers.c:1421: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(fkrte)},(union ListCell){.ptr_value=(pkrte)}' depends on order of evaluation of side effects
# 1419|   	}
# 1420|   
# 1421|-> 	if (!ExecCheckRTPerms(list_make2(fkrte, pkrte), false))
# 1422|   		return false;
# 1423|   

Error: CPPCHECK_WARNING (CWE-768): [#def490]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/ruleutils.c:1058: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(oldrte)},(union ListCell){.ptr_value=(newrte)}' depends on order of evaluation of side effects
# 1056|   		/* Build two-element rtable */
# 1057|   		memset(&dpns, 0, sizeof(dpns));
# 1058|-> 		dpns.rtable = list_make2(oldrte, newrte);
# 1059|   		dpns.subplans = NIL;
# 1060|   		dpns.ctes = NIL;

Error: CPPCHECK_WARNING (CWE-562): [#def491]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/ruleutils.c:11636: error[returnDanglingLifetime]: Returning pointer to local variable 'buf' that will be invalid when returning.
#11634|   	get_opclass_name(opclass, InvalidOid, &buf);
#11635|   
#11636|-> 	return &buf.data[1];		/* get_opclass_name() prepends space */
#11637|   }
#11638|   

Error: CPPCHECK_WARNING (CWE-768): [#def492]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/selfuncs.c:1962: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},((union ListCell){.ptr_value=(makeConst(nominal_element_type,-1,nominal_element_collation,elmlen,elem_values[i],elem_nulls[i],elmbyval))})' depends on order of evaluation of side effects
# 1960|   			Selectivity s2;
# 1961|   
# 1962|-> 			args = list_make2(leftop,
# 1963|   							  makeConst(nominal_element_type,
# 1964|   										-1,

Error: CPPCHECK_WARNING (CWE-768): [#def493]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/selfuncs.c:2036: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},(union ListCell){.ptr_value=(elem)}' depends on order of evaluation of side effects
# 2034|   			 * estimation function would really care ...
# 2035|   			 */
# 2036|-> 			args = list_make2(leftop, elem);
# 2037|   			if (is_join_clause)
# 2038|   				s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc,

Error: CPPCHECK_WARNING (CWE-768): [#def494]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/selfuncs.c:2088: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},(union ListCell){.ptr_value=(dummyexpr)}' depends on order of evaluation of side effects
# 2086|   		dummyexpr->typeMod = -1;
# 2087|   		dummyexpr->collation = clause->inputcollid;
# 2088|-> 		args = list_make2(leftop, dummyexpr);
# 2089|   		if (is_join_clause)
# 2090|   			s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc,

Error: CPPCHECK_WARNING (CWE-768): [#def495]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/selfuncs.c:2181: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=((list_nth_cell(clause->largs,0)->ptr_value))}),((union ListCell){.ptr_value=((list_nth_cell(clause->rargs,0)->ptr_value))})' depends on order of evaluation of side effects
# 2179|   
# 2180|   	/* Build equivalent arg list for single operator */
# 2181|-> 	opargs = list_make2(linitial(clause->largs), linitial(clause->rargs));
# 2182|   
# 2183|   	/*

Error: CPPCHECK_WARNING (CWE-190): [#def496]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/tsgistidx.c:191: error[integerOverflow]: Signed integer underflow for expression '*(int32*)&c'.
#  189|   			FIN_LEGACY_CRC32(c);
#  190|   
#  191|-> 			*arr = *(int32 *) &c;
#  192|   			arr++;
#  193|   			ptr++;

Error: CPPCHECK_WARNING (CWE-476): [#def497]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:465: warning[nullPointer]: Possible null pointer dereference: rp
#  463|   		rp = result = NULL;		/* keep compiler quiet */
#  464|   	}
#  465|-> 	*rp = '\0';
#  466|   	PG_RETURN_CSTRING(result);
#  467|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def498]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:1382:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*state.skiptablemask’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4623:1: enter_function: entry to ‘split_part’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4637:12: branch_false: following ‘false’ branch (when ‘fldnum != 0’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4642:27: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4642:9: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4642:27: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4643:9: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4643:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4646:12: branch_false: following ‘false’ branch (when ‘inputstring_len > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4650:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4650:12: branch_false: following ‘false’ branch (when ‘fldsep_len > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4660:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4660:9: call_function: calling ‘text_position_setup’ from ‘split_part’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4660:9: return_function: returning to ‘split_part’ from ‘text_position_setup’
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/varlena.c:4662:17: call_function: calling ‘text_position_next’ from ‘split_part’
# 1380|   	int			haystack_len = state->len1;
# 1381|   	int			needle_len = state->len2;
# 1382|-> 	int			skiptablemask = state->skiptablemask;
# 1383|   	const char *haystack = state->str1;
# 1384|   	const char *needle = state->str2;

Error: CPPCHECK_WARNING (CWE-768): [#def499]
postgresql-16.8/postgresql-15.12/src/backend/utils/adt/xml.c:599: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((struct xmltype*)pg_detoast_datum((struct varlena*)((charPointer)(fcinfo->args[0].value))))},(union ListCell){.ptr_value=((struct xmltype*)pg_detoast_datum((struct varlena*)((charPointer)(fcinfo->args[1].value))))}' depends on order of evaluation of side effects
#  597|   		PG_RETURN_XML_P(PG_GETARG_XML_P(0));
#  598|   	else
#  599|-> 		PG_RETURN_XML_P(xmlconcat(list_make2(PG_GETARG_XML_P(0),
#  600|   											 PG_GETARG_XML_P(1))));
#  601|   }

Error: CPPCHECK_WARNING (CWE-476): [#def500]
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/catcache.c:2127: warning[nullPointer]: Possible null pointer dereference: srckeys
# 2125|   		int			attnum = attnos[i];
# 2126|   		Form_pg_attribute att = TupleDescAttr(tupdesc, attnum - 1);
# 2127|-> 		Datum		src = srckeys[i];
# 2128|   		NameData	srcname;
# 2129|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def501]
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/plancache.c:1931:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1929|   			query = QueryListGetPrimaryStmt(stmt_list);
# 1930|   			Assert(query->returningList);
# 1931|-> 			return ExecCleanTypeFromTL(query->returningList);
# 1932|   
# 1933|   		case PORTAL_UTIL_SELECT:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def502]
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:2383:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5430:1: enter_function: entry to ‘RelationGetIdentityKeyBitmap’
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5439:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5443:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5443:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5449:23: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5452:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5456:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/relcache.c:5456: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): [#def503]
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:503:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&mapdicts’
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:424:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:427:43: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:432:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:435:20: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:497:36: branch_false: following ‘false’ branch (when ‘ndicts <= 0’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:507:47: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:497:36: branch_true: following ‘true’ branch (when ‘ndicts > 0’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/cache/ts_cache.c:499:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/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): [#def504]
postgresql-16.8/postgresql-15.12/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): [#def505]
postgresql-16.8/postgresql-15.12/src/backend/utils/init/postinit.c:1227:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/utils/init/postinit.c:1176:1: enter_function: entry to ‘process_startup_options’
postgresql-16.8/postgresql-15.12/src/backend/utils/init/postinit.c:1218:19: call_function: inlined call to ‘list_head’ from ‘process_startup_options’
postgresql-16.8/postgresql-15.12/src/backend/utils/init/postinit.c:1219:16: branch_true: following ‘true’ branch (when ‘gucopts’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/backend/utils/init/postinit.c:1224:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/init/postinit.c:1227:17: danger: dereference of NULL ‘<unknown>’
# 1225|   		gucopts = lnext(port->guc_options, gucopts);
# 1226|   
# 1227|-> 		value = lfirst(gucopts);
# 1228|   		gucopts = lnext(port->guc_options, gucopts);
# 1229|   

Error: CPPCHECK_WARNING (CWE-476): [#def506]
postgresql-16.8/postgresql-15.12/src/backend/utils/misc/guc-file.c:1676: warning[nullPointer]: Possible null pointer dereference: b
# 1674|   	yy_flush_buffer( b );
# 1675|   
# 1676|-> 	b->yy_input_file = file;
# 1677|   	b->yy_fill_buffer = 1;
# 1678|   

Error: CPPCHECK_WARNING (CWE-476): [#def507]
postgresql-16.8/postgresql-15.12/src/backend/utils/misc/guc-file.c:1677: warning[nullPointer]: Possible null pointer dereference: b
# 1675|   
# 1676|   	b->yy_input_file = file;
# 1677|-> 	b->yy_fill_buffer = 1;
# 1678|   
# 1679|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def508]
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:931:46: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:721:1: enter_function: entry to ‘AllocSetAlloc’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:736:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:798:16: call_function: inlined call to ‘AllocSetFreeIndex’ from ‘AllocSetAlloc’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:800:12: branch_false: following ‘false’ branch (when ‘chunk’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:832:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:926:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:928:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:929:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:931:46: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:931:46: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:926:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:928:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:929:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:931:46: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:931:46: danger: ‘block’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
#  929|   			if (blksize < required_size)
#  930|   				break;
#  931|-> 			block = (AllocBlock) malloc(blksize);
#  932|   		}
#  933|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def509]
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:934:20: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:721:1: enter_function: entry to ‘AllocSetAlloc’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:736:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:798:16: call_function: inlined call to ‘AllocSetFreeIndex’ from ‘AllocSetAlloc’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:800:12: branch_false: following ‘false’ branch (when ‘chunk’ is NULL)...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:832:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:920:38: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:926:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:928:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:929:28: branch_true: following ‘true’ branch (when ‘required_size > blksize’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:934:20: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:934:20: branch_true: following ‘true’ branch (when ‘block’ is NULL)...
 branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:934:20: danger: ‘block’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  932|   		}
#  933|   
#  934|-> 		if (block == NULL)
#  935|   			return NULL;
#  936|   

Error: CPPCHECK_WARNING (CWE-401): [#def510]
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/aset.c:1130: error[memleakOnRealloc]: Common realloc mistake: 'block' nulled but not freed upon failure
# 1128|   		oldblksize = block->endptr - ((char *) block);
# 1129|   
# 1130|-> 		block = (AllocBlock) realloc(block, blksize);
# 1131|   		if (block == NULL)
# 1132|   		{

Error: GCC_ANALYZER_WARNING (CWE-476): [#def511]
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/dsa.c:1812:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/dsa.c:1809:1: enter_function: entry to ‘destroy_superblock’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/dsa.c:1811:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/dsa.c:1811:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/dsa.c:1812:46: danger: dereference of NULL ‘dsa_get_address(area,  span_pointer)’
# 1810|   {
# 1811|   	dsa_area_span *span = dsa_get_address(area, span_pointer);
# 1812|-> 	int			size_class = span->size_class;
# 1813|   	dsa_segment_map *segment_map;
# 1814|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def512]
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1441:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘result.index’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1476:1: enter_function: entry to ‘FreePageManagerPutInternal’
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1489:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1491:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1491:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1499:26: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1499:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1509:26: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1509:25: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1525:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1525:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: following ‘false’ branch (when ‘soft == 0’)...
postgresql-16.8/postgresql-15.12/src/backend/utils/mmgr/freepage.c:1529:34: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def513]
postgresql-16.8/postgresql-15.12/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): [#def514]
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:569:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘read_page’
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:531:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:535:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:542:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:550:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:613:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:615:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:531:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:535:22: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:542:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:550:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:558:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:569:29: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/backend/utils/sort/sharedtuplestore.c:569:29: danger: use of uninitialized value ‘read_page’ here
#  567|   
#  568|   			/* Seek and load the chunk header. */
#  569|-> 			if (BufFileSeekBlock(accessor->read_file, read_page) != 0)
#  570|   				ereport(ERROR,
#  571|   						(errcode_for_file_access(),

Error: GCC_ANALYZER_WARNING (CWE-775): [#def515]
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:342:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "wb")’
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:337:16: acquire_resource: opened here
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:338:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:342:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:342:12: danger: ‘fopen(filename, "wb")’ leaks here; was opened at [(1)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/0)
#  340|   
#  341|   #ifndef WIN32
#  342|-> 	if (chmod(filename, mode))
#  343|   		pg_fatal("could not set permissions on file \"%s\": %m",
#  344|   				 filename);

Error: GCC_ANALYZER_WARNING (CWE-401): [#def516]
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:342:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "wb")’
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:337:16: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:338:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:342:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_basebackup/bbstreamer_file.c:342:12: danger: ‘fopen(filename, "wb")’ leaks here; was allocated at [(1)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/0)
#  340|   
#  341|   #ifndef WIN32
#  342|-> 	if (chmod(filename, mode))
#  343|   		pg_fatal("could not set permissions on file \"%s\": %m",
#  344|   				 filename);

Error: CPPCHECK_WARNING (CWE-476): [#def517]
postgresql-16.8/postgresql-15.12/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: GCC_ANALYZER_WARNING (CWE-476): [#def518]
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:506:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘slot’
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1061:1: enter_function: entry to ‘ParallelBackupEnd’
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1066:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1073:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1075:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1073:21: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1080:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/parallel.c:1080:9: call_function: calling ‘WaitForTerminatingWorkers’ from ‘ParallelBackupEnd’
#  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): [#def519]
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_backup_archiver.c:2189: warning[nullPointer]: Possible null pointer dereference: fh
# 2187|   	}
# 2188|   
# 2189|-> 	if ((cnt = fread(sig, 1, 5, fh)) != 5)
# 2190|   	{
# 2191|   		if (ferror(fh))

Error: CPPCHECK_WARNING (CWE-457): [#def520]
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:1301: error[legacyUninitvar]: Uninitialized variable: archiveFormat
# 1299|   	else
# 1300|   		pg_fatal("invalid output format \"%s\" specified", format);
# 1301|-> 	return archiveFormat;
# 1302|   }
# 1303|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def521]
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11879:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘probin’
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11760:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11763:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11768:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11838:43: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11843:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11853:30: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11875:12: branch_false: following ‘false’ branch (when ‘prosqlbody’ is NULL)...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11879:18: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:11879:18: danger: dereference of NULL ‘probin’
#11877|   		appendPQExpBufferStr(asPart, prosqlbody);
#11878|   	}
#11879|-> 	else if (probin[0] != '\0')
#11880|   	{
#11881|   		appendPQExpBufferStr(asPart, "AS ");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def522]
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13343:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collcollate’
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13275:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13278:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13327:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13332:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13332:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13341:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13341:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13343:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13343:21: danger: dereference of NULL ‘collcollate’
#13341|   	if (fout->remoteVersion < 150000)
#13342|   	{
#13343|-> 		if (collcollate[0] == '\0')
#13344|   			collcollate = NULL;
#13345|   		if (collctype[0] == '\0')

Error: GCC_ANALYZER_WARNING (CWE-476): [#def523]
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13345:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collctype’
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13275:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13278:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13327:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13328:31: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13332:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13341:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13341:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13343:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13343:20: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13345:21: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_dump/pg_dump.c:13345:21: danger: dereference of NULL ‘collctype’
#13343|   		if (collcollate[0] == '\0')
#13344|   			collcollate = NULL;
#13345|-> 		if (collctype[0] == '\0')
#13346|   			collctype = NULL;
#13347|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def524]
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:524:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_resource: opened here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:524:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:524:20: 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): [#def525]
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:524:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:524:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:524:20: 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): [#def526]
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:533:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_resource: opened here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:531:16: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def527]
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:533:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_resetwal/pg_resetwal.c:531:16: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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: CPPCHECK_WARNING (CWE-457): [#def528]
postgresql-16.8/postgresql-15.12/src/bin/pg_rewind/pg_rewind.c:839: error[legacyUninitvar]: Uninitialized variable: histfile
#  837|   			pg_fatal("invalid control file");
#  838|   
#  839|-> 		history = rewind_parseTimeLineHistory(histfile, tli, nentries);
#  840|   		pg_free(histfile);
#  841|   	}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def529]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:138:36: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:82:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:101:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:127:31: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:127:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:132:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:134:34: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:134:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:136:37: branch_true: ...to here
postgresql-16.8/postgresql-15.12/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\n", __LINE__);
#  140|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def530]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:138:37: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:82:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:101:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:127:31: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:127:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:132:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:134:34: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:134:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:136:37: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:138:36: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:138:50: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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\n", __LINE__);
#  140|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def531]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:152:40: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:82:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:101:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:127:31: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:127:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:132:24: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:134:34: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:134:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:136:37: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:138:36: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:152:40: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(19)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/18)
#  150|   				 */
#  151|   				/* remove leading spaces */
#  152|-> 				while (*p == ' ')
#  153|   					p++;
#  154|   				if (strcmp(p, "shut down in recovery\n") == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def532]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:200:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:82:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:101:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:119:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:119:13: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:119:13: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:184:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:188:9: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:188:9: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:195:23: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:195:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:200:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:200:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:207:16: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:209:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:211:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:213:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/controldata.c:200:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(25)](sarif:/runs/0/results/4/codeFlows/0/threadFlows/0/locations/24)
#  198|   
#  199|   	/* Only in <= 9.2 */
#  200|-> 	if (GET_MAJOR_VERSION(cluster->major_version) <= 902)
#  201|   	{
#  202|   		cluster->controldata.data_checksum_version = 0;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def533]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:43:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:374:1: enter_function: entry to ‘check_bin_dir’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:386:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:386:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:387:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:387:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:388:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:388:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/exec.c:395:9: call_function: calling ‘get_bin_version’ from ‘check_bin_dir’
#   41|   	snprintf(cmd, sizeof(cmd), "\"%s/pg_ctl\" --version", cluster->bindir);
#   42|   
#   43|-> 	if ((output = popen(cmd, "r")) == NULL ||
#   44|   		fgets(cmd_output, sizeof(cmd_output), output) == NULL)
#   45|   		pg_fatal("could not get pg_ctl version data using %s: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-401): [#def534]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:420:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:393:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:395:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:399:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:407:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:420:23: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:420:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:421:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:420:13: danger: ‘popen(&cmd, "r")’ leaks here; was allocated at [(5)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/4)
#  418|   			 cluster->bindir, cluster->pgconfig);
#  419|   
#  420|-> 	if ((output = popen(cmd, "r")) == NULL ||
#  421|   		fgets(cmd_output, sizeof(cmd_output), output) == NULL)
#  422|   		pg_fatal("could not get data directory using %s: %s\n",

Error: GCC_ANALYZER_WARNING (CWE-775): [#def535]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:472:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:448:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:456:32: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:464:27: acquire_resource: opened here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:464:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:469:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:472:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:472:28: danger: ‘fopen(&filename, "r")’ leaks here; was opened at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
#  470|   			 lineno++)
#  471|   		{
#  472|-> 			if (fgets(line, sizeof(line), fp) == NULL)
#  473|   				pg_fatal("could not read line %d from file \"%s\": %s\n",
#  474|   						 lineno, filename, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def536]
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:472:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:448:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:456:32: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:464:27: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:464:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:469:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:472:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pg_upgrade/option.c:472:28: danger: ‘fopen(&filename, "r")’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
#  470|   			 lineno++)
#  471|   		{
#  472|-> 			if (fgets(line, sizeof(line), fp) == NULL)
#  473|   				pg_fatal("could not read line %d from file \"%s\": %s\n",
#  474|   						 lineno, filename, strerror(errno));

Error: GCC_ANALYZER_WARNING (CWE-401): [#def537]
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.c:1993:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:311:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:333:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 1991|   	 */
# 1992|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 1993|-> 	if ( ! b->yy_ch_buf )
# 1994|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1995|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def538]
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.c:2035:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:311:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:333:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 2033|   	yy_flush_buffer( b , yyscanner);
# 2034|   
# 2035|-> 	b->yy_input_file = file;
# 2036|   	b->yy_fill_buffer = 1;
# 2037|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def539]
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.c:2157:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:311:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:324:19: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:325:10: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:325:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2155|   		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2156|   
# 2157|-> 		yyg->yy_buffer_stack_max = num_to_alloc;
# 2158|   		yyg->yy_buffer_stack_top = 0;
# 2159|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def540]
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.c:2177:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:311:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:324:19: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:325:10: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/exprscan.l:325:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 2175|   		/* zero only the new slots.*/
# 2176|   		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2177|-> 		yyg->yy_buffer_stack_max = num_to_alloc;
# 2178|   	}
# 2179|   }

Error: GCC_ANALYZER_WARNING (CWE-457): [#def541]
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:2065:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*pval.type’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7391:1: enter_function: entry to ‘threadRun’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7468:16: branch_true: following ‘true’ branch (when ‘remains > 0’)...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7472:32: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7481:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7483:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7585:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7587:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7589:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7593:73: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7595:36: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7601:38: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7601:38: call_function: inlined call to ‘socket_has_input’ from ‘threadRun’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7601:36: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7611:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7611:25: call_function: calling ‘advanceConnectionState’ from ‘threadRun’
# 2063|   coerceToInt(PgBenchValue *pval, int64 *ival)
# 2064|   {
# 2065|-> 	if (pval->type == PGBT_INT)
# 2066|   	{
# 2067|   		*ival = pval->u.ival;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def542]
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:2093:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*pval.type’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7391:1: enter_function: entry to ‘threadRun’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7468:16: branch_true: following ‘true’ branch (when ‘remains > 0’)...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7472:32: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7481:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7483:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7585:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7587:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7589:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7593:73: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7595:36: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7601:38: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7601:38: call_function: inlined call to ‘socket_has_input’ from ‘threadRun’
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7601:36: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7611:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/pgbench/pgbench.c:7611:25: call_function: calling ‘advanceConnectionState’ from ‘threadRun’
# 2091|   coerceToDouble(PgBenchValue *pval, double *dval)
# 2092|   {
# 2093|-> 	if (pval->type == PGBT_DOUBLE)
# 2094|   	{
# 2095|   		*dval = pval->u.dval;

Error: GCC_ANALYZER_WARNING (CWE-762): [#def543]
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:353:25: warning[-Wanalyzer-mismatching-deallocation]: ‘copystream’ should have been deallocated with ‘pclose’ but was deallocated with ‘fclose’
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:268:1: enter_function: entry to ‘do_copy’
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:276:19: call_function: calling ‘parse_slash_copy’ from ‘do_copy’
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:276:19: return_function: returning to ‘do_copy’ from ‘parse_slash_copy’
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:278:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:282:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:285:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:287:21: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:287:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:289:29: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:289:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:291:33: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:294:46: acquire_memory: allocated here (expects deallocation with ‘pclose’)
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:325:12: branch_false: following ‘false’ branch (when ‘copystream’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:337:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:337:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:343:31: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:351:21: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:353:25: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/copy.c:353:25: danger: deallocated with ‘fclose’ here; allocation at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20) expects deallocation with ‘pclose’
#  351|   		if (result < 0 || S_ISDIR(st.st_mode))
#  352|   		{
#  353|-> 			fclose(copystream);
#  354|   			free_copy_options(options);
#  355|   			return false;

Error: CPPCHECK_WARNING (CWE-457): [#def544]
postgresql-16.8/postgresql-15.12/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-476): [#def545]
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:368:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:349:22: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:358:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:358:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:359:36: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:368:17: danger: dereference of NULL ‘<unknown>’
#  366|   									 pivotFieldCompare);
#  367|   		Assert(rp != NULL);
#  368|-> 		row_number = rp->rank;
#  369|   
#  370|   		/* Find target column */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def546]
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:382:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:285:1: enter_function: entry to ‘printCrosstab’
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:349:22: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:358:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:362:38: call_function: inlined call to ‘bsearch’ from ‘printCrosstab’
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:371:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:372:36: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/crosstabview.c:382:17: danger: dereference of NULL ‘<unknown>’
#  380|   									 pivotFieldCompare);
#  381|   		Assert(cp != NULL);
#  382|-> 		col_number = cp->rank;
#  383|   
#  384|   		/* Place value into cell */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def547]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.c:1484:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:668:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:680:3: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:680:3: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:686:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 1482|   		if ( ! YY_CURRENT_BUFFER ) {
# 1483|   			yyensure_buffer_stack (yyscanner);
# 1484|-> 			YY_CURRENT_BUFFER_LVALUE =
# 1485|   				yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
# 1486|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def548]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.c:2484:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:668:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:678:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:678:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:686:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2482|   	 */
# 2483|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 2484|-> 	if ( ! b->yy_ch_buf )
# 2485|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 2486|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def549]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.c:2526:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:668:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:678:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:678:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:686:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2524|   	yy_flush_buffer( b , yyscanner);
# 2525|   
# 2526|-> 	b->yy_input_file = file;
# 2527|   	b->yy_fill_buffer = 1;
# 2528|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def550]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.c:2567:19: warning[-Wanalyzer-malloc-leak]: leak of ‘slash_yy_create_buffer(*(struct yyguts_t *)yyscanner.yyin_r, 16384,  yyscanner)’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:668:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:680:3: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:680:3: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:686:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2565|   	b->yy_buffer_status = YY_BUFFER_NEW;
# 2566|   
# 2567|-> 	if ( b == YY_CURRENT_BUFFER )
# 2568|   		yy_load_buffer_state( yyscanner );
# 2569|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def551]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.c:2648:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:545:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:574:19: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:575:10: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:575:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2646|   		memset(yyg->yy_buffer_stack, 0, num_to_alloc * sizeof(struct yy_buffer_state*));
# 2647|   
# 2648|-> 		yyg->yy_buffer_stack_max = num_to_alloc;
# 2649|   		yyg->yy_buffer_stack_top = 0;
# 2650|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def552]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.c:2668:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:545:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:574:19: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:575:10: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:575:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 2666|   		/* zero only the new slots.*/
# 2667|   		memset(yyg->yy_buffer_stack + yyg->yy_buffer_stack_max, 0, grow_size * sizeof(struct yy_buffer_state*));
# 2668|-> 		yyg->yy_buffer_stack_max = num_to_alloc;
# 2669|   	}
# 2670|   }

Error: CPPCHECK_WARNING (CWE-562): [#def553]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:497: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  495|   	/* Set current output target */
#  496|   	state->output_buf = &mybuf;
#  497|-> 
#  498|   	/* Set input source */
#  499|   	if (state->buffer_stack != NULL)

Error: CPPCHECK_WARNING (CWE-562): [#def554]
postgresql-16.8/postgresql-15.12/src/bin/psql/psqlscanslash.l:571: error[autoVariables]: Address of local auto-variable assigned to a function parameter.
#  569|   	/* Set current output target */
#  570|   	state->output_buf = &mybuf;
#  571|-> 
#  572|   	/* Set input source */
#  573|   	if (state->buffer_stack != NULL)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def555]
postgresql-16.8/postgresql-15.12/src/bin/scripts/vacuumdb.c:724:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cell’
postgresql-16.8/postgresql-15.12/src/bin/scripts/vacuumdb.c:748:1: enter_function: entry to ‘vacuum_all_databases’
postgresql-16.8/postgresql-15.12/src/bin/scripts/vacuumdb.c:765:12: branch_false: following ‘false’ branch (when ‘analyze_in_stages == 0’)...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/bin/scripts/vacuumdb.c:791:29: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/bin/scripts/vacuumdb.c:793:52: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/bin/scripts/vacuumdb.c:795:25: call_function: calling ‘vacuum_one_database’ from ‘vacuum_all_databases’
#  722|   						   echo, tabname);
#  723|   
#  724|-> 		cell = cell->next;
#  725|   	} while (cell != NULL);
#  726|   

Error: CPPCHECK_WARNING (CWE-457): [#def556]
postgresql-16.8/postgresql-15.12/src/common/encnames.c:541: warning[uninitvar]: Uninitialized variable: newkey
#  539|   	}
#  540|   	*np = '\0';
#  541|-> 	return newkey;
#  542|   }
#  543|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def557]
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:180:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘termout’
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:96:19: acquire_resource: opened here
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def558]
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:180:16: warning[-Wanalyzer-malloc-leak]: leak of ‘termout’
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:96:19: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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: CPPCHECK_WARNING (CWE-562): [#def559]
postgresql-16.8/postgresql-15.12/src/common/unicode_norm.c:98: error[returnDanglingLifetime]: Returning pointer to local variable 'decompinfo' that will be invalid when returning.
#   96|   
#   97|   	/* Success! */
#   98|-> 	return &decompinfo.decomps[h];
#   99|   #else
#  100|   	return bsearch(&(code),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def560]
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:909:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘width_header’
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3490:1: enter_function: entry to ‘printQuery’
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3498:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3502:55: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3508:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3550: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-401): [#def561]
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:1219:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fout’
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3490:1: enter_function: entry to ‘printQuery’
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3498:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3502:55: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3508:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/fe_utils/print.c:3550:9: call_function: calling ‘printTable’ from ‘printQuery’
# 1217|   	free(wrap);
# 1218|   
# 1219|-> 	if (is_local_pager)
# 1220|   		ClosePager(fout);
# 1221|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def562]
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.c:3944:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1079:8: enter_function: entry to ‘psql_scan’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1094:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1094:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1099:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 3942|   	 */
# 3943|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2) , yyscanner );
# 3944|-> 	if ( ! b->yy_ch_buf )
# 3945|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 3946|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def563]
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.c:3986:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1079:8: enter_function: entry to ‘psql_scan’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1094:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1094:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-16.8/postgresql-15.12/src/fe_utils/psqlscan.l:1099:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 3984|   	yy_flush_buffer( b , yyscanner);
# 3985|   
# 3986|-> 	b->yy_input_file = file;
# 3987|   	b->yy_fill_buffer = 1;
# 3988|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def564]
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:123:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename,  <unknown>)’
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:119:14: acquire_resource: opened here
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:120:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:123:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def565]
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:123:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename,  <unknown>)’
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:119:14: acquire_memory: allocated here
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:120:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/fe_utils/recovery_gen.c:123:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def566]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:179:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:171:1: enter_function: entry to ‘ECPGsetcommit’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:173:34: call_function: calling ‘ecpg_get_connection’ from ‘ECPGsetcommit’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:173:34: return_function: returning to ‘ECPGsetcommit’ from ‘ecpg_get_connection’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:176:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:179:9: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/connect.c:179:9: danger: dereference of NULL ‘ecpg_get_connection(connection_name)’
#  177|   		return false;
#  178|   
#  179|-> 	ecpg_log("ECPGsetcommit on line %d: action \"%s\"; connection \"%s\"\n", lineno, mode, con->name);
#  180|   
#  181|   	if (con->autocommit && strncmp(mode, "off", strlen("off")) == 0)

Error: GCC_ANALYZER_WARNING (CWE-401): [#def567]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/memory.c:21:36: warning[-Wanalyzer-malloc-leak]: leak of ‘ecpg_alloc(16, lineno)’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/memory.c:124:1: enter_function: entry to ‘ecpg_add_mem’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/memory.c:126:51: call_function: calling ‘ecpg_alloc’ from ‘ecpg_add_mem’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/memory.c:126:51: return_function: returning to ‘ecpg_add_mem’ from ‘ecpg_alloc’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/memory.c:128:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/memory.c:131:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/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): [#def568]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:155:17: warning[-Wanalyzer-malloc-leak]: leak of ‘ECPGget_sqlca()’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:275:1: enter_function: entry to ‘ecpg_log’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:278:33: call_function: calling ‘ECPGget_sqlca’ from ‘ecpg_log’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:278:33: return_function: returning to ‘ecpg_log’ from ‘ECPGget_sqlca’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:155:17: danger: ‘ECPGget_sqlca()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/7)
#  153|   			return NULL;
#  154|   		ecpg_init_sqlca(sqlca);
#  155|-> 		pthread_setspecific(sqlca_key, sqlca);
#  156|   	}
#  157|   	return sqlca;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def569]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:322:25: warning[-Wanalyzer-malloc-leak]: leak of ‘ECPGget_sqlca()’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:275:1: enter_function: entry to ‘ecpg_log’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:278:33: call_function: calling ‘ECPGget_sqlca’ from ‘ecpg_log’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:278:33: return_function: returning to ‘ecpg_log’ from ‘ECPGget_sqlca’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:288:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:292:23: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:300:12: branch_false: following ‘false’ branch (when ‘fmt’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:303:13: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:313:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:315:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:320:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/ecpglib/misc.c:322:25: danger: ‘ECPGget_sqlca()’ leaks here; was allocated at [(8)](sarif:/runs/0/results/5/codeFlows/0/threadFlows/0/locations/7)
#  320|   		if (ecpg_internal_regression_mode && sqlca != NULL)
#  321|   		{
#  322|-> 			fprintf(debugstream, "[NO_PID]: sqlca: code: %ld, state: %s\n",
#  323|   					sqlca->sqlcode, sqlca->sqlstate);
#  324|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def570]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4087:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4020:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4027:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4031:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4031:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4053:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4058:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4067:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4069:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4073:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4089:41: call_function: inlined call to ‘base_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4096:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4100:40: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4069:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4073:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4078:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4080:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4089:41: call_function: inlined call to ‘base_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4087:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 4085|   					b->yy_buf_size *= 2;
# 4086|   
# 4087|-> 				b->yy_ch_buf = (char *)
# 4088|   					/* Include room in for 2 EOB chars. */
# 4089|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def571]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4368:12: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1620:1: enter_function: entry to ‘parse_include’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1630:22: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1630:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1707:19: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1710:26: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1711:9: call_function: calling ‘base_yy_create_buffer’ from ‘parse_include’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1711:9: return_function: returning to ‘parse_include’ from ‘base_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1711:9: call_function: calling ‘base_yy_switch_to_buffer’ from ‘parse_include’
# 4366|        */
# 4367|   	yyensure_buffer_stack ();
# 4368|-> 	if ( YY_CURRENT_BUFFER == new_buffer )
# 4369|   		return;
# 4370|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def572]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4418:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4404:21: enter_function: entry to ‘base_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4408:31: call_function: inlined call to ‘base_yyalloc’ from ‘base_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4409:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4412:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4418:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/2/codeFlows/0/threadFlows/0/locations/2)
# 4416|   	 */
# 4417|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 4418|-> 	if ( ! b->yy_ch_buf )
# 4419|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 4420|   

Error: CPPCHECK_WARNING (CWE-476): [#def573]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4458: warning[nullPointer]: Possible null pointer dereference: b
# 4456|   	yy_flush_buffer( b );
# 4457|   
# 4458|-> 	b->yy_input_file = file;
# 4459|   	b->yy_fill_buffer = 1;
# 4460|   

Error: CPPCHECK_WARNING (CWE-476): [#def574]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4459: warning[nullPointer]: Possible null pointer dereference: b
# 4457|   
# 4458|   	b->yy_input_file = file;
# 4459|-> 	b->yy_fill_buffer = 1;
# 4460|   
# 4461|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def575]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4498:19: warning[-Wanalyzer-malloc-leak]: leak of ‘base_yy_create_buffer(base_yyin, 16384)’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1620:1: enter_function: entry to ‘parse_include’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1630:22: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1630:22: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1707:19: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1710:26: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1711:9: call_function: calling ‘base_yy_create_buffer’ from ‘parse_include’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1711:9: return_function: returning to ‘parse_include’ from ‘base_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1711:9: call_function: calling ‘base_yy_switch_to_buffer’ from ‘parse_include’
# 4496|   	b->yy_buffer_status = YY_BUFFER_NEW;
# 4497|   
# 4498|-> 	if ( b == YY_CURRENT_BUFFER )
# 4499|   		yy_load_buffer_state(  );
# 4500|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def576]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4646:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<return-value>’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1782:1: enter_function: entry to ‘isinformixdefine’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1799:31: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1799:31: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1805:17: call_function: calling ‘base_yy_scan_string’ from ‘isinformixdefine’
# 4644|   {
# 4645|       
# 4646|-> 	return yy_scan_bytes( yystr, (int) strlen(yystr) );
# 4647|   }
# 4648|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def577]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4646:16: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1782:1: enter_function: entry to ‘isinformixdefine’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1799:31: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1799:31: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1805:17: call_function: calling ‘base_yy_scan_string’ from ‘isinformixdefine’
# 4644|   {
# 4645|       
# 4646|-> 	return yy_scan_bytes( yystr, (int) strlen(yystr) );
# 4647|   }
# 4648|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def578]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4672:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4656:17: enter_function: entry to ‘base_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4665:24: call_function: inlined call to ‘base_yyalloc’ from ‘base_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4666:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.c:4674:13: call_function: calling ‘base_yy_scan_buffer’ from ‘base_yy_scan_bytes’
# 4670|   		buf[i] = yybytes[i];
# 4671|   
# 4672|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 4673|   
# 4674|   	b = yy_scan_buffer( buf, n );

Error: CPPCHECK_WARNING (CWE-401): [#def579]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1574: error[memleakOnRealloc]: Common realloc mistake: 'literalbuf' nulled but not freed upon failure
# 1572|   		while ((literallen+yleng) >= literalalloc);
# 1573|   		literalbuf = (char *) realloc(literalbuf, literalalloc);
# 1574|-> 	}
# 1575|   	/* append new data, add trailing null */
# 1576|   	memcpy(literalbuf+literallen, ytext, yleng);

Error: CPPCHECK_WARNING (CWE-401): [#def580]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/pgc.l:1589: error[memleakOnRealloc]: Common realloc mistake: 'literalbuf' nulled but not freed upon failure
# 1587|   		literalalloc *= 2;
# 1588|   		literalbuf = (char *) realloc(literalbuf, literalalloc);
# 1589|-> 	}
# 1590|   	/* append new data, add trailing null */
# 1591|   	literalbuf[literallen] = ychar;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def581]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37115:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37070:6: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37076:34: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37102:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37104:7: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37113:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37115:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37115:9: danger: use of uninitialized value ‘yyss’ here
#37113|           if (! yyptr)
#37114|             goto yyexhaustedlab;
#37115|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#37116|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#37117|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def582]
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37245:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37070:6: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37138:6: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37138:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37141:3: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37153:6: branch_true: following ‘true’ branch (when ‘yyn == -5912’)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37154:5: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37225:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37227:3: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/ecpg/preproc/preproc.c:37245:3: danger: use of uninitialized value ‘*<unknown>’ here
#37243|        unconditionally makes the parser a bit smaller, and it avoids a
#37244|        GCC warning that YYVAL may be used uninitialized.  */
#37245|->   yyval = yyvsp[1-yylen];
#37246|   
#37247|     /* Default location. */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def583]
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:734:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:3092:1: enter_function: entry to ‘pqPipelineProcessQueue’
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:3150:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:3151:17: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:3150:13: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:3161:32: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/interfaces/libpq/fe-exec.c:3161:32: call_function: calling ‘PQmakeEmptyPGresult’ from ‘pqPipelineProcessQueue’
#  732|   	{
#  733|   		/* only send DESTROY to successfully-initialized event procs */
#  734|-> 		if (res->events[i].resultInitialized)
#  735|   		{
#  736|   			PGEventResultDestroy evt;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def584]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1308:45: warning[-Wanalyzer-null-argument]: use of NULL ‘colname’ where non-null expected
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1179:1: enter_function: entry to ‘resolve_column_ref’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1210:17: call_function: inlined call to ‘list_length’ from ‘resolve_column_ref’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1282:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1285:17: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1292:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1294:28: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1294:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1297:68: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1302:40: branch_true: following ‘true’ branch (when ‘i >= 0’)...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1304:100: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1308:45: danger: argument 2 (‘colname’) NULL where non-null expected
# 1306|   					Assert(fld->dtype == PLPGSQL_DTYPE_RECFIELD &&
# 1307|   						   fld->recparentno == nse->itemno);
# 1308|-> 					if (strcmp(fld->fieldname, colname) == 0)
# 1309|   					{
# 1310|   						return make_datum_param(expr, i, cref->location);

Error: CPPCHECK_WARNING (CWE-768): [#def585]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1458: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1456|   	int			nnames;
# 1457|   
# 1458|-> 	idents = list_make2(makeString(word1),
# 1459|   						makeString(word2));
# 1460|   

Error: CPPCHECK_WARNING (CWE-768): [#def586]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1575: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1573|   							 */
# 1574|   							new = plpgsql_build_recfield(rec, word2);
# 1575|-> 							idents = list_make2(makeString(word1),
# 1576|   												makeString(word2));
# 1577|   						}

Error: CPPCHECK_WARNING (CWE-768): [#def587]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1582: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1580|   							/* Block-qualified reference to record variable. */
# 1581|   							new = plpgsql_build_recfield(rec, word3);
# 1582|-> 							idents = list_make3(makeString(word1),
# 1583|   												makeString(word2),
# 1584|   												makeString(word3));

Error: CPPCHECK_WARNING (CWE-768): [#def588]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1582: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))},(union ListCell){.ptr_value=(makeString(word3))}' depends on order of evaluation of side effects
# 1580|   							/* Block-qualified reference to record variable. */
# 1581|   							new = plpgsql_build_recfield(rec, word3);
# 1582|-> 							idents = list_make3(makeString(word1),
# 1583|   												makeString(word2),
# 1584|   												makeString(word3));

Error: CPPCHECK_WARNING (CWE-768): [#def589]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1600: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1598|   
# 1599|   	/* Nothing found */
# 1600|-> 	idents = list_make3(makeString(word1),
# 1601|   						makeString(word2),
# 1602|   						makeString(word3));

Error: CPPCHECK_WARNING (CWE-768): [#def590]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_comp.c:1600: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))},(union ListCell){.ptr_value=(makeString(word3))}' depends on order of evaluation of side effects
# 1598|   
# 1599|   	/* Nothing found */
# 1600|-> 	idents = list_make3(makeString(word1),
# 1601|   						makeString(word2),
# 1602|   						makeString(word3));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def591]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:5123:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7422:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7427:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7538:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7540:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7540:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 5121|   				{
# 5122|   					if (var->datatype->typisarray &&
# 5123|-> 						!VARATT_IS_EXTERNAL_EXPANDED_RW(DatumGetPointer(newvalue)))
# 5124|   					{
# 5125|   						/* array and not already R/W, so apply expand_array */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def592]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:8567:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7422:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7427:12: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7538:20: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7540:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_exec.c:7540:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 8565|   	 */
# 8566|   	if (!estate->atomic && !isnull && var->datatype->typlen == -1 &&
# 8567|-> 		VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
# 8568|   	{
# 8569|   		MemoryContext oldcxt;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def593]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1888:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1843:6: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1849:34: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1875:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1877:7: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1886:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1888:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1888:9: danger: use of uninitialized value ‘yyss’ here
# 1886|           if (! yyptr)
# 1887|             goto yyexhaustedlab;
# 1888|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1889|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1890|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def594]
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:2018:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1843:6: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1911:6: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1911:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1914:3: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1926:6: branch_true: following ‘true’ branch (when ‘yyn == -248’)...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1927:5: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:1998:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:2000:3: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/pl/plpgsql/src/pl_gram.c:2018:3: danger: use of uninitialized value ‘*<unknown>’ here
# 2016|        unconditionally makes the parser a bit smaller, and it avoids a
# 2017|        GCC warning that YYVAL may be used uninitialized.  */
# 2018|->   yyval = yyvsp[1-yylen];
# 2019|   
# 2020|     /* Default location. */

Error: CPPCHECK_WARNING (CWE-476): [#def595]
postgresql-16.8/postgresql-15.12/src/pl/tcl/pltcl.c:3208: warning[nullPointer]: Possible null pointer dereference: tupdesc
# 3206|   	}
# 3207|   
# 3208|-> 	values = (char **) palloc0(tupdesc->natts * sizeof(char *));
# 3209|   
# 3210|   	if (kvObjc % 2 != 0)

Error: COMPILER_WARNING: [#def596]
postgresql-16.8/postgresql-15.12/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: [#def597]
postgresql-16.8/postgresql-15.12/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: [#def598]
postgresql-16.8/postgresql-15.12/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-401): [#def599]
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1436:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1369:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1376:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1380:14: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1380:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1402:33: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1407:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1416:25: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1418:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1422:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1438:41: call_function: inlined call to ‘spec_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1445:28: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1449:40: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1418:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1422:41: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1427:28: branch_true: following ‘true’ branch...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1429:48: branch_true: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1438:41: call_function: inlined call to ‘spec_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1436:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1434|   					b->yy_buf_size *= 2;
# 1435|   
# 1436|-> 				b->yy_ch_buf = (char *)
# 1437|   					/* Include room in for 2 EOB chars. */
# 1438|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def600]
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1721:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1707:21: enter_function: entry to ‘spec_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1711:31: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_create_buffer’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1712:12: branch_false: following ‘false’ branch...
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1715:9: branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1721:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 1719|   	 */
# 1720|   	b->yy_ch_buf = (char *) yyalloc( (yy_size_t) (b->yy_buf_size + 2)  );
# 1721|-> 	if ( ! b->yy_ch_buf )
# 1722|   		YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" );
# 1723|   

Error: CPPCHECK_WARNING (CWE-476): [#def601]
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1761: warning[nullPointer]: Possible null pointer dereference: b
# 1759|   	yy_flush_buffer( b );
# 1760|   
# 1761|-> 	b->yy_input_file = file;
# 1762|   	b->yy_fill_buffer = 1;
# 1763|   

Error: CPPCHECK_WARNING (CWE-476): [#def602]
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1762: warning[nullPointer]: Possible null pointer dereference: b
# 1760|   
# 1761|   	b->yy_input_file = file;
# 1762|-> 	b->yy_fill_buffer = 1;
# 1763|   
# 1764|       /* If b is the current buffer, then yy_init_buffer was _probably_

Error: GCC_ANALYZER_WARNING (CWE-401): [#def603]
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1975:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1959:17: enter_function: entry to ‘spec_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1968:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_scan_bytes’
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1969:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/postgresql-15.12/src/test/isolation/specscanner.c:1977:13: call_function: calling ‘spec_yy_scan_buffer’ from ‘spec_yy_scan_bytes’
# 1973|   		buf[i] = yybytes[i];
# 1974|   
# 1975|-> 	buf[_yybytes_len] = buf[_yybytes_len+1] = YY_END_OF_BUFFER_CHAR;
# 1976|   
# 1977|   	b = yy_scan_buffer( buf, n );

Error: GCC_ANALYZER_WARNING (CWE-476): [#def604]
postgresql-16.8/src/backend/access/brin/../../../../src/include/access/tupmacs.h:28:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/access/brin/brin_tuple.c:553:1: enter_function: entry to ‘brin_deform_tuple’
postgresql-16.8/src/backend/access/brin/brin_tuple.c:565:16: branch_true: following ‘true’ branch (when ‘dMemtuple’ is non-NULL)...
postgresql-16.8/src/backend/access/brin/brin_tuple.c:565:28: branch_true: ...to here
postgresql-16.8/src/backend/access/brin/brin_tuple.c:565:28: call_function: calling ‘brin_memtuple_initialize’ from ‘brin_deform_tuple’
postgresql-16.8/src/backend/access/brin/brin_tuple.c:565:28: return_function: returning to ‘brin_deform_tuple’ from ‘brin_memtuple_initialize’
postgresql-16.8/src/backend/access/brin/brin_tuple.c:568:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/brin/brin_tuple.c:572:14: branch_false: ...to here
postgresql-16.8/src/backend/access/brin/brin_tuple.c:583:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/brin/brin_tuple.c:587:9: branch_false: ...to here
postgresql-16.8/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): [#def605]
postgresql-16.8/src/backend/access/brin/brin_minmax_multi.c:1519:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘distances’
postgresql-16.8/src/backend/access/brin/brin_minmax_multi.c:2731:1: enter_function: entry to ‘brin_minmax_multi_union’
postgresql-16.8/src/backend/access/brin/brin_minmax_multi.c:2819:21: call_function: calling ‘build_distances’ from ‘brin_minmax_multi_union’
postgresql-16.8/src/backend/access/brin/brin_minmax_multi.c:2819:21: return_function: returning to ‘brin_minmax_multi_union’ from ‘build_distances’
postgresql-16.8/src/backend/access/brin/brin_minmax_multi.c:2832:20: call_function: calling ‘reduce_expanded_ranges’ from ‘brin_minmax_multi_union’
# 1517|   	{
# 1518|   		/* index of the gap between (index) and (index+1) ranges */
# 1519|-> 		int			index = distances[i].index;
# 1520|   
# 1521|   		Assert((index >= 0) && ((index + 1) < neranges));

Error: CPPCHECK_WARNING (CWE-476): [#def606]
postgresql-16.8/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): [#def607]
postgresql-16.8/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): [#def608]
postgresql-16.8/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): [#def609]
postgresql-16.8/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): [#def610]
postgresql-16.8/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): [#def611]
postgresql-16.8/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): [#def612]
postgresql-16.8/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-476): [#def613]
postgresql-16.8/src/backend/access/gin/../../../../src/include/storage/bufpage.h:340:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘childpage’
postgresql-16.8/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-16.8/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-16.8/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-688): [#def614]
postgresql-16.8/src/backend/access/gin/ginbtree.c:579:25: warning[-Wanalyzer-null-argument]: use of NULL ‘newrootpg’ where non-null expected
postgresql-16.8/src/backend/access/gin/ginbtree.c:811:1: enter_function: entry to ‘ginInsertValue’
postgresql-16.8/src/backend/access/gin/ginbtree.c:817:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/gin/ginbtree.c:818:17: branch_true: ...to here
postgresql-16.8/src/backend/access/gin/ginbtree.c:818:17: call_function: calling ‘ginFinishOldSplit’ from ‘ginInsertValue’
#argument 2 of ‘__builtin_memcpy’ must be non-null
#  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): [#def615]
postgresql-16.8/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: CPPCHECK_WARNING (CWE-457): [#def616]
postgresql-16.8/src/backend/access/gist/gistutil.c:207: error[uninitvar]: Uninitialized variable: &attrsize
#  205|   										giststate->supportCollation[i],
#  206|   										PointerGetDatum(evec),
#  207|-> 										PointerGetDatum(&attrsize));
#  208|   
#  209|   			isnull[i] = false;

Error: CPPCHECK_WARNING (CWE-457): [#def617]
postgresql-16.8/src/backend/access/gist/gistutil.c:276: error[uninitvar]: Uninitialized variable: &dstsize
#  274|   								 giststate->supportCollation[attno],
#  275|   								 PointerGetDatum(evec),
#  276|-> 								 PointerGetDatum(&dstsize));
#  277|   	}
#  278|   }

Error: GCC_ANALYZER_WARNING (CWE-688): [#def618]
postgresql-16.8/src/backend/access/hash/hashpage.c:1531:17: warning[-Wanalyzer-null-argument]: use of NULL where non-null expected
postgresql-16.8/src/backend/access/hash/hashpage.c:1516:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/hash/hashpage.c:1521:21: branch_false: ...to here
postgresql-16.8/src/backend/access/hash/hashpage.c:1529:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/hash/hashpage.c:1530:25: branch_true: ...to here
postgresql-16.8/src/backend/access/hash/hashpage.c:1530:25: release_memory: ‘cache’ is NULL
postgresql-16.8/src/backend/access/hash/hashpage.c:1531:24: release_memory: ‘0’ is NULL
postgresql-16.8/src/backend/access/hash/hashpage.c:1531:17: danger: argument 1 (‘*rel.rd_amcache’) NULL where non-null expected
#argument 1 of ‘__builtin_memcpy’ must be non-null
# 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-476): [#def619]
postgresql-16.8/src/backend/access/heap/../../../../src/include/access/tableam.h:1053:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-16.8/src/backend/access/heap/heapam_handler.c:691:1: enter_function: entry to ‘heapam_relation_copy_for_cluster’
postgresql-16.8/src/backend/access/heap/heapam_handler.c:735:12: branch_false: following ‘false’ branch (when ‘use_sort == 0’)...
postgresql-16.8/src/backend/access/heap/heapam_handler.c:747:13: branch_false: ...to here
postgresql-16.8/src/backend/access/heap/heapam_handler.c:747:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/heap/heapam_handler.c:749:33: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/heapam_handler.c:808:30: call_function: calling ‘table_scan_getnextslot’ from ‘heapam_relation_copy_for_cluster’
# 1051|   table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1052|   {
# 1053|-> 	slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1054|   
# 1055|   	/* We don't expect actual scans using NoMovementScanDirection */

Error: CPPCHECK_WARNING (CWE-457): [#def620]
postgresql-16.8/src/backend/access/heap/heapam.c:5671: error[legacyUninitvar]: Uninitialized variable: status
# 5669|   				}
# 5670|   
# 5671|-> 				result = test_lockmode_for_conflict(status, rawxmax, mode,
# 5672|   													&mytup, &needwait);
# 5673|   

Error: CPPCHECK_WARNING (CWE-457): [#def621]
postgresql-16.8/src/backend/access/heap/heapam.c:6212: error[legacyUninitvar]: Uninitialized variable: ret
# 6210|   	 * don't bother optimizing that.
# 6211|   	 */
# 6212|-> 	if (!ret)
# 6213|   	{
# 6214|   		UnlockTuple(relation, &oldtup.t_self, InplaceUpdateTupleLock);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def622]
postgresql-16.8/src/backend/access/heap/heapam.c:10117:63: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-16.8/src/backend/access/heap/heapam.c:9991:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/heap/heapam.c:10032:13: branch_false: ...to here
postgresql-16.8/src/backend/access/heap/heapam.c:10063:12: branch_true: following ‘true’ branch (when ‘newaction == 0’)...
postgresql-16.8/src/backend/access/heap/heapam.c:10070:27: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/heapam.c:10076:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/heap/heapam.c:10079:21: branch_false: ...to here
postgresql-16.8/src/backend/access/heap/heapam.c:10079:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/heap/heapam.c:10082:25: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/heapam.c:10085:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/heap/heapam.c:10092:17: branch_false: ...to here
postgresql-16.8/src/backend/access/heap/heapam.c:10106:20: branch_true: following ‘true’ branch (when ‘prefixlen != 0’)...
postgresql-16.8/src/backend/access/heap/heapam.c:10111:31: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/heapam.c:10117:63: danger: dereference of NULL ‘oldtup.t_data’
#10115|   
#10116|   			/* copy prefix from old tuple */
#10117|-> 			memcpy(newp, (char *) oldtup.t_data + oldtup.t_data->t_hoff, prefixlen);
#10118|   			newp += prefixlen;
#10119|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def623]
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1904:58: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘deadoffsets[i]’
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1797:13: branch_true: following ‘true’ branch (when ‘tuples_frozen == 0’)...
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1805:43: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1808:20: branch_true: following ‘true’ branch (when ‘tuples_frozen == 0’)...
 branch_true: ...to here
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1892:12: branch_true: following ‘true’ branch (when ‘lpdead_items > 0’)...
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1894:31: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1902:33: branch_true: following ‘true’ branch (when ‘lpdead_items > i’)...
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1904:58: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1902:33: branch_true: following ‘true’ branch (when ‘lpdead_items > i’)...
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1904:58: branch_true: ...to here
postgresql-16.8/src/backend/access/heap/vacuumlazy.c:1904:58: danger: use of uninitialized value ‘deadoffsets[i]’ here
# 1902|   		for (int i = 0; i < lpdead_items; i++)
# 1903|   		{
# 1904|-> 			ItemPointerSetOffsetNumber(&tmp, deadoffsets[i]);
# 1905|   			dead_items->items[dead_items->num_items++] = tmp;
# 1906|   		}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def624]
postgresql-16.8/src/backend/access/index/../../../../src/include/access/tableam.h:1053:30: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘sscan’
postgresql-16.8/src/backend/access/index/genam.c:796:1: enter_function: entry to ‘systable_inplace_update_begin’
postgresql-16.8/src/backend/access/index/genam.c:816:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/backend/access/index/genam.c:841:20: branch_false: following ‘false’ branch (when ‘retries != 10001’)...
postgresql-16.8/src/backend/access/index/genam.c:844:17: branch_false: ...to here
postgresql-16.8/src/backend/access/index/genam.c:845:24: call_function: calling ‘systable_beginscan’ from ‘systable_inplace_update_begin’
postgresql-16.8/src/backend/access/index/genam.c:845:24: return_function: returning to ‘systable_inplace_update_begin’ from ‘systable_beginscan’
postgresql-16.8/src/backend/access/index/genam.c:847:26: call_function: calling ‘systable_getnext’ from ‘systable_inplace_update_begin’
# 1051|   table_scan_getnextslot(TableScanDesc sscan, ScanDirection direction, TupleTableSlot *slot)
# 1052|   {
# 1053|-> 	slot->tts_tableOid = RelationGetRelid(sscan->rs_rd);
# 1054|   
# 1055|   	/* We don't expect actual scans using NoMovementScanDirection */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def625]
postgresql-16.8/src/backend/access/nbtree/../../../../src/include/storage/block.h:105:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:648:1: enter_function: entry to ‘_bt_bottomupdel_finish_pending’
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:657:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:659:39: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:665:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:690:57: call_function: inlined call to ‘BTreeTupleGetNPosting’ from ‘_bt_bottomupdel_finish_pending’
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:696:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:709:42: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:709:42: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_bottomupdel_finish_pending’
postgresql-16.8/src/backend/access/nbtree/nbtdedup.c:709:42: return_function: returning to ‘_bt_bottomupdel_finish_pending’ from ‘BTreeTupleGetHeapTID’
postgresql-16.8/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): [#def626]
postgresql-16.8/src/backend/access/nbtree/../../../../src/include/storage/itemptr.h:116:16: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2646:1: enter_function: entry to ‘_bt_check_third_page’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2655:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2663:12: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2671:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2675:9: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2675:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2675:9: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2675:9: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_check_third_page’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2675:9: return_function: returning to ‘_bt_check_third_page’ from ‘BTreeTupleGetHeapTID’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2675: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): [#def627]
postgresql-16.8/src/backend/access/nbtree/../../../../src/include/storage/itemptr.h:176:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2220:1: enter_function: entry to ‘_bt_truncate’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2238:21: call_function: calling ‘_bt_keep_natts’ from ‘_bt_truncate’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2238:21: return_function: returning to ‘_bt_truncate’ from ‘_bt_keep_natts’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2265:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2284:19: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2297:24: call_function: calling ‘BTreeTupleGetHeapTID’ from ‘_bt_truncate’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2297:24: return_function: returning to ‘_bt_truncate’ from ‘BTreeTupleGetHeapTID’
postgresql-16.8/src/backend/access/nbtree/nbtutils.c:2306:9: call_function: inlined call to ‘ItemPointerCopy’ from ‘_bt_truncate’
#  174|   	Assert(PointerIsValid(toPointer));
#  175|   	Assert(PointerIsValid(fromPointer));
#  176|-> 	*toPointer = *fromPointer;
#  177|   }
#  178|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def628]
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:1168:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:939:1: enter_function: entry to ‘_bt_strategy’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:959:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:966:9: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:966:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:966:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:967:20: release_memory: ‘leftinterval’ is NULL
postgresql-16.8/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): [#def629]
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:1184:14: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘split’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:939:1: enter_function: entry to ‘_bt_strategy’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:959:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:966:9: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:966:9: call_function: calling ‘_bt_interval_edges’ from ‘_bt_strategy’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:966:9: return_function: returning to ‘_bt_strategy’ from ‘_bt_interval_edges’
postgresql-16.8/src/backend/access/nbtree/nbtsplitloc.c:968:21: release_memory: ‘rightinterval’ is NULL
postgresql-16.8/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): [#def630]
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:389:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘nposting’
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:253:1: enter_function: entry to ‘btree_xlog_split’
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:309:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:319:51: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:333:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:373:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:378:28: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:378:53: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:385:28: branch_false: following ‘false’ branch (when ‘off != replacepostingoff’)...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: following ‘false’ branch (when ‘newitemonleft == 0’)...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:406:34: call_function: inlined call to ‘PageGetItemId’ from ‘btree_xlog_split’
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:409:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:412:35: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:378:53: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:385:28: branch_false: following ‘false’ branch (when ‘off != replacepostingoff’)...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:398:33: branch_false: following ‘false’ branch (when ‘newitemonleft == 0’)...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:406:34: call_function: inlined call to ‘PageGetItemId’ from ‘btree_xlog_split’
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:409:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:412:35: branch_false: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:378:53: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:385:28: branch_true: following ‘true’ branch (when ‘off == replacepostingoff’)...
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:389:37: branch_true: ...to here
postgresql-16.8/src/backend/access/nbtree/nbtxlog.c:389:37: danger: dereference of NULL ‘nposting’
#  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-476): [#def631]
postgresql-16.8/src/backend/access/spgist/spgutils.c:793:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/access/spgist/spgutils.c:992:1: enter_function: entry to ‘spgFormInnerTuple’
postgresql-16.8/src/backend/access/spgist/spgutils.c:1035:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/access/spgist/spgutils.c:1035:13: branch_false: ...to here
postgresql-16.8/src/backend/access/spgist/spgutils.c:1035:13: branch_false: following ‘false’ branch (when ‘nNodes <= 8191’)...
postgresql-16.8/src/backend/access/spgist/spgutils.c:1041:34: branch_false: ...to here
postgresql-16.8/src/backend/access/spgist/spgutils.c:1047:12: branch_true: following ‘true’ branch (when ‘hasPrefix != 0’)...
postgresql-16.8/src/backend/access/spgist/spgutils.c:1048:17: branch_true: ...to here
postgresql-16.8/src/backend/access/spgist/spgutils.c:1048:17: branch_false: following ‘false’ branch...
postgresql-16.8/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: CPPCHECK_WARNING (CWE-476): [#def632]
postgresql-16.8/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: CPPCHECK_WARNING (CWE-682): [#def633]
postgresql-16.8/src/backend/access/transam/xlog.c:1556: error[nullPointerArithmetic]: Pointer addition with NULL pointer.
# 1554|   		Assert(((XLogPageHeader) cachedPos)->xlp_magic == XLOG_PAGE_MAGIC);
# 1555|   		Assert(((XLogPageHeader) cachedPos)->xlp_pageaddr == ptr - (ptr % XLOG_BLCKSZ));
# 1556|-> 		return cachedPos + ptr % XLOG_BLCKSZ;
# 1557|   	}
# 1558|   

Error: GCC_ANALYZER_WARNING (CWE-131): [#def634]
postgresql-16.8/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-16.8/src/backend/access/transam/xloginsert.c:1225:1: enter_function: entry to ‘log_newpage_buffer’
postgresql-16.8/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): [#def635]
postgresql-16.8/src/backend/bootstrap/bootparse.c:1152:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/backend/bootstrap/bootparse.c:1110:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/bootstrap/bootparse.c:1116:28: branch_true: ...to here
postgresql-16.8/src/backend/bootstrap/bootparse.c:1139:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/backend/bootstrap/bootparse.c:1141:7: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootparse.c:1150:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/bootstrap/bootparse.c:1152:9: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootparse.c:1152:9: danger: use of uninitialized value ‘yyss’ here
# 1150|           if (! yyptr)
# 1151|             goto yyexhaustedlab;
# 1152|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1153|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1154|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def636]
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1492:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1425:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1432:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1436:14: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1436:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1458:33: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1463:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1472:25: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1474:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1478:41: branch_true: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1494:41: call_function: inlined call to ‘boot_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1501:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1505:40: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1474:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1478:41: branch_true: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1483:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1485:48: branch_true: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1494:41: call_function: inlined call to ‘boot_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1492:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1490|   					b->yy_buf_size *= 2;
# 1491|   
# 1492|-> 				b->yy_ch_buf = (char *)
# 1493|   					/* Include room in for 2 EOB chars. */
# 1494|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def637]
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1780:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1766:21: enter_function: entry to ‘boot_yy_create_buffer’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1770:31: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_create_buffer’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1771:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1774:9: branch_false: ...to here
postgresql-16.8/src/backend/bootstrap/bootscanner.c:1780:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 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()" );
# 1782|   

Error: CPPCHECK_WARNING (CWE-476): [#def638]
postgresql-16.8/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): [#def639]
postgresql-16.8/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): [#def640]
postgresql-16.8/src/backend/bootstrap/bootscanner.c:2034:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:2018:17: enter_function: entry to ‘boot_yy_scan_bytes’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:2027:24: call_function: inlined call to ‘boot_yyalloc’ from ‘boot_yy_scan_bytes’
postgresql-16.8/src/backend/bootstrap/bootscanner.c:2028:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def641]
postgresql-16.8/src/backend/catalog/objectaddress.c:2356: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(typename)},((union ListCell){.ptr_value=((list_nth_cell(args,0)->ptr_value))})' depends on order of evaluation of side effects
# 2354|   		case OBJECT_DOMCONSTRAINT:
# 2355|   		case OBJECT_TRANSFORM:
# 2356|-> 			objnode = (Node *) list_make2(typename, linitial(args));
# 2357|   			break;
# 2358|   		case OBJECT_PUBLICATION_REL:

Error: CPPCHECK_WARNING (CWE-768): [#def642]
postgresql-16.8/src/backend/catalog/objectaddress.c:2359: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(name)},((union ListCell){.ptr_value=((list_nth_cell(args,0)->ptr_value))})' depends on order of evaluation of side effects
# 2357|   			break;
# 2358|   		case OBJECT_PUBLICATION_REL:
# 2359|-> 			objnode = (Node *) list_make2(name, linitial(args));
# 2360|   			break;
# 2361|   		case OBJECT_PUBLICATION_NAMESPACE:

Error: CPPCHECK_WARNING (CWE-768): [#def643]
postgresql-16.8/src/backend/catalog/objectaddress.c:2363: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=((list_nth_cell(name,0)->ptr_value))}),((union ListCell){.ptr_value=((list_nth_cell(args,0)->ptr_value))})' depends on order of evaluation of side effects
# 2361|   		case OBJECT_PUBLICATION_NAMESPACE:
# 2362|   		case OBJECT_USER_MAPPING:
# 2363|-> 			objnode = (Node *) list_make2(linitial(name), linitial(args));
# 2364|   			break;
# 2365|   		case OBJECT_DEFACL:

Error: CPPCHECK_WARNING (CWE-768): [#def644]
postgresql-16.8/src/backend/catalog/objectaddress.c:2370: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(name)},(union ListCell){.ptr_value=(args)}' depends on order of evaluation of side effects
# 2368|   		case OBJECT_AMOP:
# 2369|   		case OBJECT_AMPROC:
# 2370|-> 			objnode = (Node *) list_make2(name, args);
# 2371|   			break;
# 2372|   		case OBJECT_FUNCTION:

Error: CPPCHECK_WARNING (CWE-768): [#def645]
postgresql-16.8/src/backend/catalog/objectaddress.c:4943: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((coll->collname).data))}' depends on order of evaluation of side effects
# 4941|   																  NameStr(coll->collname)));
# 4942|   				if (objname)
# 4943|-> 					*objname = list_make2(schema,
# 4944|   										  pstrdup(NameStr(coll->collname)));
# 4945|   				ReleaseSysCache(collTup);

Error: CPPCHECK_WARNING (CWE-768): [#def646]
postgresql-16.8/src/backend/catalog/objectaddress.c:5017: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((conForm->conname).data))}' depends on order of evaluation of side effects
# 5015|   																  NameStr(conForm->conname)));
# 5016|   				if (objname)
# 5017|-> 					*objname = list_make2(schema,
# 5018|   										  pstrdup(NameStr(conForm->conname)));
# 5019|   				ReleaseSysCache(conTup);

Error: CPPCHECK_WARNING (CWE-768): [#def647]
postgresql-16.8/src/backend/catalog/objectaddress.c:5122: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(schema)}' depends on order of evaluation of side effects
# 5120|   								 quote_identifier(NameStr(amForm->amname)));
# 5121|   				if (objname)
# 5122|-> 					*objname = list_make3(pstrdup(NameStr(amForm->amname)),
# 5123|   										  schema,
# 5124|   										  pstrdup(NameStr(opcForm->opcname)));

Error: CPPCHECK_WARNING (CWE-768): [#def648]
postgresql-16.8/src/backend/catalog/objectaddress.c:5122: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((opcForm->opcname).data))}' depends on order of evaluation of side effects
# 5120|   								 quote_identifier(NameStr(amForm->amname)));
# 5121|   				if (objname)
# 5122|-> 					*objname = list_make3(pstrdup(NameStr(amForm->amname)),
# 5123|   										  schema,
# 5124|   										  pstrdup(NameStr(opcForm->opcname)));

Error: CPPCHECK_WARNING (CWE-768): [#def649]
postgresql-16.8/src/backend/catalog/objectaddress.c:5202: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltype)},(union ListCell){.ptr_value=(rtype)}' depends on order of evaluation of side effects
# 5200|   					*objname = lappend(*objname,
# 5201|   									   psprintf("%d", amopForm->amopstrategy));
# 5202|-> 					*objargs = list_make2(ltype, rtype);
# 5203|   				}
# 5204|   

Error: CPPCHECK_WARNING (CWE-768): [#def650]
postgresql-16.8/src/backend/catalog/objectaddress.c:5264: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltype)},(union ListCell){.ptr_value=(rtype)}' depends on order of evaluation of side effects
# 5262|   					*objname = lappend(*objname,
# 5263|   									   psprintf("%d", amprocForm->amprocnum));
# 5264|-> 					*objargs = list_make2(ltype, rtype);
# 5265|   				}
# 5266|   

Error: CPPCHECK_WARNING (CWE-768): [#def651]
postgresql-16.8/src/backend/catalog/objectaddress.c:5384: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formStatistic->stxname).data))}' depends on order of evaluation of side effects
# 5382|   																  NameStr(formStatistic->stxname)));
# 5383|   				if (objname)
# 5384|-> 					*objname = list_make2(schema,
# 5385|   										  pstrdup(NameStr(formStatistic->stxname)));
# 5386|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def652]
postgresql-16.8/src/backend/catalog/objectaddress.c:5411: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formParser->prsname).data))}' depends on order of evaluation of side effects
# 5409|   																  NameStr(formParser->prsname)));
# 5410|   				if (objname)
# 5411|-> 					*objname = list_make2(schema,
# 5412|   										  pstrdup(NameStr(formParser->prsname)));
# 5413|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def653]
postgresql-16.8/src/backend/catalog/objectaddress.c:5438: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formDict->dictname).data))}' depends on order of evaluation of side effects
# 5436|   																  NameStr(formDict->dictname)));
# 5437|   				if (objname)
# 5438|-> 					*objname = list_make2(schema,
# 5439|   										  pstrdup(NameStr(formDict->dictname)));
# 5440|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def654]
postgresql-16.8/src/backend/catalog/objectaddress.c:5465: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formTmpl->tmplname).data))}' depends on order of evaluation of side effects
# 5463|   																  NameStr(formTmpl->tmplname)));
# 5464|   				if (objname)
# 5465|-> 					*objname = list_make2(schema,
# 5466|   										  pstrdup(NameStr(formTmpl->tmplname)));
# 5467|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def655]
postgresql-16.8/src/backend/catalog/objectaddress.c:5492: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((formCfg->cfgname).data))}' depends on order of evaluation of side effects
# 5490|   																  NameStr(formCfg->cfgname)));
# 5491|   				if (objname)
# 5492|-> 					*objname = list_make2(schema,
# 5493|   										  pstrdup(NameStr(formCfg->cfgname)));
# 5494|   				ReleaseSysCache(tup);

Error: CPPCHECK_WARNING (CWE-768): [#def656]
postgresql-16.8/src/backend/catalog/objectaddress.c:6039: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(pstrdup(schema))}' depends on order of evaluation of side effects
# 6037|   
# 6038|   	if (object)
# 6039|-> 		*object = list_make3(pstrdup(NameStr(amForm->amname)),
# 6040|   							 pstrdup(schema),
# 6041|   							 pstrdup(NameStr(opfForm->opfname)));

Error: CPPCHECK_WARNING (CWE-768): [#def657]
postgresql-16.8/src/backend/catalog/objectaddress.c:6039: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(pstrdup((amForm->amname).data))},(union ListCell){.ptr_value=(pstrdup(schema))},(union ListCell){.ptr_value=(pstrdup((opfForm->opfname).data))}' depends on order of evaluation of side effects
# 6037|   
# 6038|   	if (object)
# 6039|-> 		*object = list_make3(pstrdup(NameStr(amForm->amname)),
# 6040|   							 pstrdup(schema),
# 6041|   							 pstrdup(NameStr(opfForm->opfname)));

Error: CPPCHECK_WARNING (CWE-768): [#def658]
postgresql-16.8/src/backend/catalog/objectaddress.c:6077: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(schema)},(union ListCell){.ptr_value=(pstrdup((relForm->relname).data))}' depends on order of evaluation of side effects
# 6075|   													  NameStr(relForm->relname)));
# 6076|   	if (object)
# 6077|-> 		*object = list_make2(schema, pstrdup(NameStr(relForm->relname)));
# 6078|   
# 6079|   	ReleaseSysCache(relTup);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def659]
postgresql-16.8/src/backend/catalog/partition.c:287:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-16.8/src/backend/catalog/partition.c:254:1: enter_function: entry to ‘has_partition_attrs’
postgresql-16.8/src/backend/catalog/partition.c:262:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/partition.c:269:26: call_function: inlined call to ‘list_head’ from ‘has_partition_attrs’
 branch_false: ...to here
postgresql-16.8/src/backend/catalog/partition.c:270:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/partition.c:272:45: call_function: inlined call to ‘get_partition_col_attnum’ from ‘has_partition_attrs’
postgresql-16.8/src/backend/catalog/partition.c:274:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/partition.c:287:37: branch_false: ...to here
postgresql-16.8/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): [#def660]
postgresql-16.8/src/backend/catalog/pg_proc.c:536:45: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘newlc’
postgresql-16.8/src/backend/catalog/pg_proc.c:72:1: enter_function: entry to ‘ProcedureCreate’
postgresql-16.8/src/backend/catalog/pg_proc.c:129:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:139:12: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:164:12: branch_false: following ‘false’ branch (when ‘parameterModes == 0’)...
postgresql-16.8/src/backend/catalog/pg_proc.c:186:99: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:188:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:198:21: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:201:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:210:12: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:239:12: branch_false: following ‘false’ branch (when ‘paramModes’ is NULL)...
postgresql-16.8/src/backend/catalog/pg_proc.c:294:9: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:294:21: branch_true: following ‘true’ branch (when ‘i != 30’)...
postgresql-16.8/src/backend/catalog/pg_proc.c:296:17: branch_true: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:325:12: branch_false: following ‘false’ branch (when ‘parameterModes == 0’)...
postgresql-16.8/src/backend/catalog/pg_proc.c:328:17: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:365:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:368:55: branch_true: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:373:20: branch_true: following ‘true’ branch (when ‘replace != 0’)...
postgresql-16.8/src/backend/catalog/pg_proc.c:378:22: branch_true: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:383:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:397:27: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:409:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:410:39: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:409:21: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:429:20: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:507:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:514:29: call_function: inlined call to ‘list_length’ from ‘ProcedureCreate’
postgresql-16.8/src/backend/catalog/pg_proc.c:514:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:523:42: branch_false: ...to here
postgresql-16.8/src/backend/catalog/pg_proc.c:533:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:538:36: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:546:41: call_function: inlined call to ‘lnext’ from ‘ProcedureCreate’
postgresql-16.8/src/backend/catalog/pg_proc.c:533:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/pg_proc.c:536:45: danger: dereference of NULL ‘newlc’
#  534|   			{
#  535|   				Node	   *oldDef = (Node *) lfirst(oldlc);
#  536|-> 				Node	   *newDef = (Node *) lfirst(newlc);
#  537|   
#  538|   				if (exprType(oldDef) != exprType(newDef))

Error: GCC_ANALYZER_WARNING (CWE-476): [#def661]
postgresql-16.8/src/backend/catalog/pg_publication.c:1103:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/catalog/pg_publication.c:1057:1: enter_function: entry to ‘pg_get_publication_tables’
postgresql-16.8/src/backend/catalog/pg_publication.c:1064:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/pg_publication.c:1075:27: branch_true: ...to here
postgresql-16.8/src/backend/catalog/pg_publication.c:1089:29: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/catalog/pg_publication.c:1095:57: branch_true: ...to here
postgresql-16.8/src/backend/catalog/pg_publication.c:1095:36: call_function: calling ‘GetPublicationByName’ from ‘pg_get_publication_tables’
postgresql-16.8/src/backend/catalog/pg_publication.c:1095:36: return_function: returning to ‘pg_get_publication_tables’ from ‘GetPublicationByName’
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def662]
postgresql-16.8/src/backend/catalog/toasting.c:329: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=("chunk_id")},(union ListCell){.ptr_value=("chunk_seq")}' depends on order of evaluation of side effects
#  327|   				 InvalidOid, InvalidOid,
#  328|   				 indexInfo,
#  329|-> 				 list_make2("chunk_id", "chunk_seq"),
#  330|   				 BTREE_AM_OID,
#  331|   				 rel->rd_rel->reltablespace,

Error: GCC_ANALYZER_WARNING (CWE-476): [#def663]
postgresql-16.8/src/backend/commands/analyze.c:610:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-16.8/src/backend/commands/analyze.c:291:1: enter_function: entry to ‘do_analyze_rel’
postgresql-16.8/src/backend/commands/analyze.c:450:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:499:9: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:499:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
 branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:504:23: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:520:19: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:529:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
 branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:532:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/src/backend/commands/analyze.c:537:27: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:547:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-16.8/src/backend/commands/analyze.c:552:17: branch_true: ...to here
postgresql-16.8/src/backend/commands/analyze.c:560:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-16.8/src/backend/commands/analyze.c:589:21: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:589:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:595:17: call_function: inlined call to ‘MemoryContextSwitchTo’ from ‘do_analyze_rel’
postgresql-16.8/src/backend/commands/analyze.c:606:31: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/commands/analyze.c:608:60: branch_true: ...to here
postgresql-16.8/src/backend/commands/analyze.c:608:39: release_memory: ‘indexdata’ is NULL
postgresql-16.8/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): [#def664]
postgresql-16.8/src/backend/commands/analyze.c:660:47: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-16.8/src/backend/commands/analyze.c:450:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:499:9: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:499:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
 branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:504:23: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:520:19: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:529:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
 branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:532:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/src/backend/commands/analyze.c:537:27: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:633:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/src/backend/commands/analyze.c:637:17: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:655:31: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/commands/analyze.c:657:60: branch_true: ...to here
postgresql-16.8/src/backend/commands/analyze.c:657:39: release_memory: ‘indexdata’ is NULL
postgresql-16.8/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): [#def665]
postgresql-16.8/src/backend/commands/analyze.c:855:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘thisdata’
postgresql-16.8/src/backend/commands/analyze.c:291:1: enter_function: entry to ‘do_analyze_rel’
postgresql-16.8/src/backend/commands/analyze.c:450:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:499:9: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:499:21: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
 branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:504:23: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/analyze.c:520:19: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:529:9: branch_false: following ‘false’ branch (when ‘inh == 0’)...
 branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:532:12: branch_false: following ‘false’ branch (when ‘inh == 0’)...
postgresql-16.8/src/backend/commands/analyze.c:537:27: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:547:12: branch_true: following ‘true’ branch (when ‘numrows > 0’)...
postgresql-16.8/src/backend/commands/analyze.c:552:17: branch_true: ...to here
postgresql-16.8/src/backend/commands/analyze.c:560:29: branch_false: following ‘false’ branch (when ‘attr_cnt <= i’)...
postgresql-16.8/src/backend/commands/analyze.c:589:21: branch_false: ...to here
postgresql-16.8/src/backend/commands/analyze.c:589:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/commands/analyze.c:590:25: branch_true: ...to here
postgresql-16.8/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): [#def666]
postgresql-16.8/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): [#def667]
postgresql-16.8/src/backend/commands/copy.c:308:38: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-16.8/src/backend/commands/copy.c:287:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/commands/copy.c:292:25: branch_false: ...to here
postgresql-16.8/src/backend/commands/copy.c:301:12: branch_true: following ‘true’ branch (when ‘is_from != 0’)...
postgresql-16.8/src/backend/commands/copy.c:308:21: branch_true: ...to here
postgresql-16.8/src/backend/commands/copy.c:308:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/commands/copy.c:308:38: branch_true: ...to here
postgresql-16.8/src/backend/commands/copy.c:308:38: danger: dereference of NULL ‘rel’
#  306|   
#  307|   		/* check read-only transaction and parallel mode */
#  308|-> 		if (XactReadOnly && !rel->rd_islocaltemp)
#  309|   			PreventCommandIfReadOnly("COPY FROM");
#  310|   

Error: CPPCHECK_WARNING (CWE-476): [#def668]
postgresql-16.8/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): [#def669]
postgresql-16.8/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): [#def670]
postgresql-16.8/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): [#def671]
postgresql-16.8/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): [#def672]
postgresql-16.8/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): [#def673]
postgresql-16.8/src/backend/commands/tablecmds.c:12254: error[legacyUninitvar]: Uninitialized variable: contype
#12252|   	 * the dependency mechanism, so we're done here.
#12253|   	 */
#12254|-> 	if (contype != CONSTRAINT_CHECK &&
#12255|   		rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
#12256|   	{

Error: CPPCHECK_WARNING (CWE-768): [#def674]
postgresql-16.8/src/backend/commands/tablecmds.c:13837: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(get_namespace_name((rel)->rd_rel->relnamespace)))},(union ListCell){.ptr_value=(makeString(pstrdup((rel->rd_rel->relname).data)))}' depends on order of evaluation of side effects
#13835|   		cmd->objtype = OBJECT_TABCONSTRAINT;
#13836|   		cmd->object = (Node *)
#13837|-> 			list_make3(makeString(get_namespace_name(RelationGetNamespace(rel))),
#13838|   					   makeString(pstrdup(RelationGetRelationName(rel))),
#13839|   					   makeString(pstrdup(conname)));

Error: CPPCHECK_WARNING (CWE-768): [#def675]
postgresql-16.8/src/backend/commands/tablecmds.c:13837: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(get_namespace_name((rel)->rd_rel->relnamespace)))},(union ListCell){.ptr_value=(makeString(pstrdup((rel->rd_rel->relname).data)))},(union ListCell){.ptr_value=(makeString(pstrdup(conname)))}' depends on order of evaluation of side effects
#13835|   		cmd->objtype = OBJECT_TABCONSTRAINT;
#13836|   		cmd->object = (Node *)
#13837|-> 			list_make3(makeString(get_namespace_name(RelationGetNamespace(rel))),
#13838|   					   makeString(pstrdup(RelationGetRelationName(rel))),
#13839|   					   makeString(pstrdup(conname)));

Error: CPPCHECK_WARNING (CWE-768): [#def676]
postgresql-16.8/src/backend/commands/tablecmds.c:13845: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeTypeNameFromNameList((__typeof__(domname))copyObjectImpl(domname)))},(union ListCell){.ptr_value=(makeString(pstrdup(conname)))}' depends on order of evaluation of side effects
#13843|   		cmd->objtype = OBJECT_DOMCONSTRAINT;
#13844|   		cmd->object = (Node *)
#13845|-> 			list_make2(makeTypeNameFromNameList(copyObject(domname)),
#13846|   					   makeString(pstrdup(conname)));
#13847|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def677]
postgresql-16.8/src/backend/commands/tsearchcmds.c:1837:28: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘val’
postgresql-16.8/src/backend/commands/tsearchcmds.c:1621:1: enter_function: entry to ‘deserialize_deflist’
postgresql-16.8/src/backend/commands/tsearchcmds.c:1647:16: branch_true: following ‘true’ branch (when ‘ptr < endptr’)...
postgresql-16.8/src/backend/commands/tsearchcmds.c:1649:17: branch_true: ...to here
postgresql-16.8/src/backend/commands/tsearchcmds.c:1811:12: branch_true: following ‘true’ branch (when ‘state == 7’)...
postgresql-16.8/src/backend/commands/tsearchcmds.c:1813:17: branch_true: ...to here
postgresql-16.8/src/backend/commands/tsearchcmds.c:1815:50: call_function: calling ‘buildDefItem’ from ‘deserialize_deflist’
# 1835|   {
# 1836|   	/* If input was quoted, always emit as string */
# 1837|-> 	if (!was_quoted && val[0] != '\0')
# 1838|   	{
# 1839|   		int			v;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def678]
postgresql-16.8/src/backend/executor/execJunk.c:176:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘t’
postgresql-16.8/src/backend/executor/execJunk.c:137:1: enter_function: entry to ‘ExecInitJunkFilterConversion’
postgresql-16.8/src/backend/executor/execJunk.c:166:12: branch_true: following ‘true’ branch (when ‘cleanLength > 0’)...
postgresql-16.8/src/backend/executor/execJunk.c:168:43: branch_true: ...to here
postgresql-16.8/src/backend/executor/execJunk.c:169:21: call_function: inlined call to ‘list_head’ from ‘ExecInitJunkFilterConversion’
 branch_false: ...to here
postgresql-16.8/src/backend/executor/execJunk.c:170:29: branch_true: following ‘true’ branch (when ‘i < cleanLength’)...
postgresql-16.8/src/backend/executor/execJunk.c:172:29: branch_true: ...to here
postgresql-16.8/src/backend/executor/execJunk.c:172:28: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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): [#def679]
postgresql-16.8/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): [#def680]
postgresql-16.8/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): [#def681]
postgresql-16.8/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): [#def682]
postgresql-16.8/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): [#def683]
postgresql-16.8/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): [#def684]
postgresql-16.8/src/backend/executor/execScan.c:338: error[legacyUninitvar]: Uninitialized variable: relids
#  336|   					 (int) nodeTag(node->ps.plan));
#  337|   
#  338|-> 			while ((rtindex = bms_next_member(relids, rtindex)) >= 0)
#  339|   			{
#  340|   				Assert(rtindex > 0);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def685]
postgresql-16.8/src/backend/executor/execTuples.c:2286:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘isnull’
postgresql-16.8/src/backend/executor/execTuples.c:2304:1: enter_function: entry to ‘do_text_output_multiline’
postgresql-16.8/src/backend/executor/execTuples.c:2309:16: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/execTuples.c:2314:23: branch_true: ...to here
postgresql-16.8/src/backend/executor/execTuples.c:2315:20: branch_false: following ‘false’ branch (when ‘eol’ is NULL)...
postgresql-16.8/src/backend/executor/execTuples.c:2322:31: branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-457): [#def686]
postgresql-16.8/src/backend/executor/nodeAppend.c:1072: warning[uninitvar]: Uninitialized variable: noccurred
# 1070|   	}
# 1071|   	PG_END_TRY();
# 1072|-> 	if (noccurred == 0)
# 1073|   		return;
# 1074|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def687]
postgresql-16.8/src/backend/executor/nodeHash.c:1350:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/executor/nodeHash.c:3547:1: enter_function: entry to ‘ExecParallelHashTuplePrealloc’
postgresql-16.8/src/backend/executor/nodeHash.c:3560:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeHash.c:3565:17: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeHash.c:3566:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeHash.c:3567:25: branch_true: ...to here
postgresql-16.8/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): [#def688]
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1227:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1208:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1214:25: branch_true: ...to here
postgresql-16.8/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): [#def689]
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1259:29: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1152:1: enter_function: entry to ‘ExecIndexBuildScanKeys’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1208:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1214:25: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1220:43: call_function: inlined call to ‘get_leftop’ from ‘ExecIndexBuildScanKeys’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1222:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1222:39: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1227:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1228:35: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1227:29: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1231:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1232:28: branch_false: following ‘false’ branch...
postgresql-16.8/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): [#def690]
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1468:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1208:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1445:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1455:25: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1463:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1468:31: branch_false: ...to here
postgresql-16.8/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): [#def691]
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1501:37: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rightop’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1208:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1445:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1455:25: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1463:28: branch_true: following ‘true’ branch (when ‘leftop’ is non-NULL)...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1463:39: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1468:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1469:35: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1468:29: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1472:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1473:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1492:28: branch_false: following ‘false’ branch (when ‘rightop’ is NULL)...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1497:29: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1497:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1501:37: branch_true: ...to here
postgresql-16.8/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): [#def692]
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1582:31: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘leftop’
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1192:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1208:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1305:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1445:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1564:25: branch_false: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1564:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1575:25: branch_true: ...to here
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1577:28: branch_false: following ‘false’ branch (when ‘leftop’ is NULL)...
postgresql-16.8/src/backend/executor/nodeIndexscan.c:1582:31: branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-457): [#def693]
postgresql-16.8/src/backend/lib/dshash.c:971: error[uninitvar]: Uninitialized variable: *bucket_head
#  969|   		dshash_table_item *item;
#  970|   
#  971|-> 		item = dsa_get_address(hash_table->area, *bucket_head);
#  972|   
#  973|   		if (equal_keys(hash_table, key, ENTRY_FROM_ITEM(item)))

Error: CPPCHECK_WARNING (CWE-457): [#def694]
postgresql-16.8/src/backend/lib/dshash.c:1000: error[uninitvar]: Uninitialized variable: *bucket_head
#  998|   		dshash_table_item *bucket_item;
#  999|   
# 1000|-> 		bucket_item = dsa_get_address(hash_table->area, *bucket_head);
# 1001|   
# 1002|   		if (bucket_item == item)

Error: GCC_ANALYZER_WARNING (CWE-476): [#def695]
postgresql-16.8/src/backend/lib/pairingheap.c:275:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘pairs’
postgresql-16.8/src/backend/lib/pairingheap.c:251:20: branch_true: following ‘true’ branch (when ‘next’ is NULL)...
postgresql-16.8/src/backend/lib/pairingheap.c:275:9: branch_true: ...to here
postgresql-16.8/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): [#def696]
postgresql-16.8/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): [#def697]
postgresql-16.8/src/backend/libpq/auth.c:2850:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘data’
postgresql-16.8/src/backend/libpq/auth.c:2855:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2867:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2874:13: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2874:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2882:9: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2882:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2882:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-16.8/src/backend/libpq/auth.c:2884:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2884:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-16.8/src/backend/libpq/auth.c:2885:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2888:13: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2888:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2899:29: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2899:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2900:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2901:33: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2901:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2902:9: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2902:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2904:47: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2904:47: call_function: calling ‘PerformRadiusTransaction’ from ‘CheckRADIUSAuth’
# 2848|   	attr->attribute = type;
# 2849|   	attr->length = len + 2;		/* total size includes type and length */
# 2850|-> 	memcpy(attr->data, data, len);
# 2851|   	packet->length += attr->length;
# 2852|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def698]
postgresql-16.8/src/backend/libpq/auth.c:2905:100: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘secrets’
postgresql-16.8/src/backend/libpq/auth.c:2855:1: enter_function: entry to ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2867:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2874:13: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2874:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2882:9: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2882:9: call_function: calling ‘sendAuthRequest’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2882:9: return_function: returning to ‘CheckRADIUSAuth’ from ‘sendAuthRequest’
postgresql-16.8/src/backend/libpq/auth.c:2884:18: call_function: calling ‘recv_password_packet’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2884:18: return_function: returning to ‘CheckRADIUSAuth’ from ‘recv_password_packet’
postgresql-16.8/src/backend/libpq/auth.c:2885:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2888:13: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2888:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2899:29: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2899:19: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2900:33: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2900:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2901:33: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2901:23: call_function: inlined call to ‘list_head’ from ‘CheckRADIUSAuth’
postgresql-16.8/src/backend/libpq/auth.c:2902:9: branch_false: ...to here
postgresql-16.8/src/backend/libpq/auth.c:2902:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2904:47: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/auth.c:2905:100: danger: dereference of NULL ‘secrets’
# 2903|   	{
# 2904|   		int			ret = PerformRadiusTransaction(lfirst(server),
# 2905|-> 												   lfirst(secrets),
# 2906|   												   radiusports ? lfirst(radiusports) : NULL,
# 2907|   												   identifiers ? lfirst(identifiers) : NULL,

Error: CPPCHECK_WARNING (CWE-457): [#def699]
postgresql-16.8/src/backend/libpq/auth.c:3061: warning[uninitvar]: Uninitialized variable: encryptedpassword
# 3059|   	pfree(cryptvector);
# 3060|   
# 3061|-> 	radius_add_attribute(packet, RADIUS_PASSWORD, encryptedpassword, encryptedpasswordlen);
# 3062|   
# 3063|   	/* Length needs to be in network order on the wire */

Error: CPPCHECK_WARNING (CWE-457): [#def700]
postgresql-16.8/src/backend/libpq/be-fsstubs.c:518: warning[uninitvar]: Uninitialized variable: fd
#  516|   	}
#  517|   	PG_END_TRY();
#  518|-> 	if (fd < 0)
#  519|   		ereport(ERROR,
#  520|   				(errcode_for_file_access(),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def701]
postgresql-16.8/src/backend/libpq/hba.c:1352:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/libpq/hba.c:2600:1: enter_function: entry to ‘load_hba’
postgresql-16.8/src/backend/libpq/hba.c:2610:16: call_function: calling ‘open_auth_file’ from ‘load_hba’
postgresql-16.8/src/backend/libpq/hba.c:2610:16: return_function: returning to ‘load_hba’ from ‘open_auth_file’
postgresql-16.8/src/backend/libpq/hba.c:2611:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/hba.c:2617:9: branch_false: ...to here
postgresql-16.8/src/backend/libpq/hba.c:2617:9: call_function: calling ‘tokenize_auth_file’ from ‘load_hba’
postgresql-16.8/src/backend/libpq/hba.c:2617:9: return_function: returning to ‘load_hba’ from ‘tokenize_auth_file’
postgresql-16.8/src/backend/libpq/hba.c:2625:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/libpq/hba.c:2631:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/libpq/hba.c:2637:32: branch_false: ...to here
postgresql-16.8/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): [#def702]
postgresql-16.8/src/backend/libpq/hba.c:2723:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/libpq/hba.c:2706:1: enter_function: entry to ‘parse_ident_line’
postgresql-16.8/src/backend/libpq/hba.c:2717:17: call_function: inlined call to ‘list_head’ from ‘parse_ident_line’
postgresql-16.8/src/backend/libpq/hba.c:2719:22: branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def703]
postgresql-16.8/src/backend/nodes/makefuncs.c:626: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},(union ListCell){.ptr_value=(rightop)}' depends on order of evaluation of side effects
#  624|   	expr->inputcollid = inputcollid;
#  625|   	if (rightop)
#  626|-> 		expr->args = list_make2(leftop, rightop);
#  627|   	else
#  628|   		expr->args = list_make1(leftop);

Error: CPPCHECK_WARNING (CWE-768): [#def704]
postgresql-16.8/src/backend/nodes/makefuncs.c:698: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(qual1)},(union ListCell){.ptr_value=(qual2)}' depends on order of evaluation of side effects
#  696|   	if (qual2 == NULL)
#  697|   		return qual1;
#  698|-> 	return (Node *) make_andclause(list_make2(qual1, qual2));
#  699|   }
#  700|   

Error: CPPCHECK_WARNING (CWE-768): [#def705]
postgresql-16.8/src/backend/optimizer/path/indxpath.c:3260: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(rightop)},(union ListCell){.ptr_value=(leftop)}' depends on order of evaluation of side effects
# 3258|   		newclause->opno = expr_op;
# 3259|   		newclause->opfuncid = InvalidOid;
# 3260|-> 		newclause->args = list_make2(rightop, leftop);
# 3261|   
# 3262|   		clause = (Expr *) newclause;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def706]
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1551:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr1’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1479:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1495:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1505:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1523:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1523:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1526:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1537:29: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1549:21: branch_true: ...to here
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1549:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1551:25: branch_true: ...to here
postgresql-16.8/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): [#def707]
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1552:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lcr2’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1479:1: enter_function: entry to ‘try_partitionwise_join’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1495:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1505:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1523:9: call_function: calling ‘compute_partition_bounds’ from ‘try_partitionwise_join’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1523:9: return_function: returning to ‘try_partitionwise_join’ from ‘compute_partition_bounds’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1526:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1528:24: branch_true: ...to here
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1528:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1529:24: call_function: inlined call to ‘list_head’ from ‘try_partitionwise_join’
 branch_false: ...to here
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1537:29: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1549:21: branch_true: ...to here
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1549:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/path/joinrels.c:1551:25: branch_true: ...to here
postgresql-16.8/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): [#def708]
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:159:27: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘new_pathkey’
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:1168:1: enter_function: entry to ‘make_pathkeys_for_sortclauses_extended’
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:1178:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:1185:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:1190:27: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:1190:27: call_function: calling ‘make_pathkey_from_sortop’ from ‘make_pathkeys_for_sortclauses_extended’
postgresql-16.8/src/backend/optimizer/path/pathkeys.c:1190:27: return_function: returning to ‘make_pathkeys_for_sortclauses_extended’ from ‘make_pathkey_from_sortop’
postgresql-16.8/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): [#def709]
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1100:33: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:983:1: enter_function: entry to ‘query_is_distinct_for’
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:996:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1020:13: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1020:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1027:13: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1043:17: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1070:21: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1070:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1078:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1084:22: branch_true: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1084:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1089:40: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1089:30: call_function: inlined call to ‘list_head’ from ‘query_is_distinct_for’
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1090:25: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1090:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1095:36: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1100:33: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/analyzejoins.c:1100:33: danger: dereference of NULL ‘lg’
# 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): [#def710]
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5062:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5051:1: enter_function: entry to ‘fix_indexqual_clause’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5060:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5060:18: call_function: inlined call to ‘replace_nestloop_params’ from ‘fix_indexqual_clause’
postgresql-16.8/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): [#def711]
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5131:13: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘node’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:4981:1: enter_function: entry to ‘fix_indexqual_references’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:4991:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/plan/createplan.c:4997:17: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5003:34: call_function: calling ‘fix_indexqual_clause’ from ‘fix_indexqual_references’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:5003:34: return_function: returning to ‘fix_indexqual_references’ from ‘fix_indexqual_clause’
postgresql-16.8/src/backend/optimizer/plan/createplan.c:4997:17: branch_true: following ‘true’ branch...
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def712]
postgresql-16.8/src/backend/optimizer/plan/initsplan.c:1074: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftjoinlist)},(union ListCell){.ptr_value=(rightjoinlist)}' depends on order of evaluation of side effects
# 1072|   		{
# 1073|   			/* force the join order exactly at this node */
# 1074|-> 			joinlist = list_make1(list_make2(leftjoinlist, rightjoinlist));
# 1075|   		}
# 1076|   		else if (list_length(leftjoinlist) + list_length(rightjoinlist) <=

Error: CPPCHECK_WARNING (CWE-768): [#def713]
postgresql-16.8/src/backend/optimizer/plan/initsplan.c:1097: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftpart)},(union ListCell){.ptr_value=(rightpart)}' depends on order of evaluation of side effects
# 1095|   			else
# 1096|   				rightpart = (Node *) rightjoinlist;
# 1097|-> 			joinlist = list_make2(leftpart, rightpart);
# 1098|   		}
# 1099|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def714]
postgresql-16.8/src/backend/optimizer/plan/planner.c:4006:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partially_grouped_rel’
postgresql-16.8/src/backend/optimizer/plan/planner.c:7725:1: enter_function: entry to ‘create_partitionwise_grouping_paths’
postgresql-16.8/src/backend/optimizer/plan/planner.c:7746:16: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/plan/planner.c:7748:47: branch_true: ...to here
postgresql-16.8/src/backend/optimizer/plan/planner.c:7759:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/plan/planner.c:7762:32: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/plan/planner.c:7805:17: call_function: calling ‘create_ordinary_grouping_paths’ from ‘create_partitionwise_grouping_paths’
# 4004|   		Assert(partially_grouped_rel);
# 4005|   
# 4006|-> 		if (partially_grouped_rel->pathlist)
# 4007|   			set_cheapest(partially_grouped_rel);
# 4008|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def715]
postgresql-16.8/src/backend/optimizer/plan/setrefs.c:2013:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*root.grouping_map’
postgresql-16.8/src/backend/optimizer/plan/setrefs.c:3519:1: enter_function: entry to ‘extract_query_dependencies’
postgresql-16.8/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): [#def716]
postgresql-16.8/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): [#def717]
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:120:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘target_rte’
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:79:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:104:9: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:105:12: branch_false: following ‘false’ branch (when ‘command_type != 3’)...
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:107:17: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:107:17: branch_false: following ‘false’ branch (when ‘command_type != 2’)...
 branch_false: ...to here
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:120:18: danger: dereference of NULL ‘target_rte’
#  118|   	if ((command_type == CMD_UPDATE || command_type == CMD_DELETE ||
#  119|   		 command_type == CMD_MERGE) &&
#  120|-> 		!target_rte->inh)
#  121|   	{
#  122|   		/* row-identity logic expects to add stuff to processed_tlist */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def718]
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:373:20: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘rel’
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:63:1: enter_function: entry to ‘preprocess_targetlist’
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:79:12: branch_false: following ‘false’ branch (when ‘result_relation == 0’)...
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:104:9: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:105:12: branch_true: following ‘true’ branch (when ‘command_type == 3’)...
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:106:25: branch_true: ...to here
postgresql-16.8/src/backend/optimizer/prep/preptlist.c:106:25: call_function: calling ‘expand_insert_targetlist’ from ‘preprocess_targetlist’
#  371|   	 * sure we have all the user attributes in the right order.
#  372|   	 */
#  373|-> 	numattrs = RelationGetNumberOfAttributes(rel);
#  374|   
#  375|   	for (attrno = 1; attrno <= numattrs; attrno++)

Error: CPPCHECK_WARNING (CWE-768): [#def719]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:489: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lpath_tlist)},(union ListCell){.ptr_value=(rpath_tlist)}' depends on order of evaluation of side effects
#  487|   	 */
#  488|   	tlist = generate_append_tlist(setOp->colTypes, setOp->colCollations, false,
#  489|-> 								  list_make2(lpath_tlist, rpath_tlist),
#  490|   								  refnames_tlist);
#  491|   

Error: CPPCHECK_WARNING (CWE-768): [#def720]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:764: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lpath)},(union ListCell){.ptr_value=(rpath)}' depends on order of evaluation of side effects
#  762|   	if (op->op == SETOP_EXCEPT || dLeftGroups <= dRightGroups)
#  763|   	{
#  764|-> 		pathlist = list_make2(lpath, rpath);
#  765|   		tlist_list = list_make2(lpath_tlist, rpath_tlist);
#  766|   		firstFlag = 0;

Error: CPPCHECK_WARNING (CWE-768): [#def721]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:765: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lpath_tlist)},(union ListCell){.ptr_value=(rpath_tlist)}' depends on order of evaluation of side effects
#  763|   	{
#  764|   		pathlist = list_make2(lpath, rpath);
#  765|-> 		tlist_list = list_make2(lpath_tlist, rpath_tlist);
#  766|   		firstFlag = 0;
#  767|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def722]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:770: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(rpath)},(union ListCell){.ptr_value=(lpath)}' depends on order of evaluation of side effects
#  768|   	else
#  769|   	{
#  770|-> 		pathlist = list_make2(rpath, lpath);
#  771|   		tlist_list = list_make2(rpath_tlist, lpath_tlist);
#  772|   		firstFlag = 1;

Error: CPPCHECK_WARNING (CWE-768): [#def723]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:771: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(rpath_tlist)},(union ListCell){.ptr_value=(lpath_tlist)}' depends on order of evaluation of side effects
#  769|   	{
#  770|   		pathlist = list_make2(rpath, lpath);
#  771|-> 		tlist_list = list_make2(rpath_tlist, lpath_tlist);
#  772|   		firstFlag = 1;
#  773|   	}

Error: GCC_ANALYZER_WARNING (CWE-476): [#def724]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1316:64: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘curColType’
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1278:1: enter_function: entry to ‘generate_append_tlist’
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1302:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1307:30: call_function: inlined call to ‘list_head’ from ‘generate_append_tlist’
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1309:17: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1309:17: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1313:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1316:47: branch_false: ...to here
postgresql-16.8/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): [#def725]
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1430:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lg’
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1406:1: enter_function: entry to ‘generate_setop_grouplist’
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1412:14: call_function: inlined call to ‘list_head’ from ‘generate_setop_grouplist’
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1413:9: branch_false: ...to here
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1413:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1418:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/optimizer/prep/prepunion.c:1430:17: branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def726]
postgresql-16.8/src/backend/optimizer/util/relnode.c:2383: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(larg)},(union ListCell){.ptr_value=(rarg)}' depends on order of evaluation of side effects
# 2381|   						c->coalescetype = exprType(larg);
# 2382|   						c->coalescecollid = exprCollation(larg);
# 2383|-> 						c->args = list_make2(larg, rarg);
# 2384|   						c->location = -1;
# 2385|   						nullable_partexpr = lappend(nullable_partexpr, c);

Error: CPPCHECK_WARNING (CWE-768): [#def727]
postgresql-16.8/src/backend/optimizer/util/restrictinfo.c:374: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=((list_nth_cell(clause->args,1)->ptr_value))}),((union ListCell){.ptr_value=((list_nth_cell(clause->args,0)->ptr_value))})' depends on order of evaluation of side effects
#  372|   	newclause->opno = comm_op;
#  373|   	newclause->opfuncid = InvalidOid;
#  374|-> 	newclause->args = list_make2(lsecond(clause->args),
#  375|   								 linitial(clause->args));
#  376|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def728]
postgresql-16.8/src/backend/parser/../../../src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘expanded_groups’
postgresql-16.8/src/backend/parser/parse_agg.c:1800:1: enter_function: entry to ‘expand_grouping_sets’
postgresql-16.8/src/backend/parser/parse_agg.c:1807:12: branch_false: following ‘false’ branch (when ‘groupingSets’ is non-NULL)...
 branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_agg.c:1810:9: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/parser/parse_agg.c:1833: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): [#def729]
postgresql-16.8/src/backend/parser/../../../src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘fargs’
postgresql-16.8/src/backend/parser/parse_func.c:90:1: enter_function: entry to ‘ParseFuncOrColumn’
postgresql-16.8/src/backend/parser/parse_func.c:94:33: branch_true: following ‘true’ branch (when ‘fn’ is non-NULL)...
postgresql-16.8/src/backend/parser/parse_func.c:94:21: branch_true: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:124:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/parser/parse_func.c:135:13: call_function: inlined call to ‘list_length’ from ‘ParseFuncOrColumn’
postgresql-16.8/src/backend/parser/parse_func.c:135:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:155:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/parser/parse_func.c:179:9: branch_false: following ‘false’ branch (when ‘fargs’ is NULL)...
postgresql-16.8/src/backend/parser/parse_func.c:210:12: branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:210:12: branch_false: following ‘false’ branch (when ‘fargs’ is NULL)...
postgresql-16.8/src/backend/parser/parse_func.c:223:32: branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:266:20: call_function: calling ‘func_get_detail’ from ‘ParseFuncOrColumn’
postgresql-16.8/src/backend/parser/parse_func.c:266:20: return_function: returning to ‘ParseFuncOrColumn’ from ‘func_get_detail’
postgresql-16.8/src/backend/parser/parse_func.c:294:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/parser/parse_func.c:304:13: branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:358:17: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/parser/parse_func.c:367:23: branch_true: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:368:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/parser/parse_func.c:370:49: branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:376:20: branch_true: following ‘true’ branch (when ‘aggkind != 110’)...
postgresql-16.8/src/backend/parser/parse_func.c:381:28: branch_true: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:381:28: branch_true: following ‘true’ branch (when ‘agg_within_group != 0’)...
postgresql-16.8/src/backend/parser/parse_func.c:387:28: branch_true: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:387:28: branch_false: following ‘false’ branch (when ‘over’ is NULL)...
postgresql-16.8/src/backend/parser/parse_func.c:407:45: call_function: inlined call to ‘list_length’ from ‘ParseFuncOrColumn’
postgresql-16.8/src/backend/parser/parse_func.c:414:36: branch_false: following ‘false’ branch (when ‘catDirectArgs == numDirectArgs’)...
postgresql-16.8/src/backend/parser/parse_func.c:504:28: branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:504:28: branch_true: following ‘true’ branch (when ‘aggkind == 104’)...
postgresql-16.8/src/backend/parser/parse_func.c:505:33: branch_true: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:505:33: call_function: calling ‘unify_hypothetical_args’ from ‘ParseFuncOrColumn’
#  279|   	Assert(list != NIL);
#  280|   	Assert(n >= 0 && n < list->length);
#  281|-> 	return &list->elements[n];
#  282|   }
#  283|   

Error: CPPCHECK_WARNING (CWE-768): [#def730]
postgresql-16.8/src/backend/parser/analyze.c:2205: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lcolnode)},(union ListCell){.ptr_value=(rcolnode)}' depends on order of evaluation of side effects
# 2203|   			/* select common type, same as CASE et al */
# 2204|   			rescoltype = select_common_type(pstate,
# 2205|-> 											list_make2(lcolnode, rcolnode),
# 2206|   											context,
# 2207|   											&bestexpr);

Error: CPPCHECK_WARNING (CWE-768): [#def731]
postgresql-16.8/src/backend/parser/analyze.c:2260: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lcolnode)},(union ListCell){.ptr_value=(rcolnode)}' depends on order of evaluation of side effects
# 2258|   
# 2259|   			rescoltypmod = select_common_typmod(pstate,
# 2260|-> 												list_make2(lcolnode, rcolnode),
# 2261|   												rescoltype);
# 2262|   

Error: CPPCHECK_WARNING (CWE-768): [#def732]
postgresql-16.8/src/backend/parser/analyze.c:2273: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lcolnode)},(union ListCell){.ptr_value=(rcolnode)}' depends on order of evaluation of side effects
# 2271|   			 */
# 2272|   			rescolcoll = select_common_collation(pstate,
# 2273|-> 												 list_make2(lcolnode, rcolnode),
# 2274|   												 (op->op == SETOP_UNION && op->all));
# 2275|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def733]
postgresql-16.8/src/backend/parser/gram.c:28947:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/backend/parser/gram.c:28902:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/parser/gram.c:28908:34: branch_true: ...to here
postgresql-16.8/src/backend/parser/gram.c:28934:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/backend/parser/gram.c:28936:7: branch_false: ...to here
postgresql-16.8/src/backend/parser/gram.c:28945:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/parser/gram.c:28947:9: branch_false: ...to here
postgresql-16.8/src/backend/parser/gram.c:28947:9: danger: use of uninitialized value ‘yyss’ here
#28945|           if (! yyptr)
#28946|             goto yyexhaustedlab;
#28947|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#28948|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#28949|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: CPPCHECK_WARNING (CWE-768): [#def734]
postgresql-16.8/src/backend/parser/gram.y:1836: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(0x7FFF,-1))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-2].ival,yylsp[-2]))})' depends on order of evaluation of side effects
# 1834|   					TypeName   *t = $1;
# 1835|   
# 1836|-> 					t->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1),
# 1837|   											makeIntConst($3, @3));
# 1838|   					$$ = makeStringConstCast($5, @5, t);

Error: CPPCHECK_WARNING (CWE-768): [#def735]
postgresql-16.8/src/backend/parser/gram.y:4245: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].ielem)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
# 4243|   ExclusionConstraintElem: index_elem WITH any_operator
# 4244|   			{
# 4245|-> 				$$ = list_make2($1, $3);
# 4246|   			}
# 4247|   			/* allow OPERATOR() decoration for the benefit of ruleutils.c */

Error: CPPCHECK_WARNING (CWE-768): [#def736]
postgresql-16.8/src/backend/parser/gram.y:4250: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-5].ielem)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
# 4248|   			| index_elem WITH OPERATOR '(' any_operator ')'
# 4249|   			{
# 4250|-> 				$$ = list_make2($1, $5);
# 4251|   			}
# 4252|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def737]
postgresql-16.8/src/backend/parser/gram.y:5117: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(yyvsp[-1].typnam)}' depends on order of evaluation of side effects
# 5115|   					n->action = $4;
# 5116|   					n->objtype = OBJECT_CAST;
# 5117|-> 					n->object = (Node *) list_make2($7, $9);
# 5118|   					$$ = (Node *) n;
# 5119|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def738]
postgresql-16.8/src/backend/parser/gram.y:5197: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].typnam)},(union ListCell){.ptr_value=(makeString(yyvsp[0].str))}' depends on order of evaluation of side effects
# 5195|   					n->action = $4;
# 5196|   					n->objtype = OBJECT_TRANSFORM;
# 5197|-> 					n->object = (Node *) list_make2($7, makeString($9));
# 5198|   					$$ = (Node *) n;
# 5199|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def739]
postgresql-16.8/src/backend/parser/gram.y:5863: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(events1|events2))},((union ListCell){.ptr_value=(list_concat(columns1,columns2))})' depends on order of evaluation of side effects
# 5861|   					 * should just ignore the columns for non-UPDATE events.
# 5862|   					 */
# 5863|-> 					$$ = list_make2(makeInteger(events1 | events2),
# 5864|   									list_concat(columns1, columns2));
# 5865|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def740]
postgresql-16.8/src/backend/parser/gram.y:5870: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<2))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5868|   TriggerOneEvent:
# 5869|   			INSERT
# 5870|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); }
# 5871|   			| DELETE_P
# 5872|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); }

Error: CPPCHECK_WARNING (CWE-768): [#def741]
postgresql-16.8/src/backend/parser/gram.y:5872: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<3))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5870|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_INSERT), NIL); }
# 5871|   			| DELETE_P
# 5872|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); }
# 5873|   			| UPDATE
# 5874|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); }

Error: CPPCHECK_WARNING (CWE-768): [#def742]
postgresql-16.8/src/backend/parser/gram.y:5874: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<4))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5872|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_DELETE), NIL); }
# 5873|   			| UPDATE
# 5874|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); }
# 5875|   			| UPDATE OF columnList
# 5876|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), $3); }

Error: CPPCHECK_WARNING (CWE-768): [#def743]
postgresql-16.8/src/backend/parser/gram.y:5876: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<4))},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
# 5874|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), NIL); }
# 5875|   			| UPDATE OF columnList
# 5876|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), $3); }
# 5877|   			| TRUNCATE
# 5878|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); }

Error: CPPCHECK_WARNING (CWE-768): [#def744]
postgresql-16.8/src/backend/parser/gram.y:5878: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeInteger(1<<5))},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
# 5876|   				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_UPDATE), $3); }
# 5877|   			| TRUNCATE
# 5878|-> 				{ $$ = list_make2(makeInteger(TRIGGER_TYPE_TRUNCATE), NIL); }
# 5879|   		;
# 5880|   

Error: CPPCHECK_WARNING (CWE-768): [#def745]
postgresql-16.8/src/backend/parser/gram.y:6997: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeTypeNameFromNameList(yyvsp[-2].list))},(union ListCell){.ptr_value=(makeString(yyvsp[-5].str))}' depends on order of evaluation of side effects
# 6995|   					 * up here.
# 6996|   					 */
# 6997|-> 					n->object = (Node *) list_make2(makeTypeNameFromNameList($7), makeString($4));
# 6998|   					n->comment = $9;
# 6999|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def746]
postgresql-16.8/src/backend/parser/gram.y:7033: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].typnam)},(union ListCell){.ptr_value=(makeString(yyvsp[-2].str))}' depends on order of evaluation of side effects
# 7031|   
# 7032|   					n->objtype = OBJECT_TRANSFORM;
# 7033|-> 					n->object = (Node *) list_make2($5, makeString($7));
# 7034|   					n->comment = $9;
# 7035|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def747]
postgresql-16.8/src/backend/parser/gram.y:7069: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-5].typnam)},(union ListCell){.ptr_value=(yyvsp[-3].typnam)}' depends on order of evaluation of side effects
# 7067|   
# 7068|   					n->objtype = OBJECT_CAST;
# 7069|-> 					n->object = (Node *) list_make2($5, $7);
# 7070|   					n->comment = $10;
# 7071|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def748]
postgresql-16.8/src/backend/parser/gram.y:8422: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((struct List*)NULL)},(union ListCell){.ptr_value=(makeInteger(-1))}' depends on order of evaluation of side effects
# 8420|   aggr_args:	'(' '*' ')'
# 8421|   				{
# 8422|-> 					$$ = list_make2(NIL, makeInteger(-1));
# 8423|   				}
# 8424|   			| '(' aggr_args_list ')'

Error: CPPCHECK_WARNING (CWE-768): [#def749]
postgresql-16.8/src/backend/parser/gram.y:8426: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].list)},(union ListCell){.ptr_value=(makeInteger(-1))}' depends on order of evaluation of side effects
# 8424|   			| '(' aggr_args_list ')'
# 8425|   				{
# 8426|-> 					$$ = list_make2($2, makeInteger(-1));
# 8427|   				}
# 8428|   			| '(' ORDER BY aggr_args_list ')'

Error: CPPCHECK_WARNING (CWE-768): [#def750]
postgresql-16.8/src/backend/parser/gram.y:8430: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].list)},(union ListCell){.ptr_value=(makeInteger(0))}' depends on order of evaluation of side effects
# 8428|   			| '(' ORDER BY aggr_args_list ')'
# 8429|   				{
# 8430|-> 					$$ = list_make2($4, makeInteger(0));
# 8431|   				}
# 8432|   			| '(' aggr_args_list ORDER BY aggr_args_list ')'

Error: CPPCHECK_WARNING (CWE-768): [#def751]
postgresql-16.8/src/backend/parser/gram.y:8574: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(yyvsp[-2].str))},(union ListCell){.ptr_value=(makeString(yyvsp[0].str))}' depends on order of evaluation of side effects
# 8572|   			| Sconst ',' Sconst
# 8573|   				{
# 8574|-> 					$$ = list_make2(makeString($1), makeString($3));
# 8575|   				}
# 8576|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def752]
postgresql-16.8/src/backend/parser/gram.y:8853: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(yyvsp[-1].typnam)}' depends on order of evaluation of side effects
# 8851|   				}
# 8852|   			| '(' Typename ',' Typename ')'
# 8853|-> 					{ $$ = list_make2($2, $4); }
# 8854|   			| '(' NONE ',' Typename ')'					/* left unary */
# 8855|   					{ $$ = list_make2(NULL, $4); }

Error: CPPCHECK_WARNING (CWE-768): [#def753]
postgresql-16.8/src/backend/parser/gram.y:8855: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=(yyvsp[-1].typnam)}' depends on order of evaluation of side effects
# 8853|   					{ $$ = list_make2($2, $4); }
# 8854|   			| '(' NONE ',' Typename ')'					/* left unary */
# 8855|-> 					{ $$ = list_make2(NULL, $4); }
# 8856|   			| '(' Typename ',' NONE ')'					/* right unary */
# 8857|   					{ $$ = list_make2($2, NULL); }

Error: CPPCHECK_WARNING (CWE-768): [#def754]
postgresql-16.8/src/backend/parser/gram.y:8857: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(NULL)}' depends on order of evaluation of side effects
# 8855|   					{ $$ = list_make2(NULL, $4); }
# 8856|   			| '(' Typename ',' NONE ')'					/* right unary */
# 8857|-> 					{ $$ = list_make2($2, NULL); }
# 8858|   		;
# 8859|   

Error: CPPCHECK_WARNING (CWE-768): [#def755]
postgresql-16.8/src/backend/parser/gram.y:8973: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].typnam)},(union ListCell){.ptr_value=(yyvsp[-2].typnam)}' depends on order of evaluation of side effects
# 8971|   
# 8972|   					n->removeType = OBJECT_CAST;
# 8973|-> 					n->objects = list_make1(list_make2($5, $7));
# 8974|   					n->behavior = $9;
# 8975|   					n->missing_ok = $3;

Error: CPPCHECK_WARNING (CWE-768): [#def756]
postgresql-16.8/src/backend/parser/gram.y:9007: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].objwithargs)},(union ListCell){.ptr_value=(yyvsp[0].objwithargs)}' depends on order of evaluation of side effects
# 9005|   transform_element_list: FROM SQL_P WITH FUNCTION function_with_argtypes ',' TO SQL_P WITH FUNCTION function_with_argtypes
# 9006|   				{
# 9007|-> 					$$ = list_make2($5, $11);
# 9008|   				}
# 9009|   				| TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes

Error: CPPCHECK_WARNING (CWE-768): [#def757]
postgresql-16.8/src/backend/parser/gram.y:9011: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].objwithargs)},(union ListCell){.ptr_value=(yyvsp[-6].objwithargs)}' depends on order of evaluation of side effects
# 9009|   				| TO SQL_P WITH FUNCTION function_with_argtypes ',' FROM SQL_P WITH FUNCTION function_with_argtypes
# 9010|   				{
# 9011|-> 					$$ = list_make2($11, $5);
# 9012|   				}
# 9013|   				| FROM SQL_P WITH FUNCTION function_with_argtypes

Error: CPPCHECK_WARNING (CWE-768): [#def758]
postgresql-16.8/src/backend/parser/gram.y:9015: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].objwithargs)},(union ListCell){.ptr_value=(NULL)}' depends on order of evaluation of side effects
# 9013|   				| FROM SQL_P WITH FUNCTION function_with_argtypes
# 9014|   				{
# 9015|-> 					$$ = list_make2($5, NULL);
# 9016|   				}
# 9017|   				| TO SQL_P WITH FUNCTION function_with_argtypes

Error: CPPCHECK_WARNING (CWE-768): [#def759]
postgresql-16.8/src/backend/parser/gram.y:9019: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=(yyvsp[0].objwithargs)}' depends on order of evaluation of side effects
# 9017|   				| TO SQL_P WITH FUNCTION function_with_argtypes
# 9018|   				{
# 9019|-> 					$$ = list_make2(NULL, $5);
# 9020|   				}
# 9021|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def760]
postgresql-16.8/src/backend/parser/gram.y:9029: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].typnam)},(union ListCell){.ptr_value=(makeString(yyvsp[-1].str))}' depends on order of evaluation of side effects
# 9027|   
# 9028|   					n->removeType = OBJECT_TRANSFORM;
# 9029|-> 					n->objects = list_make1(list_make2($5, makeString($7)));
# 9030|   					n->behavior = $8;
# 9031|   					n->missing_ok = $3;

Error: CPPCHECK_WARNING (CWE-768): [#def761]
postgresql-16.8/src/backend/parser/gram.y:11491: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].list)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
#11489|   					n->cfgname = $5;
#11490|   					n->tokentype = NIL;
#11491|-> 					n->dicts = list_make2($9,$11);
#11492|   					n->override = false;
#11493|   					n->replace = true;

Error: CPPCHECK_WARNING (CWE-768): [#def762]
postgresql-16.8/src/backend/parser/gram.y:11503: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].list)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
#11501|   					n->cfgname = $5;
#11502|   					n->tokentype = $9;
#11503|-> 					n->dicts = list_make2($11,$13);
#11504|   					n->override = false;
#11505|   					n->replace = true;

Error: CPPCHECK_WARNING (CWE-768): [#def763]
postgresql-16.8/src/backend/parser/gram.y:13487: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].alias)},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
#13485|   			alias_clause
#13486|   				{
#13487|-> 					$$ = list_make2($1, NIL);
#13488|   				}
#13489|   			| AS '(' TableFuncElementList ')'

Error: CPPCHECK_WARNING (CWE-768): [#def764]
postgresql-16.8/src/backend/parser/gram.y:13491: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
#13489|   			| AS '(' TableFuncElementList ')'
#13490|   				{
#13491|-> 					$$ = list_make2(NULL, $3);
#13492|   				}
#13493|   			| AS ColId '(' TableFuncElementList ')'

Error: CPPCHECK_WARNING (CWE-768): [#def765]
postgresql-16.8/src/backend/parser/gram.y:13498: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(a)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
#13496|   
#13497|   					a->aliasname = $2;
#13498|-> 					$$ = list_make2(a, $4);
#13499|   				}
#13500|   			| ColId '(' TableFuncElementList ')'

Error: CPPCHECK_WARNING (CWE-768): [#def766]
postgresql-16.8/src/backend/parser/gram.y:13505: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(a)},(union ListCell){.ptr_value=(yyvsp[-1].list)}' depends on order of evaluation of side effects
#13503|   
#13504|   					a->aliasname = $1;
#13505|-> 					$$ = list_make2(a, $3);
#13506|   				}
#13507|   			| /*EMPTY*/

Error: CPPCHECK_WARNING (CWE-768): [#def767]
postgresql-16.8/src/backend/parser/gram.y:13509: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(NULL)},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
#13507|   			| /*EMPTY*/
#13508|   				{
#13509|-> 					$$ = list_make2(NULL, NIL);
#13510|   				}
#13511|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def768]
postgresql-16.8/src/backend/parser/gram.y:13538: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].list)},(union ListCell){.ptr_value=(yyvsp[0].alias)}' depends on order of evaluation of side effects
#13536|   join_qual: USING '(' name_list ')' opt_alias_clause_for_join_using
#13537|   				{
#13538|-> 					$$ = (Node *) list_make2($3, $5);
#13539|   				}
#13540|   			| ON a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def769]
postgresql-16.8/src/backend/parser/gram.y:13664: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].node)},(union ListCell){.ptr_value=((struct List*)NULL)}' depends on order of evaluation of side effects
#13662|   					n->ordinality = $2;
#13663|   					n->is_rowsfrom = false;
#13664|-> 					n->functions = list_make1(list_make2($1, NIL));
#13665|   					/* alias and coldeflist are set by table_ref production */
#13666|   					$$ = (Node *) n;

Error: CPPCHECK_WARNING (CWE-768): [#def770]
postgresql-16.8/src/backend/parser/gram.y:13682: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-1].node)},(union ListCell){.ptr_value=(yyvsp[0].list)}' depends on order of evaluation of side effects
#13680|   
#13681|   rowsfrom_item: func_expr_windowless opt_col_def_list
#13682|-> 				{ $$ = list_make2($1, $2); }
#13683|   		;
#13684|   

Error: CPPCHECK_WARNING (CWE-768): [#def771]
postgresql-16.8/src/backend/parser/gram.y:13988: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(0x7FFF,-1))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-1].ival,yylsp[-1]))})' depends on order of evaluation of side effects
#13986|   				{
#13987|   					$$ = $1;
#13988|-> 					$$->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1),
#13989|   											 makeIntConst($3, @3));
#13990|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def772]
postgresql-16.8/src/backend/parser/gram.y:14372: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(1<<12,yylsp[-3]))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-1].ival,yylsp[-1]))})' depends on order of evaluation of side effects
#14370|   			| SECOND_P '(' Iconst ')'
#14371|   				{
#14372|-> 					$$ = list_make2(makeIntConst(INTERVAL_MASK(SECOND), @1),
#14373|   									makeIntConst($3, @3));
#14374|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def773]
postgresql-16.8/src/backend/parser/gram.y:14421: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)}' depends on order of evaluation of side effects
#14419|   				{
#14420|   					$$ = (Node *) makeFuncCall(SystemFuncName("timezone"),
#14421|-> 											   list_make2($5, $1),
#14422|   											   COERCE_SQL_SYNTAX,
#14423|   											   @2);

Error: CPPCHECK_WARNING (CWE-768): [#def774]
postgresql-16.8/src/backend/parser/gram.y:14485: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14483|   				{
#14484|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14485|-> 												 list_make2($3, $5),
#14486|   												 COERCE_EXPLICIT_CALL,
#14487|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def775]
postgresql-16.8/src/backend/parser/gram.y:14499: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14497|   				{
#14498|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14499|-> 												 list_make2($4, $6),
#14500|   												 COERCE_EXPLICIT_CALL,
#14501|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def776]
postgresql-16.8/src/backend/parser/gram.y:14513: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14511|   				{
#14512|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14513|-> 												 list_make2($3, $5),
#14514|   												 COERCE_EXPLICIT_CALL,
#14515|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def777]
postgresql-16.8/src/backend/parser/gram.y:14527: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14525|   				{
#14526|   					FuncCall   *n = makeFuncCall(SystemFuncName("like_escape"),
#14527|-> 												 list_make2($4, $6),
#14528|   												 COERCE_EXPLICIT_CALL,
#14529|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def778]
postgresql-16.8/src/backend/parser/gram.y:14546: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14544|   				{
#14545|   					FuncCall   *n = makeFuncCall(SystemFuncName("similar_to_escape"),
#14546|-> 												 list_make2($4, $6),
#14547|   												 COERCE_EXPLICIT_CALL,
#14548|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def779]
postgresql-16.8/src/backend/parser/gram.y:14564: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14562|   				{
#14563|   					FuncCall   *n = makeFuncCall(SystemFuncName("similar_to_escape"),
#14564|-> 												 list_make2($5, $7),
#14565|   												 COERCE_EXPLICIT_CALL,
#14566|   												 @2);

Error: CPPCHECK_WARNING (CWE-768): [#def780]
postgresql-16.8/src/backend/parser/gram.y:14700: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14698|   												   "BETWEEN",
#14699|   												   $1,
#14700|-> 												   (Node *) list_make2($4, $6),
#14701|   												   @2);
#14702|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def781]
postgresql-16.8/src/backend/parser/gram.y:14708: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14706|   												   "NOT BETWEEN",
#14707|   												   $1,
#14708|-> 												   (Node *) list_make2($5, $7),
#14709|   												   @2);
#14710|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def782]
postgresql-16.8/src/backend/parser/gram.y:14716: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14714|   												   "BETWEEN SYMMETRIC",
#14715|   												   $1,
#14716|-> 												   (Node *) list_make2($4, $6),
#14717|   												   @2);
#14718|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def783]
postgresql-16.8/src/backend/parser/gram.y:14724: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#14722|   												   "NOT BETWEEN SYMMETRIC",
#14723|   												   $1,
#14724|-> 												   (Node *) list_make2($5, $7),
#14725|   												   @2);
#14726|   				}

Error: CPPCHECK_WARNING (CWE-768): [#def784]
postgresql-16.8/src/backend/parser/gram.y:14827: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].node)},((union ListCell){.ptr_value=(makeStringConst(yyvsp[-1].str,yylsp[-1]))})' depends on order of evaluation of side effects
#14825|   				{
#14826|   					$$ = (Node *) makeFuncCall(SystemFuncName("is_normalized"),
#14827|-> 											   list_make2($1, makeStringConst($3, @3)),
#14828|   											   COERCE_SQL_SYNTAX,
#14829|   											   @2);

Error: CPPCHECK_WARNING (CWE-768): [#def785]
postgresql-16.8/src/backend/parser/gram.y:14842: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},((union ListCell){.ptr_value=(makeStringConst(yyvsp[-1].str,yylsp[-1]))})' depends on order of evaluation of side effects
#14840|   				{
#14841|   					$$ = makeNotExpr((Node *) makeFuncCall(SystemFuncName("is_normalized"),
#14842|-> 														   list_make2($1, makeStringConst($4, @4)),
#14843|   														   COERCE_SQL_SYNTAX,
#14844|   														   @2),

Error: CPPCHECK_WARNING (CWE-768): [#def786]
postgresql-16.8/src/backend/parser/gram.y:15361: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-3].node)},((union ListCell){.ptr_value=(makeStringConst(yyvsp[-1].str,yylsp[-1]))})' depends on order of evaluation of side effects
#15359|   				{
#15360|   					$$ = (Node *) makeFuncCall(SystemFuncName("normalize"),
#15361|-> 											   list_make2($3, makeStringConst($5, @5)),
#15362|   											   COERCE_SQL_SYNTAX,
#15363|   											   @1);

Error: CPPCHECK_WARNING (CWE-768): [#def787]
postgresql-16.8/src/backend/parser/gram.y:15520: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[-1].node)}' depends on order of evaluation of side effects
#15518|   					 * converted to xmlexists(A, B)*/
#15519|   					$$ = (Node *) makeFuncCall(SystemFuncName("xmlexists"),
#15520|-> 											   list_make2($3, $4),
#15521|   											   COERCE_SQL_SYNTAX,
#15522|   											   @1);

Error: CPPCHECK_WARNING (CWE-768): [#def788]
postgresql-16.8/src/backend/parser/gram.y:15532: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},((union ListCell){.ptr_value=(makeBoolAConst(yyvsp[-1].boolean,-1))})' depends on order of evaluation of side effects
#15530|   					XmlExpr *x = (XmlExpr *)
#15531|   						makeXmlExpr(IS_XMLPARSE, NULL, NIL,
#15532|-> 									list_make2($4, makeBoolAConst($5, -1)),
#15533|   									@1);
#15534|   

Error: CPPCHECK_WARNING (CWE-768): [#def789]
postgresql-16.8/src/backend/parser/gram.y:15549: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#15547|   				{
#15548|   					$$ = makeXmlExpr(IS_XMLROOT, NULL, NIL,
#15549|-> 									 list_make3($3, $5, $6), @1);
#15550|   				}
#15551|   			| XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename xml_indent_option ')'

Error: CPPCHECK_WARNING (CWE-768): [#def790]
postgresql-16.8/src/backend/parser/gram.y:15549: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[-1].node)}' depends on order of evaluation of side effects
#15547|   				{
#15548|   					$$ = makeXmlExpr(IS_XMLROOT, NULL, NIL,
#15549|-> 									 list_make3($3, $5, $6), @1);
#15550|   				}
#15551|   			| XMLSERIALIZE '(' document_or_content a_expr AS SimpleTypename xml_indent_option ')'

Error: CPPCHECK_WARNING (CWE-768): [#def791]
postgresql-16.8/src/backend/parser/gram.y:16133: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeStringConst(yyvsp[-2].str,yylsp[-2]))}),(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16131|   			extract_arg FROM a_expr
#16132|   				{
#16133|-> 					$$ = list_make2(makeStringConst($1, @1), $3);
#16134|   				}
#16135|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def792]
postgresql-16.8/src/backend/parser/gram.y:16163: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)}' depends on order of evaluation of side effects
#16161|   				{
#16162|   					/* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */
#16163|-> 					$$ = list_make4($1, $3, $5, $7);
#16164|   				}
#16165|   			| a_expr PLACING a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def793]
postgresql-16.8/src/backend/parser/gram.y:16163: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16161|   				{
#16162|   					/* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */
#16163|-> 					$$ = list_make4($1, $3, $5, $7);
#16164|   				}
#16165|   			| a_expr PLACING a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def794]
postgresql-16.8/src/backend/parser/gram.y:16163: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-6].node)},(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16161|   				{
#16162|   					/* overlay(A PLACING B FROM C FOR D) is converted to overlay(A, B, C, D) */
#16163|-> 					$$ = list_make4($1, $3, $5, $7);
#16164|   				}
#16165|   			| a_expr PLACING a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def795]
postgresql-16.8/src/backend/parser/gram.y:16168: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16166|   				{
#16167|   					/* overlay(A PLACING B FROM C) is converted to overlay(A, B, C) */
#16168|-> 					$$ = list_make3($1, $3, $5);
#16169|   				}
#16170|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def796]
postgresql-16.8/src/backend/parser/gram.y:16168: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16166|   				{
#16167|   					/* overlay(A PLACING B FROM C) is converted to overlay(A, B, C) */
#16168|-> 					$$ = list_make3($1, $3, $5);
#16169|   				}
#16170|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def797]
postgresql-16.8/src/backend/parser/gram.y:16174: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[0].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16172|   /* position_list uses b_expr not a_expr to avoid conflict with general IN */
#16173|   position_list:
#16174|-> 			b_expr IN_P b_expr						{ $$ = list_make2($3, $1); }
#16175|   		;
#16176|   

Error: CPPCHECK_WARNING (CWE-768): [#def798]
postgresql-16.8/src/backend/parser/gram.y:16197: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16195|   			a_expr FROM a_expr FOR a_expr
#16196|   				{
#16197|-> 					$$ = list_make3($1, $3, $5);
#16198|   				}
#16199|   			| a_expr FOR a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def799]
postgresql-16.8/src/backend/parser/gram.y:16197: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16195|   			a_expr FROM a_expr FOR a_expr
#16196|   				{
#16197|-> 					$$ = list_make3($1, $3, $5);
#16198|   				}
#16199|   			| a_expr FOR a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def800]
postgresql-16.8/src/backend/parser/gram.y:16202: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16200|   				{
#16201|   					/* not legal per SQL, but might as well allow it */
#16202|-> 					$$ = list_make3($1, $5, $3);
#16203|   				}
#16204|   			| a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def801]
postgresql-16.8/src/backend/parser/gram.y:16202: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[0].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16200|   				{
#16201|   					/* not legal per SQL, but might as well allow it */
#16202|-> 					$$ = list_make3($1, $5, $3);
#16203|   				}
#16204|   			| a_expr FROM a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def802]
postgresql-16.8/src/backend/parser/gram.y:16213: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16211|   					 * such a call in regular function call syntax.
#16212|   					 */
#16213|-> 					$$ = list_make2($1, $3);
#16214|   				}
#16215|   			| a_expr FOR a_expr

Error: CPPCHECK_WARNING (CWE-768): [#def803]
postgresql-16.8/src/backend/parser/gram.y:16228: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},((union ListCell){.ptr_value=(makeIntConst(1,-1))})' depends on order of evaluation of side effects
#16226|   					 * is unknown or doesn't have an implicit cast to int4.
#16227|   					 */
#16228|-> 					$$ = list_make3($1, makeIntConst(1, -1),
#16229|   									makeTypeCast($3,
#16230|   												 SystemTypeName("int4"), -1));

Error: CPPCHECK_WARNING (CWE-768): [#def804]
postgresql-16.8/src/backend/parser/gram.y:16228: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].node)},((union ListCell){.ptr_value=(makeIntConst(1,-1))}),((union ListCell){.ptr_value=(makeTypeCast(yyvsp[0].node,SystemTypeName("int4"),-1))})' depends on order of evaluation of side effects
#16226|   					 * is unknown or doesn't have an implicit cast to int4.
#16227|   					 */
#16228|-> 					$$ = list_make3($1, makeIntConst(1, -1),
#16229|   									makeTypeCast($3,
#16230|   												 SystemTypeName("int4"), -1));

Error: CPPCHECK_WARNING (CWE-768): [#def805]
postgresql-16.8/src/backend/parser/gram.y:16234: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)}' depends on order of evaluation of side effects
#16232|   			| a_expr SIMILAR a_expr ESCAPE a_expr
#16233|   				{
#16234|-> 					$$ = list_make3($1, $3, $5);
#16235|   				}
#16236|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def806]
postgresql-16.8/src/backend/parser/gram.y:16234: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-4].node)},(union ListCell){.ptr_value=(yyvsp[-2].node)},(union ListCell){.ptr_value=(yyvsp[0].node)}' depends on order of evaluation of side effects
#16232|   			| a_expr SIMILAR a_expr ESCAPE a_expr
#16233|   				{
#16234|-> 					$$ = list_make3($1, $3, $5);
#16235|   				}
#16236|   		;

Error: CPPCHECK_WARNING (CWE-768): [#def807]
postgresql-16.8/src/backend/parser/gram.y:16694: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeIntConst(0x7FFF,-1))}),((union ListCell){.ptr_value=(makeIntConst(yyvsp[-2].ival,yylsp[-2]))})' depends on order of evaluation of side effects
#16692|   					TypeName   *t = $1;
#16693|   
#16694|-> 					t->typmods = list_make2(makeIntConst(INTERVAL_FULL_RANGE, -1),
#16695|   											makeIntConst($3, @3));
#16696|   					$$ = makeStringConstCast($5, @5, t);

Error: CPPCHECK_WARNING (CWE-457): [#def808]
postgresql-16.8/src/backend/parser/gram.y:16788: error[legacyUninitvar]: Uninitialized variable: n
#16786|   						n->rolename = pstrdup($1);
#16787|   					}
#16788|-> 					$$ = n;
#16789|   				}
#16790|   			| CURRENT_ROLE

Error: CPPCHECK_WARNING (CWE-768): [#def809]
postgresql-16.8/src/backend/parser/gram.y:18241: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(list_concat(directargs,orderedargs))}),(union ListCell){.ptr_value=(ndirectargs)}' depends on order of evaluation of side effects
#18239|   	ndirectargs = makeInteger(list_length(directargs));
#18240|   
#18241|-> 	return list_make2(list_concat(directargs, orderedargs),
#18242|   					  ndirectargs);
#18243|   }

Error: CPPCHECK_WARNING (CWE-768): [#def810]
postgresql-16.8/src/backend/parser/gram.y:18348: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString("pg_catalog"))},(union ListCell){.ptr_value=(makeString(name))}' depends on order of evaluation of side effects
#18346|   SystemFuncName(char *name)
#18347|   {
#18348|-> 	return list_make2(makeString("pg_catalog"), makeString(name));
#18349|   }
#18350|   

Error: CPPCHECK_WARNING (CWE-768): [#def811]
postgresql-16.8/src/backend/parser/gram.y:18360: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString("pg_catalog"))},(union ListCell){.ptr_value=(makeString(name))}' depends on order of evaluation of side effects
#18358|   SystemTypeName(char *name)
#18359|   {
#18360|-> 	return makeTypeNameFromNameList(list_make2(makeString("pg_catalog"),
#18361|   											   makeString(name)));
#18362|   }

Error: CPPCHECK_WARNING (CWE-768): [#def812]
postgresql-16.8/src/backend/parser/gram.y:18429: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lexpr)},(union ListCell){.ptr_value=(rexpr)}' depends on order of evaluation of side effects
#18427|   		}
#18428|   	}
#18429|-> 	return (Node *) makeBoolExpr(AND_EXPR, list_make2(lexpr, rexpr), location);
#18430|   }
#18431|   

Error: CPPCHECK_WARNING (CWE-768): [#def813]
postgresql-16.8/src/backend/parser/gram.y:18446: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(lexpr)},(union ListCell){.ptr_value=(rexpr)}' depends on order of evaluation of side effects
#18444|   		}
#18445|   	}
#18446|-> 	return (Node *) makeBoolExpr(OR_EXPR, list_make2(lexpr, rexpr), location);
#18447|   }
#18448|   

Error: CPPCHECK_WARNING (CWE-768): [#def814]
postgresql-16.8/src/backend/parser/parse_agg.c:2114: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(make_agg_arg(17,(unsigned int)0))}),((union ListCell){.ptr_value=(make_agg_arg(2281,(unsigned int)0))})' depends on order of evaluation of side effects
# 2112|   
# 2113|   	/* deserialfn always takes BYTEA, INTERNAL and returns INTERNAL */
# 2114|-> 	args = list_make2(make_agg_arg(BYTEAOID, InvalidOid),
# 2115|   					  make_agg_arg(INTERNALOID, InvalidOid));
# 2116|   

Error: CPPCHECK_WARNING (CWE-768): [#def815]
postgresql-16.8/src/backend/parser/parse_clause.c:1670: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(l_colvar)},(union ListCell){.ptr_value=(r_colvar)}' depends on order of evaluation of side effects
# 1668|   
# 1669|   	outcoltype = select_common_type(pstate,
# 1670|-> 									list_make2(l_colvar, r_colvar),
# 1671|   									"JOIN/USING",
# 1672|   									NULL);

Error: CPPCHECK_WARNING (CWE-768): [#def816]
postgresql-16.8/src/backend/parser/parse_clause.c:1674: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(l_colvar)},(union ListCell){.ptr_value=(r_colvar)}' depends on order of evaluation of side effects
# 1672|   									NULL);
# 1673|   	outcoltypmod = select_common_typmod(pstate,
# 1674|-> 										list_make2(l_colvar, r_colvar),
# 1675|   										outcoltype);
# 1676|   

Error: CPPCHECK_WARNING (CWE-768): [#def817]
postgresql-16.8/src/backend/parser/parse_clause.c:1742: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(l_node)},(union ListCell){.ptr_value=(r_node)}' depends on order of evaluation of side effects
# 1740|   				c->coalescetype = outcoltype;
# 1741|   				/* coalescecollid will get set below */
# 1742|-> 				c->args = list_make2(l_node, r_node);
# 1743|   				c->location = -1;
# 1744|   				res_node = (Node *) c;

Error: CPPCHECK_WARNING (CWE-768): [#def818]
postgresql-16.8/src/backend/parser/parse_collate.c:377: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(le)},(union ListCell){.ptr_value=(re)}' depends on order of evaluation of side effects
#  375|   
#  376|   					coll = select_common_collation(context->pstate,
#  377|-> 												   list_make2(le, re),
#  378|   												   true);
#  379|   					colls = lappend_oid(colls, coll);

Error: CPPCHECK_WARNING (CWE-768): [#def819]
postgresql-16.8/src/backend/parser/parse_cte.c:276: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_clause->cycle_mark_value)},(union ListCell){.ptr_value=(cycle_clause->cycle_mark_default)}' depends on order of evaluation of side effects
#  274|   		cycle_clause->cycle_mark_type =
#  275|   			select_common_type(pstate,
#  276|-> 							   list_make2(cycle_clause->cycle_mark_value,
#  277|   										  cycle_clause->cycle_mark_default),
#  278|   							   "CYCLE", NULL);

Error: CPPCHECK_WARNING (CWE-768): [#def820]
postgresql-16.8/src/backend/parser/parse_cte.c:292: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_clause->cycle_mark_value)},(union ListCell){.ptr_value=(cycle_clause->cycle_mark_default)}' depends on order of evaluation of side effects
#  290|   		cycle_clause->cycle_mark_typmod =
#  291|   			select_common_typmod(pstate,
#  292|-> 								 list_make2(cycle_clause->cycle_mark_value,
#  293|   											cycle_clause->cycle_mark_default),
#  294|   								 cycle_clause->cycle_mark_type);

Error: CPPCHECK_WARNING (CWE-768): [#def821]
postgresql-16.8/src/backend/parser/parse_cte.c:298: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_clause->cycle_mark_value)},(union ListCell){.ptr_value=(cycle_clause->cycle_mark_default)}' depends on order of evaluation of side effects
#  296|   		cycle_clause->cycle_mark_collation =
#  297|   			select_common_collation(pstate,
#  298|-> 									list_make2(cycle_clause->cycle_mark_value,
#  299|   											   cycle_clause->cycle_mark_default),
#  300|   									true);

Error: CPPCHECK_WARNING (CWE-768): [#def822]
postgresql-16.8/src/backend/parser/parse_expr.c:1239: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(result)},(union ListCell){.ptr_value=(cmp)}' depends on order of evaluation of side effects
# 1237|   		else
# 1238|   			result = (Node *) makeBoolExpr(useOr ? OR_EXPR : AND_EXPR,
# 1239|-> 										   list_make2(result, cmp),
# 1240|   										   a->location);
# 1241|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def823]
postgresql-16.8/src/backend/parser/parse_expr.c:1278: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">=",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<=",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1276|   	{
# 1277|   		case AEXPR_BETWEEN:
# 1278|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=",
# 1279|   											   aexpr, bexpr,
# 1280|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def824]
postgresql-16.8/src/backend/parser/parse_expr.c:1287: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1285|   			break;
# 1286|   		case AEXPR_NOT_BETWEEN:
# 1287|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<",
# 1288|   											   aexpr, bexpr,
# 1289|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def825]
postgresql-16.8/src/backend/parser/parse_expr.c:1296: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">=",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<=",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1294|   			break;
# 1295|   		case AEXPR_BETWEEN_SYM:
# 1296|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=",
# 1297|   											   aexpr, bexpr,
# 1298|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def826]
postgresql-16.8/src/backend/parser/parse_expr.c:1303: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">=",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(cexpr))copyObjectImpl(cexpr),a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<=",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(bexpr))copyObjectImpl(bexpr),a->location))})' depends on order of evaluation of side effects
# 1301|   											   a->location));
# 1302|   			sub1 = (Node *) makeBoolExpr(AND_EXPR, args, a->location);
# 1303|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, ">=",
# 1304|   											   copyObject(aexpr), copyObject(cexpr),
# 1305|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def827]
postgresql-16.8/src/backend/parser/parse_expr.c:1310: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(sub1)},(union ListCell){.ptr_value=(sub2)}' depends on order of evaluation of side effects
# 1308|   											   a->location));
# 1309|   			sub2 = (Node *) makeBoolExpr(AND_EXPR, args, a->location);
# 1310|-> 			args = list_make2(sub1, sub2);
# 1311|   			result = (Node *) makeBoolExpr(OR_EXPR, args, a->location);
# 1312|   			break;

Error: CPPCHECK_WARNING (CWE-768): [#def828]
postgresql-16.8/src/backend/parser/parse_expr.c:1314: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<",aexpr,bexpr,a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">",(__typeof__(aexpr))copyObjectImpl(aexpr),cexpr,a->location))})' depends on order of evaluation of side effects
# 1312|   			break;
# 1313|   		case AEXPR_NOT_BETWEEN_SYM:
# 1314|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<",
# 1315|   											   aexpr, bexpr,
# 1316|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def829]
postgresql-16.8/src/backend/parser/parse_expr.c:1321: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,"<",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(cexpr))copyObjectImpl(cexpr),a->location))}),((union ListCell){.ptr_value=(makeSimpleA_Expr(AEXPR_OP,">",(__typeof__(aexpr))copyObjectImpl(aexpr),(__typeof__(bexpr))copyObjectImpl(bexpr),a->location))})' depends on order of evaluation of side effects
# 1319|   											   a->location));
# 1320|   			sub1 = (Node *) makeBoolExpr(OR_EXPR, args, a->location);
# 1321|-> 			args = list_make2(makeSimpleA_Expr(AEXPR_OP, "<",
# 1322|   											   copyObject(aexpr), copyObject(cexpr),
# 1323|   											   a->location),

Error: CPPCHECK_WARNING (CWE-768): [#def830]
postgresql-16.8/src/backend/parser/parse_expr.c:1328: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(sub1)},(union ListCell){.ptr_value=(sub2)}' depends on order of evaluation of side effects
# 1326|   											   a->location));
# 1327|   			sub2 = (Node *) makeBoolExpr(OR_EXPR, args, a->location);
# 1328|-> 			args = list_make2(sub1, sub2);
# 1329|   			result = (Node *) makeBoolExpr(AND_EXPR, args, a->location);
# 1330|   			break;

Error: CPPCHECK_WARNING (CWE-768): [#def831]
postgresql-16.8/src/backend/parser/parse_expr.c:2974: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(result)},(union ListCell){.ptr_value=(cmp)}' depends on order of evaluation of side effects
# 2972|   		else
# 2973|   			result = (Node *) makeBoolExpr(OR_EXPR,
# 2974|-> 										   list_make2(result, cmp),
# 2975|   										   location);
# 2976|   	}

Error: CPPCHECK_WARNING (CWE-768): [#def832]
postgresql-16.8/src/backend/parser/parse_expr.c:3196: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(expr)},(union ListCell){.ptr_value=(encoding)}' depends on order of evaluation of side effects
# 3194|   	Const	   *encoding = getJsonEncodingConst(format);
# 3195|   	FuncExpr   *fexpr = makeFuncExpr(F_CONVERT_FROM, TEXTOID,
# 3196|-> 									 list_make2(expr, encoding),
# 3197|   									 InvalidOid, InvalidOid,
# 3198|   									 COERCE_EXPLICIT_CALL);

Error: CPPCHECK_WARNING (CWE-768): [#def833]
postgresql-16.8/src/backend/parser/parse_expr.c:3477: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(texpr)},(union ListCell){.ptr_value=(enc)}' depends on order of evaluation of side effects
# 3475|   		Const	   *enc = getJsonEncodingConst(returning->format);
# 3476|   		FuncExpr   *fexpr = makeFuncExpr(F_CONVERT_TO, BYTEAOID,
# 3477|-> 										 list_make2(texpr, enc),
# 3478|   										 InvalidOid, InvalidOid,
# 3479|   										 COERCE_EXPLICIT_CALL);

Error: CPPCHECK_WARNING (CWE-768): [#def834]
postgresql-16.8/src/backend/parser/parse_expr.c:3631: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(pstrdup("q")))},(union ListCell){.ptr_value=(makeString(pstrdup("a")))}' depends on order of evaluation of side effects
# 3629|   	free_parsestate(qpstate);
# 3630|   
# 3631|-> 	colref->fields = list_make2(makeString(pstrdup("q")),
# 3632|   								makeString(pstrdup("a")));
# 3633|   	colref->location = ctor->location;

Error: CPPCHECK_WARNING (CWE-768): [#def835]
postgresql-16.8/src/backend/parser/parse_expr.c:3774: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(key)},(union ListCell){.ptr_value=(val)}' depends on order of evaluation of side effects
# 3772|   								 agg->arg->value,
# 3773|   								 JS_FORMAT_DEFAULT);
# 3774|-> 	args = list_make2(key, val);
# 3775|   
# 3776|   	returning = transformJsonConstructorOutput(pstate, agg->constructor->output,

Error: CPPCHECK_WARNING (CWE-768): [#def836]
postgresql-16.8/src/backend/parser/parse_func.c:1779: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((aarg)->ptr_value)},(union ListCell){.ptr_value=((harg)->ptr_value)}' depends on order of evaluation of side effects
# 1777|   		 */
# 1778|   		commontype = select_common_type(pstate,
# 1779|-> 										list_make2(lfirst(aarg), lfirst(harg)),
# 1780|   										"WITHIN GROUP",
# 1781|   										NULL);

Error: CPPCHECK_WARNING (CWE-768): [#def837]
postgresql-16.8/src/backend/parser/parse_func.c:1783: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=((aarg)->ptr_value)},(union ListCell){.ptr_value=((harg)->ptr_value)}' depends on order of evaluation of side effects
# 1781|   										NULL);
# 1782|   		commontypmod = select_common_typmod(pstate,
# 1783|-> 											list_make2(lfirst(aarg), lfirst(harg)),
# 1784|   											commontype);
# 1785|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def838]
postgresql-16.8/src/backend/parser/parse_func.c:2013:70: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc’
postgresql-16.8/src/backend/parser/parse_func.c:1992:1: enter_function: entry to ‘funcname_signature_string’
postgresql-16.8/src/backend/parser/parse_func.c:2004:30: call_function: inlined call to ‘list_length’ from ‘funcname_signature_string’
postgresql-16.8/src/backend/parser/parse_func.c:2007:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-16.8/src/backend/parser/parse_func.c:2009:20: branch_true: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:2009:20: branch_false: following ‘false’ branch (when ‘i == 0’)...
postgresql-16.8/src/backend/parser/parse_func.c:2011:20: branch_false: ...to here
postgresql-16.8/src/backend/parser/parse_func.c:2007:21: branch_true: following ‘true’ branch (when ‘i < nargs’)...
postgresql-16.8/src/backend/parser/parse_func.c:2009:20: branch_true: ...to here
postgresql-16.8/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): [#def839]
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def840]
postgresql-16.8/src/backend/parser/parse_oper.c:733: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltree)},(union ListCell){.ptr_value=(rtree)}' depends on order of evaluation of side effects
#  731|   	{
#  732|   		/* otherwise, binary operator */
#  733|-> 		args = list_make2(ltree, rtree);
#  734|   		actual_arg_types[0] = ltypeId;
#  735|   		actual_arg_types[1] = rtypeId;

Error: CPPCHECK_WARNING (CWE-768): [#def841]
postgresql-16.8/src/backend/parser/parse_oper.c:835: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(ltree)},(union ListCell){.ptr_value=(rtree)}' depends on order of evaluation of side effects
#  833|   				 parser_errposition(pstate, location)));
#  834|   
#  835|-> 	args = list_make2(ltree, rtree);
#  836|   	actual_arg_types[0] = ltypeId;
#  837|   	actual_arg_types[1] = rtypeId;

Error: CPPCHECK_WARNING (CWE-768): [#def842]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:538: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(snamespace))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))}' depends on order of evaluation of side effects
#  536|   	altseqstmt = makeNode(AlterSeqStmt);
#  537|   	altseqstmt->sequence = makeRangeVar(snamespace, sname, -1);
#  538|-> 	attnamelist = list_make3(makeString(snamespace),
#  539|   							 makeString(cxt->relation->relname),
#  540|   							 makeString(column->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def843]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:538: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(snamespace))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))},(union ListCell){.ptr_value=(makeString(column->colname))}' depends on order of evaluation of side effects
#  536|   	altseqstmt = makeNode(AlterSeqStmt);
#  537|   	altseqstmt->sequence = makeRangeVar(snamespace, sname, -1);
#  538|-> 	attnamelist = list_make3(makeString(snamespace),
#  539|   							 makeString(cxt->relation->relname),
#  540|   							 makeString(column->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def844]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:1142: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(cxt->relation->schemaname))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))}' depends on order of evaluation of side effects
# 1140|   
# 1141|   			stmt->objtype = OBJECT_COLUMN;
# 1142|-> 			stmt->object = (Node *) list_make3(makeString(cxt->relation->schemaname),
# 1143|   											   makeString(cxt->relation->relname),
# 1144|   											   makeString(def->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def845]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:1142: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(cxt->relation->schemaname))},(union ListCell){.ptr_value=(makeString(cxt->relation->relname))},(union ListCell){.ptr_value=(makeString(def->colname))}' depends on order of evaluation of side effects
# 1140|   
# 1141|   			stmt->objtype = OBJECT_COLUMN;
# 1142|-> 			stmt->object = (Node *) list_make3(makeString(cxt->relation->schemaname),
# 1143|   											   makeString(cxt->relation->relname),
# 1144|   											   makeString(def->colname));

Error: CPPCHECK_WARNING (CWE-768): [#def846]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:1368: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(heapRel->schemaname))},(union ListCell){.ptr_value=(makeString(heapRel->relname))}' depends on order of evaluation of side effects
# 1366|   
# 1367|   				stmt->objtype = OBJECT_TABCONSTRAINT;
# 1368|-> 				stmt->object = (Node *) list_make3(makeString(heapRel->schemaname),
# 1369|   												   makeString(heapRel->relname),
# 1370|   												   makeString(n->conname));

Error: CPPCHECK_WARNING (CWE-768): [#def847]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:1368: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(heapRel->schemaname))},(union ListCell){.ptr_value=(makeString(heapRel->relname))},(union ListCell){.ptr_value=(makeString(n->conname))}' depends on order of evaluation of side effects
# 1366|   
# 1367|   				stmt->objtype = OBJECT_TABCONSTRAINT;
# 1368|-> 				stmt->object = (Node *) list_make3(makeString(heapRel->schemaname),
# 1369|   												   makeString(heapRel->relname),
# 1370|   												   makeString(n->conname));

Error: CPPCHECK_WARNING (CWE-768): [#def848]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:1697: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(nspname))},(union ListCell){.ptr_value=(makeString(oprname))}' depends on order of evaluation of side effects
# 1695|   					/* For simplicity we always schema-qualify the op name */
# 1696|   					nspname = get_namespace_name(operform->oprnamespace);
# 1697|-> 					namelist = list_make2(makeString(nspname),
# 1698|   										  makeString(oprname));
# 1699|   					index->excludeOpNames = lappend(index->excludeOpNames,

Error: CPPCHECK_WARNING (CWE-768): [#def849]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:2051: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(nsp_name))},(union ListCell){.ptr_value=(makeString(coll_name))}' depends on order of evaluation of side effects
# 2049|   	nsp_name = get_namespace_name(coll_rec->collnamespace);
# 2050|   	coll_name = pstrdup(NameStr(coll_rec->collname));
# 2051|-> 	result = list_make2(makeString(nsp_name), makeString(coll_name));
# 2052|   
# 2053|   	ReleaseSysCache(ht_coll);

Error: CPPCHECK_WARNING (CWE-768): [#def850]
postgresql-16.8/src/backend/parser/parse_utilcmd.c:2081: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(nsp_name))},(union ListCell){.ptr_value=(makeString(opc_name))}' depends on order of evaluation of side effects
# 2079|   		char	   *opc_name = pstrdup(NameStr(opc_rec->opcname));
# 2080|   
# 2081|-> 		result = list_make2(makeString(nsp_name), makeString(opc_name));
# 2082|   	}
# 2083|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def851]
postgresql-16.8/src/backend/parser/scan.c:10859:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/src/backend/parser/scan.c:10738:10: enter_function: entry to ‘core_yyrestart’
postgresql-16.8/src/backend/parser/scan.c:10743:9: call_function: calling ‘core_yyensure_buffer_stack’ from ‘core_yyrestart’
postgresql-16.8/src/backend/parser/scan.c:10743:9: return_function: returning to ‘core_yyrestart’ from ‘core_yyensure_buffer_stack’
postgresql-16.8/src/backend/parser/scan.c:10745:13: call_function: calling ‘core_yy_create_buffer’ from ‘core_yyrestart’
postgresql-16.8/src/backend/parser/scan.c:10745:13: return_function: returning to ‘core_yyrestart’ from ‘core_yy_create_buffer’
postgresql-16.8/src/backend/parser/scan.c:10748:9: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/parser/scan.c:10748:9: branch_false: ...to here
postgresql-16.8/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): [#def852]
postgresql-16.8/src/backend/partitioning/../../../src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘elemops’
postgresql-16.8/src/backend/partitioning/partbounds.c:3869:1: enter_function: entry to ‘make_partition_op_expr’
postgresql-16.8/src/backend/partitioning/partbounds.c:3877:19: call_function: calling ‘get_partition_operator’ from ‘make_partition_op_expr’
postgresql-16.8/src/backend/partitioning/partbounds.c:3877:19: return_function: returning to ‘make_partition_op_expr’ from ‘get_partition_operator’
postgresql-16.8/src/backend/partitioning/partbounds.c:3952:50: branch_false: following ‘false’ branch...
postgresql-16.8/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): [#def853]
postgresql-16.8/src/backend/partitioning/../../../src/include/nodes/pg_list.h:281:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘or_expr_args’
postgresql-16.8/src/backend/partitioning/partbounds.c:4276:1: enter_function: entry to ‘get_qual_for_range’
postgresql-16.8/src/backend/partitioning/partbounds.c:4301:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/partitioning/partbounds.c:4304:39: branch_true: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4309:29: branch_true: following ‘true’ branch (when ‘k < nparts’)...
postgresql-16.8/src/backend/partitioning/partbounds.c:4311:67: branch_true: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4317:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partbounds.c:4320:33: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4324:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partbounds.c:4327:30: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4327:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partbounds.c:4331:45: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4331:45: call_function: calling ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-16.8/src/backend/partitioning/partbounds.c:4331:45: return_function: returning to ‘get_qual_for_range’ from ‘get_qual_for_range’
postgresql-16.8/src/backend/partitioning/partbounds.c:4337:70: call_function: inlined call to ‘list_length’ from ‘get_qual_for_range’
postgresql-16.8/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): [#def854]
postgresql-16.8/src/backend/partitioning/partbounds.c:4040:43: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘partexprs_item’
postgresql-16.8/src/backend/partitioning/partbounds.c:3984:1: enter_function: entry to ‘get_qual_for_hash’
postgresql-16.8/src/backend/partitioning/partbounds.c:4021:26: call_function: inlined call to ‘list_head’ from ‘get_qual_for_hash’
 branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4024:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/partitioning/partbounds.c:4029:21: branch_true: ...to here
postgresql-16.8/src/backend/partitioning/partbounds.c:4029:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partbounds.c:4040:43: branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def855]
postgresql-16.8/src/backend/partitioning/partprune.c:1852: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(new_booltest)},(union ListCell){.ptr_value=(nulltest)}' depends on order of evaluation of side effects
# 1850|   			nulltest->location = -1;
# 1851|   
# 1852|-> 			new_clauses = list_make2(new_booltest, nulltest);
# 1853|   			or_clause = list_make1(makeBoolExpr(OR_EXPR, new_clauses, -1));
# 1854|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def856]
postgresql-16.8/src/backend/partitioning/partprune.c:2505:41: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘start’
postgresql-16.8/src/backend/partitioning/partprune.c:2485:1: enter_function: entry to ‘get_steps_using_prefix_recurse’
postgresql-16.8/src/backend/partitioning/partprune.c:2509:12: branch_true: following ‘true’ branch (when ‘cur_keyno < final_keyno’)...
postgresql-16.8/src/backend/partitioning/partprune.c:2519:17: call_function: inlined call to ‘for_each_cell_setup’ from ‘get_steps_using_prefix_recurse’
postgresql-16.8/src/backend/partitioning/partprune.c:2523:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:2519:17: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:2535:17: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:2535:17: branch_true: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:2542:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:2545:47: branch_true: ...to here
postgresql-16.8/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): [#def857]
postgresql-16.8/src/backend/partitioning/partprune.c:3477:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘lc2’
postgresql-16.8/src/backend/partitioning/partprune.c:3405:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-16.8/src/backend/partitioning/partprune.c:3422:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-16.8/src/backend/partitioning/partprune.c:3423:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
 branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3429:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:3436:42: branch_true: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3436:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:3443:20: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3443:20: branch_false: following ‘false’ branch (when ‘keyno <= nvalues’)...
postgresql-16.8/src/backend/partitioning/partprune.c:3446:20: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3446:20: branch_true: following ‘true’ branch (when ‘lc1’ is non-NULL)...
postgresql-16.8/src/backend/partitioning/partprune.c:3453:25: branch_true: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3464:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:3477:25: branch_false: ...to here
postgresql-16.8/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): [#def858]
postgresql-16.8/src/backend/partitioning/partprune.c:3521:32: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘values[0]’
postgresql-16.8/src/backend/partitioning/partprune.c:3405:1: enter_function: entry to ‘perform_pruning_base_step’
postgresql-16.8/src/backend/partitioning/partprune.c:3422:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
postgresql-16.8/src/backend/partitioning/partprune.c:3423:25: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3423:15: call_function: inlined call to ‘list_head’ from ‘perform_pruning_base_step’
 branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3429:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/partitioning/partprune.c:3508:20: branch_false: ...to here
postgresql-16.8/src/backend/partitioning/partprune.c:3521:32: danger: use of uninitialized value ‘values[0]’ here
# 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): [#def859]
postgresql-16.8/src/backend/postmaster/../../../src/include/lib/ilist.h:1009:9: warning[-Wanalyzer-malloc-leak]: leak of ‘rw’
postgresql-16.8/src/backend/postmaster/bgworker.c:895:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/postmaster/bgworker.c:898:13: branch_true: ...to here
postgresql-16.8/src/backend/postmaster/bgworker.c:898:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/postmaster/bgworker.c:913:13: branch_false: ...to here
postgresql-16.8/src/backend/postmaster/bgworker.c:913:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/postmaster/bgworker.c:929:14: branch_false: ...to here
postgresql-16.8/src/backend/postmaster/bgworker.c:929:14: acquire_memory: allocated here
postgresql-16.8/src/backend/postmaster/bgworker.c:930:12: branch_false: following ‘false’ branch (when ‘rw’ is non-NULL)...
postgresql-16.8/src/backend/postmaster/bgworker.c:938:9: branch_false: ...to here
postgresql-16.8/src/backend/postmaster/bgworker.c:945:9: call_function: inlined call to ‘slist_push_head’ from ‘RegisterBackgroundWorker’
# 1007|   {
# 1008|   	node->next = head->head.next;
# 1009|-> 	head->head.next = node;
# 1010|   
# 1011|   	slist_check(head);

Error: GCC_ANALYZER_WARNING (CWE-476): [#def860]
postgresql-16.8/src/backend/postmaster/postmaster.c:2290:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/postmaster/postmaster.c:4277:1: enter_function: entry to ‘BackendInitialize’
postgresql-16.8/src/backend/postmaster/postmaster.c:4403:18: call_function: calling ‘ProcessStartupPacket’ from ‘BackendInitialize’
# 2288|   		if (strchr(port->user_name, '@') ==
# 2289|   			port->user_name + strlen(port->user_name) - 1)
# 2290|-> 			*strchr(port->user_name, '@') = '\0';
# 2291|   		else
# 2292|   		{

Error: GCC_ANALYZER_WARNING: [#def861]
postgresql-16.8/src/backend/postmaster/syslogger.c:213:32: warning[-Wanalyzer-fd-use-without-check]: ‘dup2’ on possibly invalid file descriptor ‘2’
postgresql-16.8/src/backend/postmaster/syslogger.c:567:1: enter_function: entry to ‘SysLogger_Start’
postgresql-16.8/src/backend/postmaster/syslogger.c:572:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/postmaster/syslogger.c:593:13: branch_true: ...to here
postgresql-16.8/src/backend/postmaster/syslogger.c:635:20: call_function: calling ‘logfile_getname’ from ‘SysLogger_Start’
postgresql-16.8/src/backend/postmaster/syslogger.c:635:20: return_function: returning to ‘SysLogger_Start’ from ‘logfile_getname’
postgresql-16.8/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): [#def862]
postgresql-16.8/src/backend/regex/rege_dfa.c:1021:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘<unknown>’
postgresql-16.8/src/backend/regex/rege_dfa.c:973:1: enter_function: entry to ‘getvacant’
postgresql-16.8/src/backend/regex/rege_dfa.c:984:14: call_function: calling ‘pickss’ from ‘getvacant’
postgresql-16.8/src/backend/regex/rege_dfa.c:984:14: return_function: returning to ‘getvacant’ from ‘pickss’
postgresql-16.8/src/backend/regex/rege_dfa.c:985:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/regex/rege_dfa.c:990:9: branch_false: ...to here
postgresql-16.8/src/backend/regex/rege_dfa.c:1002:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/regex/rege_dfa.c:1004:21: branch_true: ...to here
postgresql-16.8/src/backend/regex/rege_dfa.c:1006:20: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/src/backend/regex/rege_dfa.c:1009:21: branch_false: ...to here
postgresql-16.8/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): [#def863]
postgresql-16.8/src/backend/regex/regexec.c:235: warning[uninitvar]: Uninitialized variable: v->pmatch
#  233|   		else
#  234|   			v->pmatch = (regmatch_t *) MALLOC(v->nmatch * sizeof(regmatch_t));
#  235|-> 		if (v->pmatch == NULL)
#  236|   			return REG_ESPACE;
#  237|   		zapallsubs(v->pmatch, v->nmatch);

Error: CPPCHECK_WARNING (CWE-457): [#def864]
postgresql-16.8/src/backend/replication/logical/reorderbuffer.c:4706: error[legacyUninitvar]: Uninitialized variable: chunksize
# 4704|   		elog(ERROR, "unexpected type of toast chunk");
# 4705|   
# 4706|-> 	ent->size += chunksize;
# 4707|   	ent->last_chunk_seq = chunk_seq;
# 4708|   	ent->num_chunks++;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def865]
postgresql-16.8/src/backend/replication/repl_gram.c:1105:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/backend/replication/repl_gram.c:1063:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/replication/repl_gram.c:1069:28: branch_true: ...to here
postgresql-16.8/src/backend/replication/repl_gram.c:1092:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/backend/replication/repl_gram.c:1094:7: branch_false: ...to here
postgresql-16.8/src/backend/replication/repl_gram.c:1103:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/repl_gram.c:1105:9: branch_false: ...to here
postgresql-16.8/src/backend/replication/repl_gram.c:1105:9: danger: use of uninitialized value ‘yyss’ here
# 1103|           if (! yyptr)
# 1104|             goto yyexhaustedlab;
# 1105|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1106|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1107|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def866]
postgresql-16.8/src/backend/replication/repl_scanner.c:1971:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/backend/replication/repl_scanner.l:294:1: enter_function: entry to ‘replication_scanner_is_replication_command’
postgresql-16.8/src/backend/replication/repl_scanner.l:296:22: call_function: calling ‘replication_yylex’ from ‘replication_scanner_is_replication_command’
# 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()" );
# 1973|   

Error: CPPCHECK_WARNING (CWE-476): [#def867]
postgresql-16.8/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): [#def868]
postgresql-16.8/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): [#def869]
postgresql-16.8/src/backend/replication/syncrep_gram.c:989:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/backend/replication/syncrep_gram.c:947:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/replication/syncrep_gram.c:953:28: branch_true: ...to here
postgresql-16.8/src/backend/replication/syncrep_gram.c:976:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/backend/replication/syncrep_gram.c:978:7: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_gram.c:987:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/syncrep_gram.c:989:9: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_gram.c:989:9: danger: use of uninitialized value ‘yyss’ here
#  987|           if (! yyptr)
#  988|             goto yyexhaustedlab;
#  989|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
#  990|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
#  991|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def870]
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1361:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1294:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1301:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1305:14: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1305:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1327:33: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1332:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1341:25: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1343:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1347:41: branch_true: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1363:41: call_function: inlined call to ‘syncrep_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1370:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1374:40: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1343:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1347:41: branch_true: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1352:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1354:48: branch_true: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1363:41: call_function: inlined call to ‘syncrep_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1361:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1359|   					b->yy_buf_size *= 2;
# 1360|   
# 1361|-> 				b->yy_ch_buf = (char *)
# 1362|   					/* Include room in for 2 EOB chars. */
# 1363|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def871]
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1646:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1632:21: enter_function: entry to ‘syncrep_yy_create_buffer’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1636:31: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_create_buffer’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1637:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1640:9: branch_false: ...to here
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1646:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 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()" );
# 1648|   

Error: CPPCHECK_WARNING (CWE-476): [#def872]
postgresql-16.8/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): [#def873]
postgresql-16.8/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): [#def874]
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1900:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1884:17: enter_function: entry to ‘syncrep_yy_scan_bytes’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1893:24: call_function: inlined call to ‘syncrep_yyalloc’ from ‘syncrep_yy_scan_bytes’
postgresql-16.8/src/backend/replication/syncrep_scanner.c:1894:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def875]
postgresql-16.8/src/backend/rewrite/rewriteSearchCycle.c:192: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=(makeVar(1,path_varattno,2287,-1,0,0))}),(union ListCell){.ptr_value=(arr)}' depends on order of evaluation of side effects
#  190|   
#  191|   	fexpr = makeFuncExpr(F_ARRAY_CAT, RECORDARRAYOID,
#  192|-> 						 list_make2(makeVar(1, path_varattno, RECORDARRAYOID, -1, 0, 0),
#  193|   									arr),
#  194|   						 InvalidOid, InvalidOid, COERCE_EXPLICIT_CALL);

Error: CPPCHECK_WARNING (CWE-768): [#def876]
postgresql-16.8/src/backend/rewrite/rewriteSearchCycle.c:558: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(cycle_col_rowexpr)},((union ListCell){.ptr_value=(makeVar(1,cpa_attno,2287,-1,0,0))})' depends on order of evaluation of side effects
#  556|   		saoe->opno = RECORD_EQ_OP;
#  557|   		saoe->useOr = true;
#  558|-> 		saoe->args = list_make2(cycle_col_rowexpr,
#  559|   								makeVar(1, cpa_attno, RECORDARRAYOID, -1, 0, 0));
#  560|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def877]
postgresql-16.8/src/backend/statistics/dependencies.c:797:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-16.8/src/backend/statistics/dependencies.c:1372:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-16.8/src/backend/statistics/dependencies.c:1399:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1403:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-16.8/src/backend/statistics/dependencies.c:1431:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-16.8/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-16.8/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-16.8/src/backend/statistics/dependencies.c:1440:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1447:29: branch_false: ...to here
postgresql-16.8/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): [#def878]
postgresql-16.8/src/backend/statistics/dependencies.c:1225:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-16.8/src/backend/statistics/dependencies.c:1372:1: enter_function: entry to ‘dependencies_clauselist_selectivity’
postgresql-16.8/src/backend/statistics/dependencies.c:1399:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1403:82: call_function: inlined call to ‘list_length’ from ‘dependencies_clauselist_selectivity’
postgresql-16.8/src/backend/statistics/dependencies.c:1431:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-16.8/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-16.8/src/backend/statistics/dependencies.c:1435:29: release_memory: ‘expr’ is NULL
postgresql-16.8/src/backend/statistics/dependencies.c:1440:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1447:29: branch_false: ...to here
postgresql-16.8/src/backend/statistics/dependencies.c:1447:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/statistics/dependencies.c:1451:34: branch_false: ...to here
postgresql-16.8/src/backend/statistics/dependencies.c:1451:34: call_function: calling ‘dependency_is_compatible_expression’ from ‘dependencies_clauselist_selectivity’
# 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): [#def879]
postgresql-16.8/src/backend/statistics/mcv.c:1714:26: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘clause’
postgresql-16.8/src/backend/statistics/mcv.c:2130:1: enter_function: entry to ‘mcv_clause_selectivity_or’
postgresql-16.8/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): [#def880]
postgresql-16.8/src/backend/statistics/mvdistinct.c:366:25: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/statistics/mvdistinct.c:356:1: enter_function: entry to ‘pg_ndistinct_out’
postgresql-16.8/src/backend/statistics/mvdistinct.c:359:30: call_function: calling ‘statext_ndistinct_deserialize’ from ‘pg_ndistinct_out’
postgresql-16.8/src/backend/statistics/mvdistinct.c:359:30: return_function: returning to ‘pg_ndistinct_out’ from ‘statext_ndistinct_deserialize’
postgresql-16.8/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): [#def881]
postgresql-16.8/src/backend/storage/lmgr/lmgr.c:725: error[uninitStructMember]: Uninitialized struct member: callback.previous
#  723|   
#  724|   	if (oper != XLTW_None)
#  725|-> 		error_context_stack = callback.previous;
#  726|   }
#  727|   

Error: GCC_ANALYZER_WARNING (CWE-457): [#def882]
postgresql-16.8/src/backend/storage/page/bufpage.c:524:38: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-16.8/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:736:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:736:9: branch_true: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/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-457): [#def883]
postgresql-16.8/src/backend/storage/page/bufpage.c:544:50: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.offsetindex’
postgresql-16.8/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:736:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘i <= nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:742:22: call_function: inlined call to ‘PageGetItemId’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘i <= nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:742:22: call_function: inlined call to ‘PageGetItemId’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:743:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:745:29: branch_true: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
#  542|   
#  543|   			itemidptr = &itemidbase[i];
#  544|-> 			lp = PageGetItemId(page, itemidptr->offsetindex + 1);
#  545|   
#  546|   			if (copy_head != itemidptr->itemoff + itemidptr->alignedlen)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def884]
postgresql-16.8/src/backend/storage/page/bufpage.c:622:46: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.itemoff’
postgresql-16.8/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:736:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘i <= nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:742:22: call_function: inlined call to ‘PageGetItemId’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘i <= nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:742:22: call_function: inlined call to ‘PageGetItemId’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:743:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:745:29: branch_true: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
#  620|   			{
#  621|   				itemidptr = &itemidbase[i];
#  622|-> 				if (upper != itemidptr->itemoff + itemidptr->alignedlen)
#  623|   					break;
#  624|   				upper -= itemidptr->alignedlen;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def885]
postgresql-16.8/src/backend/storage/page/bufpage.c:648:50: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*itemidptr.offsetindex’
postgresql-16.8/src/backend/storage/page/bufpage.c:699:1: enter_function: entry to ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:723:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:725:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:727:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:723:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:736:17: call_function: inlined call to ‘PageGetMaxOffsetNumber’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘i <= nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:742:22: call_function: inlined call to ‘PageGetItemId’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_true: following ‘true’ branch (when ‘i <= nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:742:22: call_function: inlined call to ‘PageGetItemId’ from ‘PageRepairFragmentation’
postgresql-16.8/src/backend/storage/page/bufpage.c:743:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:745:29: branch_true: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:740:37: branch_false: following ‘false’ branch (when ‘i > nline’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:777:30: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:778:12: branch_false: following ‘false’ branch (when ‘nstorage != 0’)...
postgresql-16.8/src/backend/storage/page/bufpage.c:786:39: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:786:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: branch_false: ...to here
postgresql-16.8/src/backend/storage/page/bufpage.c:792:17: call_function: calling ‘compactify_tuples’ from ‘PageRepairFragmentation’
#  646|   
#  647|   			itemidptr = &itemidbase[i];
#  648|-> 			lp = PageGetItemId(page, itemidptr->offsetindex + 1);
#  649|   
#  650|   			/* copy pending tuples when we detect a gap */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def886]
postgresql-16.8/src/backend/storage/smgr/md.c:497:23: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/storage/smgr/md.c:1402:1: enter_function: entry to ‘_mdfd_getseg’
postgresql-16.8/src/backend/storage/smgr/md.c:1417:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/smgr/md.c:1424:13: branch_false: ...to here
postgresql-16.8/src/backend/storage/smgr/md.c:1424:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/smgr/md.c:1434:12: branch_false: ...to here
postgresql-16.8/src/backend/storage/smgr/md.c:1444:18: branch_true: following ‘true’ branch (when ‘nextsegno <= targetseg’)...
postgresql-16.8/src/backend/storage/smgr/md.c:1446:39: branch_true: ...to here
postgresql-16.8/src/backend/storage/smgr/md.c:1446:39: call_function: calling ‘_mdnblocks’ from ‘_mdfd_getseg’
postgresql-16.8/src/backend/storage/smgr/md.c:1446:39: return_function: returning to ‘_mdfd_getseg’ from ‘_mdnblocks’
postgresql-16.8/src/backend/storage/smgr/md.c:1451:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/storage/smgr/md.c:1454:21: branch_false: ...to here
postgresql-16.8/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): [#def887]
postgresql-16.8/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): [#def888]
postgresql-16.8/src/backend/tsearch/ts_parse.c:82:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘res’
postgresql-16.8/src/backend/tsearch/ts_parse.c:540:1: enter_function: entry to ‘hlparsetext’
postgresql-16.8/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): [#def889]
postgresql-16.8/src/backend/tsearch/wparser.c:198: error[nullPointer]: Null pointer dereference
#  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): [#def890]
postgresql-16.8/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): [#def891]
postgresql-16.8/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): [#def892]
postgresql-16.8/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): [#def893]
postgresql-16.8/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): [#def894]
postgresql-16.8/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): [#def895]
postgresql-16.8/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): [#def896]
postgresql-16.8/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): [#def897]
postgresql-16.8/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): [#def898]
postgresql-16.8/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): [#def899]
postgresql-16.8/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): [#def900]
postgresql-16.8/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): [#def901]
postgresql-16.8/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): [#def902]
postgresql-16.8/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): [#def903]
postgresql-16.8/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): [#def904]
postgresql-16.8/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): [#def905]
postgresql-16.8/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): [#def906]
postgresql-16.8/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): [#def907]
postgresql-16.8/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): [#def908]
postgresql-16.8/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): [#def909]
postgresql-16.8/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): [#def910]
postgresql-16.8/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): [#def911]
postgresql-16.8/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): [#def912]
postgresql-16.8/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): [#def913]
postgresql-16.8/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): [#def914]
postgresql-16.8/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): [#def915]
postgresql-16.8/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): [#def916]
postgresql-16.8/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): [#def917]
postgresql-16.8/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): [#def918]
postgresql-16.8/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): [#def919]
postgresql-16.8/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): [#def920]
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:3808:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6101:1: enter_function: entry to ‘array_fill_internal’
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6119:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6125:13: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6125:13: call_function: calling ‘array_contains_nulls’ from ‘array_fill_internal’
# 3806|   	while (nelems >= 8)
# 3807|   	{
# 3808|-> 		if (*bitmap != 0xFF)
# 3809|   			return true;
# 3810|   		bitmap++;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def921]
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:3818:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘bitmap’
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6101:1: enter_function: entry to ‘array_fill_internal’
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6119:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6125:13: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:6125:13: call_function: calling ‘array_contains_nulls’ from ‘array_fill_internal’
# 3816|   	while (nelems > 0)
# 3817|   	{
# 3818|-> 		if ((*bitmap & bitmask) == 0)
# 3819|   			return true;
# 3820|   		bitmask <<= 1;

Error: GCC_ANALYZER_WARNING (CWE-476): [#def922]
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5004:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘destbitmap’
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5721:1: enter_function: entry to ‘makeArrayResultArr’
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5731:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5742:54: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5768:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5769:25: branch_true: ...to here
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5769:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/arrayfuncs.c:5769:25: branch_false: ...to here
postgresql-16.8/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): [#def923]
postgresql-16.8/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): [#def924]
postgresql-16.8/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): [#def925]
postgresql-16.8/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): [#def926]
postgresql-16.8/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: COMPILER_WARNING (CWE-457): [#def927]
postgresql-16.8/src/backend/utils/adt/jsonb_util.c: scope_hint: In function ‘compareJsonbContainers’
postgresql-16.8/src/backend/utils/adt/jsonb_util.c:296:34: warning[-Wmaybe-uninitialized]: ‘va.type’ may be used uninitialized
#  296 |                         res = (va.type > vb.type) ? 1 : -1;
#      |                                ~~^~~~~
postgresql-16.8/src/backend/utils/adt/jsonb_util.c:204:33: note: ‘va’ declared here
#  204 |                 JsonbValue      va,
#      |                                 ^~
#  294|   			Assert(vb.type != jbvBinary);
#  295|   			/* Type-defined order */
#  296|-> 			res = (va.type > vb.type) ? 1 : -1;
#  297|   		}
#  298|   	}

Error: COMPILER_WARNING (CWE-457): [#def928]
postgresql-16.8/src/backend/utils/adt/jsonb_util.c:296:44: warning[-Wmaybe-uninitialized]: ‘vb.type’ may be used uninitialized
#  296 |                         res = (va.type > vb.type) ? 1 : -1;
#      |                                          ~~^~~~~
postgresql-16.8/src/backend/utils/adt/jsonb_util.c:205:41: note: ‘vb’ declared here
#  205 |                                         vb;
#      |                                         ^~
#  294|   			Assert(vb.type != jbvBinary);
#  295|   			/* Type-defined order */
#  296|-> 			res = (va.type > vb.type) ? 1 : -1;
#  297|   		}
#  298|   	}

Error: CPPCHECK_WARNING (CWE-457): [#def929]
postgresql-16.8/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): [#def930]
postgresql-16.8/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): [#def931]
postgresql-16.8/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): [#def932]
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def933]
postgresql-16.8/src/backend/utils/adt/jsonpath_exec.c:2455: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(jvl->singleton)},(union ListCell){.ptr_value=(jbv)}' depends on order of evaluation of side effects
# 2453|   	if (jvl->singleton)
# 2454|   	{
# 2455|-> 		jvl->list = list_make2(jvl->singleton, jbv);
# 2456|   		jvl->singleton = NULL;
# 2457|   	}

Error: GCC_ANALYZER_WARNING (CWE-457): [#def934]
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1209:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1167:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1173:28: branch_true: ...to here
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1196:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1198:7: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1207:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1209:9: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.c:1209:9: danger: use of uninitialized value ‘yyss’ here
# 1207|           if (! yyptr)
# 1208|             goto yyexhaustedlab;
# 1209|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1210|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1211|   #  undef YYSTACK_RELOCATE

Error: CPPCHECK_WARNING (CWE-768): [#def935]
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.y:201: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].value)},(union ListCell){.ptr_value=(yyvsp[0].value)}' depends on order of evaluation of side effects
#  199|   accessor_expr:
#  200|   	path_primary					{ $$ = list_make1($1); }
#  201|-> 	| '(' expr ')' accessor_op		{ $$ = list_make2($2, $4); }
#  202|   	| '(' predicate ')' accessor_op	{ $$ = list_make2($2, $4); }
#  203|   	| accessor_expr accessor_op		{ $$ = lappend($1, $2); }

Error: CPPCHECK_WARNING (CWE-768): [#def936]
postgresql-16.8/src/backend/utils/adt/jsonpath_gram.y:202: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(yyvsp[-2].value)},(union ListCell){.ptr_value=(yyvsp[0].value)}' depends on order of evaluation of side effects
#  200|   	path_primary					{ $$ = list_make1($1); }
#  201|   	| '(' expr ')' accessor_op		{ $$ = list_make2($2, $4); }
#  202|-> 	| '(' predicate ')' accessor_op	{ $$ = list_make2($2, $4); }
#  203|   	| accessor_expr accessor_op		{ $$ = lappend($1, $2); }
#  204|   	;

Error: CPPCHECK_WARNING (CWE-476): [#def937]
postgresql-16.8/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): [#def938]
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5370:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5254:10: enter_function: entry to ‘jsonpath_yyrestart’
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5258:9: call_function: calling ‘jsonpath_yyensure_buffer_stack’ from ‘jsonpath_yyrestart’
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5258:9: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yyensure_buffer_stack’
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5260:13: call_function: calling ‘jsonpath_yy_create_buffer’ from ‘jsonpath_yyrestart’
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5260:13: return_function: returning to ‘jsonpath_yyrestart’ from ‘jsonpath_yy_create_buffer’
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5263:9: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/jsonpath_scan.c:5263:9: branch_false: ...to here
postgresql-16.8/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): [#def939]
postgresql-16.8/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): [#def940]
postgresql-16.8/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): [#def941]
postgresql-16.8/src/backend/utils/adt/lockfuncs.c:510:61: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘blocked_instance’
postgresql-16.8/src/backend/utils/adt/lockfuncs.c:483:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/adt/lockfuncs.c:485:43: branch_true: ...to here
postgresql-16.8/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): [#def942]
postgresql-16.8/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): [#def943]
postgresql-16.8/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-768): [#def944]
postgresql-16.8/src/backend/utils/adt/regproc.c:418: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(get_namespace_name_or_temp(procform->pronamespace))},(union ListCell){.ptr_value=(pstrdup((procform->proname).data))}' depends on order of evaluation of side effects
#  416|   	nargs = procform->pronargs;
#  417|   
#  418|-> 	*objnames = list_make2(get_namespace_name_or_temp(procform->pronamespace),
#  419|   						   pstrdup(NameStr(procform->proname)));
#  420|   	*objargs = NIL;

Error: CPPCHECK_WARNING (CWE-768): [#def945]
postgresql-16.8/src/backend/utils/adt/regproc.c:822: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(get_namespace_name_or_temp(oprForm->oprnamespace))},(union ListCell){.ptr_value=(pstrdup((oprForm->oprname).data))}' depends on order of evaluation of side effects
#  820|   
#  821|   	oprForm = (Form_pg_operator) GETSTRUCT(opertup);
#  822|-> 	*objnames = list_make2(get_namespace_name_or_temp(oprForm->oprnamespace),
#  823|   						   pstrdup(NameStr(oprForm->oprname)));
#  824|   	*objargs = NIL;

Error: CPPCHECK_WARNING (CWE-768): [#def946]
postgresql-16.8/src/backend/utils/adt/ruleutils.c:1066: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(oldrte)},(union ListCell){.ptr_value=(newrte)}' depends on order of evaluation of side effects
# 1064|   		/* Build two-element rtable */
# 1065|   		memset(&dpns, 0, sizeof(dpns));
# 1066|-> 		dpns.rtable = list_make2(oldrte, newrte);
# 1067|   		dpns.subplans = NIL;
# 1068|   		dpns.ctes = NIL;

Error: CPPCHECK_WARNING (CWE-562): [#def947]
postgresql-16.8/src/backend/utils/adt/ruleutils.c:11898: error[returnDanglingLifetime]: Returning pointer to local variable 'buf' that will be invalid when returning.
#11896|   	get_opclass_name(opclass, InvalidOid, &buf);
#11897|   
#11898|-> 	return &buf.data[1];		/* get_opclass_name() prepends space */
#11899|   }
#11900|   

Error: CPPCHECK_WARNING (CWE-768): [#def948]
postgresql-16.8/src/backend/utils/adt/selfuncs.c:1965: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},((union ListCell){.ptr_value=(makeConst(nominal_element_type,-1,nominal_element_collation,elmlen,elem_values[i],elem_nulls[i],elmbyval))})' depends on order of evaluation of side effects
# 1963|   			Selectivity s2;
# 1964|   
# 1965|-> 			args = list_make2(leftop,
# 1966|   							  makeConst(nominal_element_type,
# 1967|   										-1,

Error: CPPCHECK_WARNING (CWE-768): [#def949]
postgresql-16.8/src/backend/utils/adt/selfuncs.c:2039: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},(union ListCell){.ptr_value=(elem)}' depends on order of evaluation of side effects
# 2037|   			 * estimation function would really care ...
# 2038|   			 */
# 2039|-> 			args = list_make2(leftop, elem);
# 2040|   			if (is_join_clause)
# 2041|   				s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc,

Error: CPPCHECK_WARNING (CWE-768): [#def950]
postgresql-16.8/src/backend/utils/adt/selfuncs.c:2091: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(leftop)},(union ListCell){.ptr_value=(dummyexpr)}' depends on order of evaluation of side effects
# 2089|   		dummyexpr->typeMod = -1;
# 2090|   		dummyexpr->collation = clause->inputcollid;
# 2091|-> 		args = list_make2(leftop, dummyexpr);
# 2092|   		if (is_join_clause)
# 2093|   			s2 = DatumGetFloat8(FunctionCall5Coll(&oprselproc,

Error: CPPCHECK_WARNING (CWE-768): [#def951]
postgresql-16.8/src/backend/utils/adt/selfuncs.c:2184: error[unknownEvaluationOrder]: Expression 'T_List,((union ListCell){.ptr_value=((list_nth_cell(clause->largs,0)->ptr_value))}),((union ListCell){.ptr_value=((list_nth_cell(clause->rargs,0)->ptr_value))})' depends on order of evaluation of side effects
# 2182|   
# 2183|   	/* Build equivalent arg list for single operator */
# 2184|-> 	opargs = list_make2(linitial(clause->largs), linitial(clause->rargs));
# 2185|   
# 2186|   	/*

Error: CPPCHECK_WARNING (CWE-190): [#def952]
postgresql-16.8/src/backend/utils/adt/tsgistidx.c:193: error[integerOverflow]: Signed integer underflow for expression '*(int32*)&c'.
#  191|   			FIN_LEGACY_CRC32(c);
#  192|   
#  193|-> 			*arr = *(int32 *) &c;
#  194|   			arr++;
#  195|   			ptr++;

Error: CPPCHECK_WARNING (CWE-476): [#def953]
postgresql-16.8/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: GCC_ANALYZER_WARNING (CWE-457): [#def954]
postgresql-16.8/src/backend/utils/adt/varlena.c:1401:33: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*state.skiptablemask’
postgresql-16.8/src/backend/utils/adt/varlena.c:4365:1: enter_function: entry to ‘split_part’
postgresql-16.8/src/backend/utils/adt/varlena.c:4379:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/varlena.c:4384:27: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/varlena.c:4384:9: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/adt/varlena.c:4384:27: branch_true: ...to here
postgresql-16.8/src/backend/utils/adt/varlena.c:4385:9: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/adt/varlena.c:4385:9: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/varlena.c:4388:12: branch_false: following ‘false’ branch (when ‘inputstring_len > 0’)...
postgresql-16.8/src/backend/utils/adt/varlena.c:4392:12: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/varlena.c:4392:12: branch_false: following ‘false’ branch (when ‘fldsep_len > 0’)...
postgresql-16.8/src/backend/utils/adt/varlena.c:4402:9: branch_false: ...to here
postgresql-16.8/src/backend/utils/adt/varlena.c:4402:9: call_function: calling ‘text_position_setup’ from ‘split_part’
postgresql-16.8/src/backend/utils/adt/varlena.c:4402:9: return_function: returning to ‘split_part’ from ‘text_position_setup’
postgresql-16.8/src/backend/utils/adt/varlena.c:4404:17: call_function: calling ‘text_position_next’ from ‘split_part’
# 1399|   	int			haystack_len = state->len1;
# 1400|   	int			needle_len = state->len2;
# 1401|-> 	int			skiptablemask = state->skiptablemask;
# 1402|   	const char *haystack = state->str1;
# 1403|   	const char *needle = state->str2;

Error: CPPCHECK_WARNING (CWE-768): [#def955]
postgresql-16.8/src/backend/utils/adt/xml.c:610: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(DatumGetXmlP(fcinfo->args[0].value))},(union ListCell){.ptr_value=(DatumGetXmlP(fcinfo->args[1].value))}' depends on order of evaluation of side effects
#  608|   		PG_RETURN_XML_P(PG_GETARG_XML_P(0));
#  609|   	else
#  610|-> 		PG_RETURN_XML_P(xmlconcat(list_make2(PG_GETARG_XML_P(0),
#  611|   											 PG_GETARG_XML_P(1))));
#  612|   }

Error: CPPCHECK_WARNING (CWE-476): [#def956]
postgresql-16.8/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): [#def957]
postgresql-16.8/src/backend/utils/cache/plancache.c:1940:32: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
# 1938|   			query = QueryListGetPrimaryStmt(stmt_list);
# 1939|   			Assert(query->returningList);
# 1940|-> 			return ExecCleanTypeFromTL(query->returningList);
# 1941|   
# 1942|   		case PORTAL_UTIL_SELECT:

Error: GCC_ANALYZER_WARNING (CWE-476): [#def958]
postgresql-16.8/src/backend/utils/cache/relcache.c:2383:48: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/utils/cache/relcache.c:5452:1: enter_function: entry to ‘RelationGetIdentityKeyBitmap’
postgresql-16.8/src/backend/utils/cache/relcache.c:5461:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/cache/relcache.c:5465:14: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/relcache.c:5465:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/cache/relcache.c:5471:23: branch_true: ...to here
postgresql-16.8/src/backend/utils/cache/relcache.c:5474:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/cache/relcache.c:5478:21: branch_false: ...to here
postgresql-16.8/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): [#def959]
postgresql-16.8/src/backend/utils/cache/ts_cache.c:503:41: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘&mapdicts’
postgresql-16.8/src/backend/utils/cache/ts_cache.c:424:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:427:43: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:432:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:435:20: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:497:36: branch_false: following ‘false’ branch (when ‘ndicts <= 0’)...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:507:47: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:485:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:487:80: branch_true: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:490:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:492:28: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:492:28: branch_false: following ‘false’ branch (when ‘maxtokentype <= toktype’)...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:494:28: branch_false: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:494:28: branch_true: following ‘true’ branch (when ‘maxtokentype < toktype’)...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:497:36: branch_true: ...to here
postgresql-16.8/src/backend/utils/cache/ts_cache.c:497:36: branch_true: following ‘true’ branch (when ‘ndicts > 0’)...
postgresql-16.8/src/backend/utils/cache/ts_cache.c:499:41: branch_true: ...to here
postgresql-16.8/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): [#def960]
postgresql-16.8/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): [#def961]
postgresql-16.8/src/backend/utils/init/postinit.c:1300:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/utils/init/postinit.c:1249:1: enter_function: entry to ‘process_startup_options’
postgresql-16.8/src/backend/utils/init/postinit.c:1291:19: call_function: inlined call to ‘list_head’ from ‘process_startup_options’
postgresql-16.8/src/backend/utils/init/postinit.c:1292:16: branch_true: following ‘true’ branch (when ‘gucopts’ is non-NULL)...
postgresql-16.8/src/backend/utils/init/postinit.c:1297:17: branch_true: ...to here
postgresql-16.8/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): [#def962]
postgresql-16.8/src/backend/utils/misc/guc-file.c:1631:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-16.8/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-16.8/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
# 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()" );
# 1633|   

Error: CPPCHECK_WARNING (CWE-476): [#def963]
postgresql-16.8/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): [#def964]
postgresql-16.8/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): [#def965]
postgresql-16.8/src/backend/utils/misc/guc-file.l:385:9: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-16.8/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-16.8/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
#  383|   
#  384|   	lex_buffer = yy_create_buffer(fp, YY_BUF_SIZE);
#  385|-> 	yy_switch_to_buffer(lex_buffer);
#  386|   
#  387|   	/* This loop iterates once per logical line */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def966]
postgresql-16.8/src/backend/utils/misc/guc-file.l:385:9: warning[-Wanalyzer-malloc-leak]: leak of ‘GUC_yy_create_buffer(fp, 16384)’
postgresql-16.8/src/backend/utils/misc/guc-file.l:573:1: enter_function: entry to ‘ParseConfigDirectory’
postgresql-16.8/src/backend/utils/misc/guc-file.l:586:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/backend/utils/misc/guc-file.l:593:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/misc/guc-file.l:595:47: branch_true: ...to here
postgresql-16.8/src/backend/utils/misc/guc-file.l:595:22: call_function: calling ‘ParseConfigFile’ from ‘ParseConfigDirectory’
#  383|   
#  384|   	lex_buffer = yy_create_buffer(fp, YY_BUF_SIZE);
#  385|-> 	yy_switch_to_buffer(lex_buffer);
#  386|   
#  387|   	/* This loop iterates once per logical line */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def967]
postgresql-16.8/src/backend/utils/misc/guc.c:6522:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘eqsgn’
postgresql-16.8/src/backend/utils/misc/guc.c:6487:1: enter_function: entry to ‘GUCArrayReset’
postgresql-16.8/src/backend/utils/misc/guc.c:6494:12: branch_false: following ‘false’ branch (when ‘array’ is non-NULL)...
postgresql-16.8/src/backend/utils/misc/guc.c:6498:13: branch_false: ...to here
postgresql-16.8/src/backend/utils/misc/guc.c:6498:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/misc/guc.c:6502:9: branch_false: ...to here
postgresql-16.8/src/backend/utils/misc/guc.c:6504:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/misc/guc.c:6511:21: branch_true: ...to here
postgresql-16.8/src/backend/utils/misc/guc.c:6517:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/misc/guc.c:6519:23: call_function: inlined call to ‘DatumGetPointer’ from ‘GUCArrayReset’
postgresql-16.8/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): [#def968]
postgresql-16.8/src/backend/utils/mmgr/aset.c:935:46: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-16.8/src/backend/utils/mmgr/aset.c:699:1: enter_function: entry to ‘AllocSetAlloc’
postgresql-16.8/src/backend/utils/mmgr/aset.c:714:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/mmgr/aset.c:790:16: call_function: inlined call to ‘AllocSetFreeIndex’ from ‘AllocSetAlloc’
postgresql-16.8/src/backend/utils/mmgr/aset.c:792:12: branch_false: following ‘false’ branch (when ‘chunk’ is NULL)...
postgresql-16.8/src/backend/utils/mmgr/aset.c:830:9: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:933:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-16.8/src/backend/utils/mmgr/aset.c:935:46: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:935:46: acquire_memory: allocated here
postgresql-16.8/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:933:28: branch_false: following ‘false’ branch (when ‘required_size <= blksize’)...
postgresql-16.8/src/backend/utils/mmgr/aset.c:935:46: branch_false: ...to here
postgresql-16.8/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): [#def969]
postgresql-16.8/src/backend/utils/mmgr/aset.c:938:20: warning[-Wanalyzer-malloc-leak]: leak of ‘block’
postgresql-16.8/src/backend/utils/mmgr/aset.c:699:1: enter_function: entry to ‘AllocSetAlloc’
postgresql-16.8/src/backend/utils/mmgr/aset.c:714:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/mmgr/aset.c:790:16: call_function: inlined call to ‘AllocSetFreeIndex’ from ‘AllocSetAlloc’
postgresql-16.8/src/backend/utils/mmgr/aset.c:792:12: branch_false: following ‘false’ branch (when ‘chunk’ is NULL)...
postgresql-16.8/src/backend/utils/mmgr/aset.c:830:9: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:924:38: acquire_memory: allocated here
postgresql-16.8/src/backend/utils/mmgr/aset.c:930:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/mmgr/aset.c:932:25: branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:933:28: branch_true: following ‘true’ branch (when ‘required_size > blksize’)...
postgresql-16.8/src/backend/utils/mmgr/aset.c:938:20: branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:938:20: branch_true: following ‘true’ branch (when ‘block’ is NULL)...
 branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/aset.c:938:20: danger: ‘block’ leaks here; was allocated at [(7)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/6)
#  936|   		}
#  937|   
#  938|-> 		if (block == NULL)
#  939|   			return NULL;
#  940|   

Error: CPPCHECK_WARNING (CWE-401): [#def970]
postgresql-16.8/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): [#def971]
postgresql-16.8/src/backend/utils/mmgr/dsa.c:852:22: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1821:1: enter_function: entry to ‘destroy_superblock’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1823:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1823:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1872:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1873:17: branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1873:17: call_function: calling ‘rebin_segment’ from ‘destroy_superblock’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1873:17: return_function: returning to ‘destroy_superblock’ from ‘rebin_segment’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1885:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1886:17: branch_true: ...to here
postgresql-16.8/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): [#def972]
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1824:46: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1821:1: enter_function: entry to ‘destroy_superblock’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1823:31: call_function: calling ‘dsa_get_address’ from ‘destroy_superblock’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1823:31: return_function: returning to ‘destroy_superblock’ from ‘dsa_get_address’
postgresql-16.8/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): [#def973]
postgresql-16.8/src/backend/utils/mmgr/dsa.c:2013:33: warning[-Wanalyzer-shift-count-overflow]: shift by count (‘4294967295’) >= precision of type (‘64’)
postgresql-16.8/src/backend/utils/mmgr/dsa.c:1994:1: enter_function: entry to ‘get_best_segment’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:2005:20: call_function: inlined call to ‘contiguous_pages_to_segment_bin’ from ‘get_best_segment’
postgresql-16.8/src/backend/utils/mmgr/dsa.c:2006:18: branch_true: following ‘true’ branch (when ‘bin != 16’)...
postgresql-16.8/src/backend/utils/mmgr/dsa.c:2013:59: branch_true: ...to here
postgresql-16.8/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): [#def974]
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1441:25: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘result.index’
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1476:1: enter_function: entry to ‘FreePageManagerPutInternal’
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1489:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1491:21: branch_true: ...to here
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1491:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1499:26: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1499:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1509:26: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1509:25: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1525:30: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1525:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: ...to here
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1527:33: branch_false: following ‘false’ branch (when ‘soft == 0’)...
postgresql-16.8/src/backend/utils/mmgr/freepage.c:1529:34: branch_false: ...to here
postgresql-16.8/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): [#def975]
postgresql-16.8/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): [#def976]
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:546:29: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘read_page’
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:584:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:586:25: branch_false: ...to here
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:505:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:509:22: branch_false: ...to here
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:516:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/backend/utils/sort/sharedtuplestore.c:524:17: branch_false: ...to here
postgresql-16.8/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): [#def977]
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:363:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(filename, "wb")’
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:358:16: acquire_resource: opened here
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:359:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:363:13: branch_false: ...to here
postgresql-16.8/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): [#def978]
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:363:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(filename, "wb")’
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:358:16: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:359:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_basebackup/bbstreamer_file.c:363:13: branch_false: ...to here
postgresql-16.8/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): [#def979]
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:727:9: warning[-Wanalyzer-malloc-leak]: leak of ‘fp’
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:717:12: branch_true: following ‘true’ branch (when ‘fd >= 0’)...
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:718:22: branch_true: ...to here
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:718:22: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:721:12: branch_false: following ‘false’ branch (when ‘fp’ is non-NULL)...
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:727:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/compress_lz4.c:727:9: danger: ‘fp’ leaks here; was allocated at [(3)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/2)
#  725|   	}
#  726|   
#  727|-> 	state->fp = fp;
#  728|   
#  729|   	return true;

Error: CPPCHECK_WARNING (CWE-476): [#def980]
postgresql-16.8/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: GCC_ANALYZER_WARNING (CWE-476): [#def981]
postgresql-16.8/src/bin/pg_dump/parallel.c:504:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘slot’
postgresql-16.8/src/bin/pg_dump/parallel.c:1059:1: enter_function: entry to ‘ParallelBackupEnd’
postgresql-16.8/src/bin/pg_dump/parallel.c:1064:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/parallel.c:1071:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_dump/parallel.c:1073:29: branch_true: ...to here
postgresql-16.8/src/bin/pg_dump/parallel.c:1071:21: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/parallel.c:1078:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/parallel.c:1078:9: call_function: calling ‘WaitForTerminatingWorkers’ from ‘ParallelBackupEnd’
#  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): [#def982]
postgresql-16.8/src/bin/pg_dump/pg_backup_archiver.c:2164: warning[nullPointer]: Possible null pointer dereference: fh
# 2162|   	}
# 2163|   
# 2164|-> 	if ((cnt = fread(sig, 1, 5, fh)) != 5)
# 2165|   	{
# 2166|   		if (ferror(fh))

Error: CPPCHECK_WARNING (CWE-457): [#def983]
postgresql-16.8/src/bin/pg_dump/pg_dump.c:1378: error[legacyUninitvar]: Uninitialized variable: archiveFormat
# 1376|   	else
# 1377|   		pg_fatal("invalid output format \"%s\" specified", format);
# 1378|-> 	return archiveFormat;
# 1379|   }
# 1380|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def984]
postgresql-16.8/src/bin/pg_dump/pg_dump.c:12040:18: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘probin’
postgresql-16.8/src/bin/pg_dump/pg_dump.c:11921:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:11924:17: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:11929:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:11999:43: branch_true: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:12004:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:12014:30: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:12036:12: branch_false: following ‘false’ branch (when ‘prosqlbody’ is NULL)...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:12040:18: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:12040:18: danger: dereference of NULL ‘probin’
#12038|   		appendPQExpBufferStr(asPart, prosqlbody);
#12039|   	}
#12040|-> 	else if (probin[0] != '\0')
#12041|   	{
#12042|   		appendPQExpBufferStr(asPart, "AS ");

Error: GCC_ANALYZER_WARNING (CWE-476): [#def985]
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13512:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collcollate’
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13436:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13439:17: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13496:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13501:14: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13501:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13510:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13510:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13512:21: branch_true: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13512:21: danger: dereference of NULL ‘collcollate’
#13510|   	if (fout->remoteVersion < 150000)
#13511|   	{
#13512|-> 		if (collcollate[0] == '\0')
#13513|   			collcollate = NULL;
#13514|   		if (collctype[0] == '\0')

Error: GCC_ANALYZER_WARNING (CWE-476): [#def986]
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13514:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘collctype’
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13436:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13439:17: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13496:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13497:31: branch_true: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13501:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13510:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13510:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13512:21: branch_true: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13512:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13514:21: branch_false: ...to here
postgresql-16.8/src/bin/pg_dump/pg_dump.c:13514:21: danger: dereference of NULL ‘collctype’
#13512|   		if (collcollate[0] == '\0')
#13513|   			collcollate = NULL;
#13514|-> 		if (collctype[0] == '\0')
#13515|   			collctype = NULL;
#13516|   	}

Error: GCC_ANALYZER_WARNING (CWE-775): [#def987]
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:524:20: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_resource: opened here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:524:22: branch_true: ...to here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:524:20: 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): [#def988]
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:524:20: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:524:22: branch_true: ...to here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:524:20: 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): [#def989]
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:533:12: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen("PG_VERSION", "r")’
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_resource: opened here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:531:16: branch_false: ...to here
postgresql-16.8/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): [#def990]
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:533:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen("PG_VERSION", "r")’
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:23: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:517:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:14: branch_false: ...to here
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:522:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_resetwal/pg_resetwal.c:531:16: branch_false: ...to here
postgresql-16.8/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): [#def991]
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: danger: infinite loop here
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:312:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:314:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-16.8/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): [#def992]
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:284:1: enter_function: entry to ‘test_sync’
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: danger: infinite loop here
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:415:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:417:42: branch_false: when ‘writes >= writes_per_op’: always following ‘false’ branch...
postgresql-16.8/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): [#def993]
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: warning[-Wanalyzer-infinite-loop]: infinite loop
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: danger: infinite loop here
postgresql-16.8/src/bin/pg_test_fsync/pg_test_fsync.c:480:31: branch_true: if it ever follows ‘true’ branch, it will always do so...
 branch_true: ...to here
postgresql-16.8/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-16.8/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): [#def994]
postgresql-16.8/src/bin/pg_upgrade/controldata.c:139:36: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:133:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:135:34: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:135:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:137:37: branch_true: ...to here
postgresql-16.8/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): [#def995]
postgresql-16.8/src/bin/pg_upgrade/controldata.c:139:37: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:133:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:135:34: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:135:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:137:37: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:139:36: branch_false: following ‘false’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:139:50: branch_false: ...to here
postgresql-16.8/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): [#def996]
postgresql-16.8/src/bin/pg_upgrade/controldata.c:153:40: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:128:31: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:128:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:133:24: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:135:34: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:135:28: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:137:37: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:139:36: branch_false: following ‘false’ branch...
postgresql-16.8/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): [#def997]
postgresql-16.8/src/bin/pg_upgrade/controldata.c:203:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/src/bin/pg_upgrade/controldata.c:84:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:86:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:88:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:90:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:92:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:94:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:96:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:100:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:103:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:121:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:121:13: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:121:13: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:188:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:192:9: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:192:9: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:198:23: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:198:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:203:13: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:203:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:210:16: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:213:17: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/controldata.c:216:20: branch_true: following ‘true’ branch (when ‘p’ is non-NULL)...
postgresql-16.8/src/bin/pg_upgrade/controldata.c:218:29: branch_true: ...to here
postgresql-16.8/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): [#def998]
postgresql-16.8/src/bin/pg_upgrade/exec.c:45:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/src/bin/pg_upgrade/exec.c:385:1: enter_function: entry to ‘check_bin_dir’
postgresql-16.8/src/bin/pg_upgrade/exec.c:397:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-16.8/src/bin/pg_upgrade/exec.c:397:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-16.8/src/bin/pg_upgrade/exec.c:398:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-16.8/src/bin/pg_upgrade/exec.c:398:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-16.8/src/bin/pg_upgrade/exec.c:399:9: call_function: calling ‘check_exec’ from ‘check_bin_dir’
postgresql-16.8/src/bin/pg_upgrade/exec.c:399:9: return_function: returning to ‘check_bin_dir’ from ‘check_exec’
postgresql-16.8/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-401): [#def999]
postgresql-16.8/src/bin/pg_upgrade/option.c:428:13: warning[-Wanalyzer-malloc-leak]: leak of ‘popen(&cmd, "r")’
postgresql-16.8/src/bin/pg_upgrade/option.c:400:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/option.c:402:9: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/option.c:406:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/option.c:414:12: branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/option.c:428:23: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_upgrade/option.c:428:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pg_upgrade/option.c:429:17: branch_false: ...to here
postgresql-16.8/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): [#def1000]
postgresql-16.8/src/bin/pg_upgrade/option.c:483:28: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename, "r")’
postgresql-16.8/src/bin/pg_upgrade/option.c:459:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/src/bin/pg_upgrade/option.c:467:32: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/option.c:475:27: acquire_resource: opened here
postgresql-16.8/src/bin/pg_upgrade/option.c:475:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/option.c:480:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-16.8/src/bin/pg_upgrade/option.c:483:29: branch_true: ...to here
postgresql-16.8/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): [#def1001]
postgresql-16.8/src/bin/pg_upgrade/option.c:483:28: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename, "r")’
postgresql-16.8/src/bin/pg_upgrade/option.c:459:12: branch_true: following ‘true’ branch (when ‘live_check != 0’)...
postgresql-16.8/src/bin/pg_upgrade/option.c:467:32: branch_true: ...to here
postgresql-16.8/src/bin/pg_upgrade/option.c:475:27: acquire_memory: allocated here
postgresql-16.8/src/bin/pg_upgrade/option.c:475:20: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/bin/pg_upgrade/option.c:480:26: branch_true: following ‘true’ branch (when ‘lineno != 6’)...
postgresql-16.8/src/bin/pg_upgrade/option.c:483:29: branch_true: ...to here
postgresql-16.8/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: GCC_ANALYZER_WARNING (CWE-401): [#def1002]
postgresql-16.8/src/bin/pgbench/exprparse.c:1125:11: warning[-Wanalyzer-malloc-leak]: leak of ‘yyptr’
postgresql-16.8/src/bin/pgbench/exprparse.c:1087:6: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1150:6: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1150:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1153:3: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1165:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1171:6: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1171:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1174:16: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1183:11: branch_false: following ‘false’ branch (when ‘yychar != 256’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1195:17: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1202:6: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1205:6: branch_false: following ‘false’ branch (when ‘yyn > 0’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1215:6: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1215:6: branch_false: following ‘false’ branch (when ‘yyerrstatus == 0’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1222:3: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1087:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1093:28: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1116:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1118:7: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1125:11: acquire_memory: allocated here
postgresql-16.8/src/bin/pgbench/exprparse.c:1127:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1129:9: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1132:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1137:7: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1145:10: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1150:6: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1150:6: branch_false: following ‘false’ branch (when ‘yystate != 25’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1153:3: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1165:6: branch_false: following ‘false’ branch (when ‘yyn != -33’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1171:6: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1171:6: branch_true: following ‘true’ branch (when ‘yychar == -2’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1174:16: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1177:6: branch_false: following ‘false’ branch (when ‘yychar > 0’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1183:11: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1183:11: branch_true: following ‘true’ branch (when ‘yychar == 256’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1191:7: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1656:10: branch_true: following ‘true’ branch (when ‘yyn != -33’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1658:11: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1659:14: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1662:18: branch_true: following ‘true’ branch (when ‘yyn > 0’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1680:3: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1087:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1093:28: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1116:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1118:7: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1125:11: danger: ‘yyptr’ leaks here; was allocated at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20)
# 1123|           yy_state_t *yyss1 = yyss;
# 1124|           union yyalloc *yyptr =
# 1125|->           YY_CAST (union yyalloc *,
# 1126|                      YYSTACK_ALLOC (YY_CAST (YYSIZE_T, YYSTACK_BYTES (yystacksize))));
# 1127|           if (! yyptr)

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1003]
postgresql-16.8/src/bin/pgbench/exprparse.c:1129:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/bin/pgbench/exprparse.c:1087:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/exprparse.c:1093:28: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1116:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1118:7: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1127:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-16.8/src/bin/pgbench/exprparse.c:1129:9: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/exprparse.c:1129:9: danger: use of uninitialized value ‘yyss’ here
# 1127|           if (! yyptr)
# 1128|             goto yyexhaustedlab;
# 1129|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1130|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1131|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1004]
postgresql-16.8/src/bin/pgbench/exprscan.c:2001:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/src/bin/pgbench/exprscan.l:343:14: call_function: calling ‘expr_yylex’ from ‘expr_lex_one_word’
# 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()" );
# 2003|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1005]
postgresql-16.8/src/bin/pgbench/exprscan.c:2043:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/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): [#def1006]
postgresql-16.8/src/bin/pgbench/exprscan.c:2165:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-16.8/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/src/bin/pgbench/exprscan.l:334:19: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/exprscan.l:335:56: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprscan.l:335:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 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;
# 2166|   		yyg->yy_buffer_stack_top = 0;
# 2167|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1007]
postgresql-16.8/src/bin/pgbench/exprscan.c:2185:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/src/bin/pgbench/exprscan.l:321:1: enter_function: entry to ‘expr_lex_one_word’
postgresql-16.8/src/bin/pgbench/exprscan.l:334:19: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/exprscan.l:335:56: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/exprscan.l:335:10: call_function: calling ‘expr_yy_switch_to_buffer’ from ‘expr_lex_one_word’
# 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|   	}
# 2187|   }

Error: CPPCHECK_WARNING (CWE-457): [#def1008]
postgresql-16.8/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: GCC_ANALYZER_WARNING (CWE-457): [#def1009]
postgresql-16.8/src/bin/pgbench/pgbench.c:2042:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*pval.type’
postgresql-16.8/src/bin/pgbench/pgbench.c:7358:1: enter_function: entry to ‘threadRun’
postgresql-16.8/src/bin/pgbench/pgbench.c:7435:16: branch_true: following ‘true’ branch (when ‘remains > 0’)...
postgresql-16.8/src/bin/pgbench/pgbench.c:7439:32: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7448:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/src/bin/pgbench/pgbench.c:7450:48: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7552:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/src/bin/pgbench/pgbench.c:7554:48: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7556:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/pgbench.c:7560:73: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7562:36: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pgbench/pgbench.c:7568:38: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7568:38: call_function: inlined call to ‘socket_has_input’ from ‘threadRun’
postgresql-16.8/src/bin/pgbench/pgbench.c:7568:36: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/pgbench.c:7578:25: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7578:25: call_function: calling ‘advanceConnectionState’ from ‘threadRun’
# 2040|   coerceToInt(PgBenchValue *pval, int64 *ival)
# 2041|   {
# 2042|-> 	if (pval->type == PGBT_INT)
# 2043|   	{
# 2044|   		*ival = pval->u.ival;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1010]
postgresql-16.8/src/bin/pgbench/pgbench.c:2070:13: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*pval.type’
postgresql-16.8/src/bin/pgbench/pgbench.c:7358:1: enter_function: entry to ‘threadRun’
postgresql-16.8/src/bin/pgbench/pgbench.c:7435:16: branch_true: following ‘true’ branch (when ‘remains > 0’)...
postgresql-16.8/src/bin/pgbench/pgbench.c:7439:32: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7448:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/src/bin/pgbench/pgbench.c:7450:48: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7552:33: branch_true: following ‘true’ branch (when ‘i < nstate’)...
postgresql-16.8/src/bin/pgbench/pgbench.c:7554:48: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7556:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/pgbench.c:7560:73: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7562:36: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/pgbench/pgbench.c:7568:38: branch_false: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7568:38: call_function: inlined call to ‘socket_has_input’ from ‘threadRun’
postgresql-16.8/src/bin/pgbench/pgbench.c:7568:36: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/pgbench/pgbench.c:7578:25: branch_true: ...to here
postgresql-16.8/src/bin/pgbench/pgbench.c:7578:25: call_function: calling ‘advanceConnectionState’ from ‘threadRun’
# 2068|   coerceToDouble(PgBenchValue *pval, double *dval)
# 2069|   {
# 2070|-> 	if (pval->type == PGBT_DOUBLE)
# 2071|   	{
# 2072|   		*dval = pval->u.dval;

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1011]
postgresql-16.8/src/bin/psql/common.c:1851:25: warning[-Wanalyzer-file-leak]: leak of FILE ‘fout’
postgresql-16.8/src/bin/psql/common.c:1696:1: enter_function: entry to ‘ExecQueryUsingCursor’
postgresql-16.8/src/bin/psql/common.c:1751:12: branch_true: following ‘true’ branch (when ‘OK != 0’)...
postgresql-16.8/src/bin/psql/common.c:1754:12: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1775:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/common.c:1777:22: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1777:22: call_function: calling ‘openQueryOutputFile’ from ‘ExecQueryUsingCursor’
postgresql-16.8/src/bin/psql/common.c:1777:22: return_function: returning to ‘ExecQueryUsingCursor’ from ‘openQueryOutputFile’
postgresql-16.8/src/bin/psql/common.c:1777:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/common.c:1782:21: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1782:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1792:9: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1809:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1825:21: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1825:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1837:27: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1840:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1845:26: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1845:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/common.c:1845:26: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1845:26: branch_false: following ‘false’ branch (when ‘is_pager == 0’)...
postgresql-16.8/src/bin/psql/common.c:1851:32: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1851:25: danger: ‘fout’ leaks here; was opened at [(12)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/11)
# 1849|   			 * only one pager instance is used for the whole mess
# 1850|   			 */
# 1851|-> 			fout = PageOutput(INT_MAX, &(my_popt.topt));
# 1852|   			is_pager = true;
# 1853|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1012]
postgresql-16.8/src/bin/psql/common.c:1851:25: warning[-Wanalyzer-malloc-leak]: leak of ‘fout’
postgresql-16.8/src/bin/psql/common.c:1696:1: enter_function: entry to ‘ExecQueryUsingCursor’
postgresql-16.8/src/bin/psql/common.c:1751:12: branch_true: following ‘true’ branch (when ‘OK != 0’)...
postgresql-16.8/src/bin/psql/common.c:1754:12: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1775:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/common.c:1777:22: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1777:22: call_function: calling ‘openQueryOutputFile’ from ‘ExecQueryUsingCursor’
postgresql-16.8/src/bin/psql/common.c:1777:22: return_function: returning to ‘ExecQueryUsingCursor’ from ‘openQueryOutputFile’
postgresql-16.8/src/bin/psql/common.c:1777:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/common.c:1782:21: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1782:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1792:9: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1809:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1825:21: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1825:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1837:27: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1840:20: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/common.c:1845:26: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1845:25: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/common.c:1845:26: branch_true: ...to here
postgresql-16.8/src/bin/psql/common.c:1845:26: branch_false: following ‘false’ branch (when ‘is_pager == 0’)...
postgresql-16.8/src/bin/psql/common.c:1851:32: branch_false: ...to here
postgresql-16.8/src/bin/psql/common.c:1851:25: danger: ‘fout’ leaks here; was allocated at [(12)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/11)
# 1849|   			 * only one pager instance is used for the whole mess
# 1850|   			 */
# 1851|-> 			fout = PageOutput(INT_MAX, &(my_popt.topt));
# 1852|   			is_pager = true;
# 1853|   		}

Error: GCC_ANALYZER_WARNING (CWE-762): [#def1013]
postgresql-16.8/src/bin/psql/copy.c:351:25: warning[-Wanalyzer-mismatching-deallocation]: ‘copystream’ should have been deallocated with ‘pclose’ but was deallocated with ‘fclose’
postgresql-16.8/src/bin/psql/copy.c:268:1: enter_function: entry to ‘do_copy’
postgresql-16.8/src/bin/psql/copy.c:276:19: call_function: calling ‘parse_slash_copy’ from ‘do_copy’
postgresql-16.8/src/bin/psql/copy.c:276:19: return_function: returning to ‘do_copy’ from ‘parse_slash_copy’
postgresql-16.8/src/bin/psql/copy.c:278:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/copy.c:282:13: branch_false: ...to here
postgresql-16.8/src/bin/psql/copy.c:285:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/copy.c:287:21: branch_true: ...to here
postgresql-16.8/src/bin/psql/copy.c:287:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/copy.c:289:29: branch_true: ...to here
postgresql-16.8/src/bin/psql/copy.c:289:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/copy.c:291:33: branch_true: ...to here
postgresql-16.8/src/bin/psql/copy.c:293:46: acquire_memory: allocated here (expects deallocation with ‘pclose’)
postgresql-16.8/src/bin/psql/copy.c:323:12: branch_false: following ‘false’ branch (when ‘copystream’ is non-NULL)...
postgresql-16.8/src/bin/psql/copy.c:335:14: branch_false: ...to here
postgresql-16.8/src/bin/psql/copy.c:335:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/bin/psql/copy.c:341:31: branch_false: ...to here
postgresql-16.8/src/bin/psql/copy.c:349:21: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/copy.c:351:25: branch_true: ...to here
postgresql-16.8/src/bin/psql/copy.c:351:25: danger: deallocated with ‘fclose’ here; allocation at [(21)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/20) expects deallocation with ‘pclose’
#  349|   		if (result < 0 || S_ISDIR(st.st_mode))
#  350|   		{
#  351|-> 			fclose(copystream);
#  352|   			free_copy_options(options);
#  353|   			return false;

Error: CPPCHECK_WARNING (CWE-457): [#def1014]
postgresql-16.8/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-476): [#def1015]
postgresql-16.8/src/bin/psql/crosstabview.c:368:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/bin/psql/crosstabview.c:349:22: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/crosstabview.c:358:22: branch_true: ...to here
postgresql-16.8/src/bin/psql/crosstabview.c:358:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/crosstabview.c:359:36: branch_true: ...to here
postgresql-16.8/src/bin/psql/crosstabview.c:368:17: danger: dereference of NULL ‘<unknown>’
#  366|   									 pivotFieldCompare);
#  367|   		Assert(rp != NULL);
#  368|-> 		row_number = rp->rank;
#  369|   
#  370|   		/* Find target column */

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1016]
postgresql-16.8/src/bin/psql/crosstabview.c:382:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/bin/psql/crosstabview.c:285:1: enter_function: entry to ‘printCrosstab’
postgresql-16.8/src/bin/psql/crosstabview.c:349:22: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/crosstabview.c:358:22: branch_true: ...to here
postgresql-16.8/src/bin/psql/crosstabview.c:362:38: call_function: inlined call to ‘bsearch’ from ‘printCrosstab’
postgresql-16.8/src/bin/psql/crosstabview.c:371:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/crosstabview.c:372:36: branch_true: ...to here
postgresql-16.8/src/bin/psql/crosstabview.c:382:17: danger: dereference of NULL ‘<unknown>’
#  380|   									 pivotFieldCompare);
#  381|   		Assert(cp != NULL);
#  382|-> 		col_number = cp->rank;
#  383|   
#  384|   		/* Place value into cell */

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1017]
postgresql-16.8/src/bin/psql/psqlscanslash.c:1486:25: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/src/bin/psql/psqlscanslash.l:670:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:682:3: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:682:3: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/src/bin/psql/psqlscanslash.l:688:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 1484|   		if ( ! YY_CURRENT_BUFFER ) {
# 1485|   			yyensure_buffer_stack (yyscanner);
# 1486|-> 			YY_CURRENT_BUFFER_LVALUE =
# 1487|   				yy_create_buffer( yyin, YY_BUF_SIZE , yyscanner);
# 1488|   		}

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1018]
postgresql-16.8/src/bin/psql/psqlscanslash.c:2486:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/bin/psql/psqlscanslash.l:670:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:680:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:680:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/src/bin/psql/psqlscanslash.l:688:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 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()" );
# 2488|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1019]
postgresql-16.8/src/bin/psql/psqlscanslash.c:2528:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/src/bin/psql/psqlscanslash.l:670:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:680:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:680:10: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/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): [#def1020]
postgresql-16.8/src/bin/psql/psqlscanslash.c:2569:19: warning[-Wanalyzer-malloc-leak]: leak of ‘slash_yy_create_buffer(*(struct yyguts_t *)yyscanner.yyin_r, 16384,  yyscanner)’
postgresql-16.8/src/bin/psql/psqlscanslash.l:670:1: enter_function: entry to ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:682:3: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_command_end’
postgresql-16.8/src/bin/psql/psqlscanslash.l:682:3: return_function: returning to ‘psql_scan_slash_command_end’ from ‘slash_yy_switch_to_buffer’
postgresql-16.8/src/bin/psql/psqlscanslash.l:688:2: call_function: calling ‘slash_yylex’ from ‘psql_scan_slash_command_end’
# 2567|   	b->yy_buffer_status = YY_BUFFER_NEW;
# 2568|   
# 2569|-> 	if ( b == YY_CURRENT_BUFFER )
# 2570|   		yy_load_buffer_state( yyscanner );
# 2571|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1021]
postgresql-16.8/src/bin/psql/psqlscanslash.c:2650:17: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(8)’
postgresql-16.8/src/bin/psql/psqlscanslash.l:547:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-16.8/src/bin/psql/psqlscanslash.l:576:19: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/psqlscanslash.l:577:10: branch_true: ...to here
postgresql-16.8/src/bin/psql/psqlscanslash.l:577:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 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;
# 2651|   		yyg->yy_buffer_stack_top = 0;
# 2652|   		return;

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1022]
postgresql-16.8/src/bin/psql/psqlscanslash.c:2670:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/src/bin/psql/psqlscanslash.l:547:8: enter_function: entry to ‘psql_scan_slash_option’
postgresql-16.8/src/bin/psql/psqlscanslash.l:576:19: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/psql/psqlscanslash.l:577:10: branch_true: ...to here
postgresql-16.8/src/bin/psql/psqlscanslash.l:577:10: call_function: calling ‘slash_yy_switch_to_buffer’ from ‘psql_scan_slash_option’
# 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|   	}
# 2672|   }

Error: CPPCHECK_WARNING (CWE-562): [#def1023]
postgresql-16.8/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): [#def1024]
postgresql-16.8/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): [#def1025]
postgresql-16.8/src/bin/scripts/vacuumdb.c:873:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘cell’
postgresql-16.8/src/bin/scripts/vacuumdb.c:919:1: enter_function: entry to ‘vacuum_all_databases’
postgresql-16.8/src/bin/scripts/vacuumdb.c:936:12: branch_false: following ‘false’ branch (when ‘analyze_in_stages == 0’)...
 branch_false: ...to here
postgresql-16.8/src/bin/scripts/vacuumdb.c:962:29: branch_true: following ‘true’ branch...
postgresql-16.8/src/bin/scripts/vacuumdb.c:964:52: branch_true: ...to here
postgresql-16.8/src/bin/scripts/vacuumdb.c:966:25: call_function: calling ‘vacuum_one_database’ from ‘vacuum_all_databases’
#  871|   						   echo, tabname);
#  872|   
#  873|-> 		cell = cell->next;
#  874|   	} while (cell != NULL);
#  875|   

Error: CPPCHECK_WARNING (CWE-457): [#def1026]
postgresql-16.8/src/common/encnames.c:541: warning[uninitvar]: Uninitialized variable: newkey
#  539|   	}
#  540|   	*np = '\0';
#  541|-> 	return newkey;
#  542|   }
#  543|   

Error: GCC_ANALYZER_WARNING (CWE-775): [#def1027]
postgresql-16.8/src/common/sprompt.c:180:16: warning[-Wanalyzer-file-leak]: leak of FILE ‘termout’
postgresql-16.8/src/common/sprompt.c:96:19: acquire_resource: opened here
postgresql-16.8/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-16.8/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-16.8/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): [#def1028]
postgresql-16.8/src/common/sprompt.c:180:16: warning[-Wanalyzer-malloc-leak]: leak of ‘termout’
postgresql-16.8/src/common/sprompt.c:96:19: acquire_memory: allocated here
postgresql-16.8/src/common/sprompt.c:98:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/common/sprompt.c:119:12: branch_false: ...to here
postgresql-16.8/src/common/sprompt.c:174:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/common/sprompt.c:180:16: branch_false: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-562): [#def1029]
postgresql-16.8/src/common/unicode_norm.c:98: error[returnDanglingLifetime]: Returning pointer to local variable 'decompinfo' that will be invalid when returning.
#   96|   
#   97|   	/* Success! */
#   98|-> 	return &decompinfo.decomps[h];
#   99|   #else
#  100|   	return bsearch(&(code),

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1030]
postgresql-16.8/src/fe_utils/print.c:909:42: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘width_header’
postgresql-16.8/src/fe_utils/print.c:3535:1: enter_function: entry to ‘printQuery’
postgresql-16.8/src/fe_utils/print.c:3543:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/fe_utils/print.c:3547:55: branch_false: ...to here
postgresql-16.8/src/fe_utils/print.c:3553:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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-401): [#def1031]
postgresql-16.8/src/fe_utils/print.c:1219:12: warning[-Wanalyzer-malloc-leak]: leak of ‘fout’
postgresql-16.8/src/fe_utils/print.c:3535:1: enter_function: entry to ‘printQuery’
postgresql-16.8/src/fe_utils/print.c:3543:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/fe_utils/print.c:3547:55: branch_false: ...to here
postgresql-16.8/src/fe_utils/print.c:3553:21: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/src/fe_utils/print.c:3595:9: call_function: calling ‘printTable’ from ‘printQuery’
# 1217|   	free(wrap);
# 1218|   
# 1219|-> 	if (is_local_pager)
# 1220|   		ClosePager(fout);
# 1221|   }

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1032]
postgresql-16.8/src/fe_utils/psqlscan.c:4586:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/fe_utils/psqlscan.l:1127:8: enter_function: entry to ‘psql_scan’
postgresql-16.8/src/fe_utils/psqlscan.l:1142:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-16.8/src/fe_utils/psqlscan.l:1142:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-16.8/src/fe_utils/psqlscan.l:1147:14: call_function: calling ‘psql_yylex’ from ‘psql_scan’
# 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()" );
# 4588|   

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1033]
postgresql-16.8/src/fe_utils/psqlscan.c:4628:9: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘b’
postgresql-16.8/src/fe_utils/psqlscan.l:1127:8: enter_function: entry to ‘psql_scan’
postgresql-16.8/src/fe_utils/psqlscan.l:1142:10: call_function: calling ‘psql_yy_switch_to_buffer’ from ‘psql_scan’
postgresql-16.8/src/fe_utils/psqlscan.l:1142:10: return_function: returning to ‘psql_scan’ from ‘psql_yy_switch_to_buffer’
postgresql-16.8/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): [#def1034]
postgresql-16.8/src/fe_utils/recovery_gen.c:123:13: warning[-Wanalyzer-file-leak]: leak of FILE ‘fopen(&filename,  <unknown>)’
postgresql-16.8/src/fe_utils/recovery_gen.c:119:14: acquire_resource: opened here
postgresql-16.8/src/fe_utils/recovery_gen.c:120:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/fe_utils/recovery_gen.c:123:13: branch_false: ...to here
postgresql-16.8/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): [#def1035]
postgresql-16.8/src/fe_utils/recovery_gen.c:123:13: warning[-Wanalyzer-malloc-leak]: leak of ‘fopen(&filename,  <unknown>)’
postgresql-16.8/src/fe_utils/recovery_gen.c:119:14: acquire_memory: allocated here
postgresql-16.8/src/fe_utils/recovery_gen.c:120:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/fe_utils/recovery_gen.c:123:13: branch_false: ...to here
postgresql-16.8/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-401): [#def1036]
postgresql-16.8/src/interfaces/libpq/fe-exec.c:677:17: warning[-Wanalyzer-malloc-leak]: leak of ‘<unknown>’
postgresql-16.8/src/interfaces/libpq/fe-exec.c:2185:1: enter_function: entry to ‘getCopyResult’
postgresql-16.8/src/interfaces/libpq/fe-exec.c:2199:24: call_function: calling ‘pqPrepareAsyncResult’ from ‘getCopyResult’
#  675|   
#  676|   	if (space)
#  677|-> 		strcpy(space, str);
#  678|   	return space;
#  679|   }

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1037]
postgresql-16.8/src/interfaces/libpq/fe-exec.c:734:21: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/interfaces/libpq/fe-exec.c:3060:1: enter_function: entry to ‘pqPipelineProcessQueue’
postgresql-16.8/src/interfaces/libpq/fe-exec.c:3118:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/interfaces/libpq/fe-exec.c:3119:17: branch_true: ...to here
postgresql-16.8/src/interfaces/libpq/fe-exec.c:3118:13: branch_true: following ‘true’ branch...
postgresql-16.8/src/interfaces/libpq/fe-exec.c:3129:32: branch_true: ...to here
postgresql-16.8/src/interfaces/libpq/fe-exec.c:3129:32: call_function: calling ‘PQmakeEmptyPGresult’ from ‘pqPipelineProcessQueue’
#  732|   	{
#  733|   		/* only send DESTROY to successfully-initialized event procs */
#  734|-> 		if (res->events[i].resultInitialized)
#  735|   		{
#  736|   			PGEventResultDestroy evt;

Error: GCC_ANALYZER_WARNING (CWE-688): [#def1038]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1298:45: warning[-Wanalyzer-null-argument]: use of NULL ‘colname’ where non-null expected
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1175:1: enter_function: entry to ‘resolve_column_ref’
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1206:17: call_function: inlined call to ‘list_length’ from ‘resolve_column_ref’
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1272:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1275:17: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1282:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1284:28: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1284:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1287:68: branch_true: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1292:40: branch_true: following ‘true’ branch (when ‘i >= 0’)...
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1294:100: branch_true: ...to here
postgresql-16.8/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: CPPCHECK_WARNING (CWE-768): [#def1039]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1448: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1446|   	int			nnames;
# 1447|   
# 1448|-> 	idents = list_make2(makeString(word1),
# 1449|   						makeString(word2));
# 1450|   

Error: CPPCHECK_WARNING (CWE-768): [#def1040]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1565: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1563|   							 */
# 1564|   							new = plpgsql_build_recfield(rec, word2);
# 1565|-> 							idents = list_make2(makeString(word1),
# 1566|   												makeString(word2));
# 1567|   						}

Error: CPPCHECK_WARNING (CWE-768): [#def1041]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1572: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1570|   							/* Block-qualified reference to record variable. */
# 1571|   							new = plpgsql_build_recfield(rec, word3);
# 1572|-> 							idents = list_make3(makeString(word1),
# 1573|   												makeString(word2),
# 1574|   												makeString(word3));

Error: CPPCHECK_WARNING (CWE-768): [#def1042]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1572: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))},(union ListCell){.ptr_value=(makeString(word3))}' depends on order of evaluation of side effects
# 1570|   							/* Block-qualified reference to record variable. */
# 1571|   							new = plpgsql_build_recfield(rec, word3);
# 1572|-> 							idents = list_make3(makeString(word1),
# 1573|   												makeString(word2),
# 1574|   												makeString(word3));

Error: CPPCHECK_WARNING (CWE-768): [#def1043]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1590: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))}' depends on order of evaluation of side effects
# 1588|   
# 1589|   	/* Nothing found */
# 1590|-> 	idents = list_make3(makeString(word1),
# 1591|   						makeString(word2),
# 1592|   						makeString(word3));

Error: CPPCHECK_WARNING (CWE-768): [#def1044]
postgresql-16.8/src/pl/plpgsql/src/pl_comp.c:1590: error[unknownEvaluationOrder]: Expression 'T_List,(union ListCell){.ptr_value=(makeString(word1))},(union ListCell){.ptr_value=(makeString(word2))},(union ListCell){.ptr_value=(makeString(word3))}' depends on order of evaluation of side effects
# 1588|   
# 1589|   	/* Nothing found */
# 1590|-> 	idents = list_make3(makeString(word1),
# 1591|   						makeString(word2),
# 1592|   						makeString(word3));

Error: GCC_ANALYZER_WARNING (CWE-476): [#def1045]
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:5129:50: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7425:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7430:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7541:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7543:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7543: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): [#def1046]
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:8570:17: warning[-Wanalyzer-null-dereference]: dereference of NULL ‘0’
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7425:1: enter_function: entry to ‘exec_move_row_from_datum’
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7430:12: branch_true: following ‘true’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7541:20: branch_true: following ‘true’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7543:25: call_function: inlined call to ‘expanded_record_get_tupdesc’ from ‘exec_move_row_from_datum’
postgresql-16.8/src/pl/plpgsql/src/pl_exec.c:7543:25: call_function: calling ‘exec_move_row’ from ‘exec_move_row_from_datum’
# 8568|   	 */
# 8569|   	if (!estate->atomic && !isnull && var->datatype->typlen == -1 &&
# 8570|-> 		VARATT_IS_EXTERNAL_NON_EXPANDED(DatumGetPointer(newvalue)))
# 8571|   	{
# 8572|   		MemoryContext oldcxt;

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1047]
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1868:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1823:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1829:34: branch_true: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1855:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1857:7: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1866:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1868:9: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1868:9: danger: use of uninitialized value ‘yyss’ here
# 1866|           if (! yyptr)
# 1867|             goto yyexhaustedlab;
# 1868|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1869|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1870|           YYSTACK_RELOCATE (yyls_alloc, yyls);

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1048]
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1998:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*<unknown>’
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1823:6: branch_false: following ‘false’ branch...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1891:6: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1891:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1894:3: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1906:6: branch_true: following ‘true’ branch (when ‘yyn == -249’)...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1907:5: branch_true: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1978:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1980:3: branch_false: ...to here
postgresql-16.8/src/pl/plpgsql/src/pl_gram.c:1998:3: danger: use of uninitialized value ‘*<unknown>’ here
# 1996|        unconditionally makes the parser a bit smaller, and it avoids a
# 1997|        GCC warning that YYVAL may be used uninitialized.  */
# 1998|->   yyval = yyvsp[1-yylen];
# 1999|   
# 2000|     /* Default location. */

Error: CPPCHECK_WARNING (CWE-476): [#def1049]
postgresql-16.8/src/pl/tcl/pltcl.c:3205: warning[nullPointer]: Possible null pointer dereference: tupdesc
# 3203|   	}
# 3204|   
# 3205|-> 	values = (char **) palloc0(tupdesc->natts * sizeof(char *));
# 3206|   
# 3207|   	if (kvObjc % 2 != 0)

Error: COMPILER_WARNING: [#def1050]
postgresql-16.8/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: [#def1051]
postgresql-16.8/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: [#def1052]
postgresql-16.8/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): [#def1053]
postgresql-16.8/src/test/isolation/specparse.c:1011:9: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘yyss’
postgresql-16.8/src/test/isolation/specparse.c:969:6: branch_true: following ‘true’ branch...
postgresql-16.8/src/test/isolation/specparse.c:975:28: branch_true: ...to here
postgresql-16.8/src/test/isolation/specparse.c:998:10: branch_false: following ‘false’ branch (when ‘yystacksize <= 9999’)...
postgresql-16.8/src/test/isolation/specparse.c:1000:7: branch_false: ...to here
postgresql-16.8/src/test/isolation/specparse.c:1009:12: branch_false: following ‘false’ branch (when ‘yyptr’ is non-NULL)...
postgresql-16.8/src/test/isolation/specparse.c:1011:9: branch_false: ...to here
postgresql-16.8/src/test/isolation/specparse.c:1011:9: danger: use of uninitialized value ‘yyss’ here
# 1009|           if (! yyptr)
# 1010|             goto yyexhaustedlab;
# 1011|->         YYSTACK_RELOCATE (yyss_alloc, yyss);
# 1012|           YYSTACK_RELOCATE (yyvs_alloc, yyvs);
# 1013|   #  undef YYSTACK_RELOCATE

Error: GCC_ANALYZER_WARNING (CWE-457): [#def1054]
postgresql-16.8/src/test/isolation/specparse.c:1137:3: warning[-Wanalyzer-use-of-uninitialized-value]: use of uninitialized value ‘*(char **)<unknown>’
postgresql-16.8/src/test/isolation/specparse.c:969:6: branch_false: following ‘false’ branch...
postgresql-16.8/src/test/isolation/specparse.c:1032:6: branch_false: ...to here
postgresql-16.8/src/test/isolation/specparse.c:1032:6: branch_false: following ‘false’ branch (when ‘yystate != 3’)...
postgresql-16.8/src/test/isolation/specparse.c:1035:3: branch_false: ...to here
postgresql-16.8/src/test/isolation/specparse.c:1047:6: branch_true: following ‘true’ branch (when ‘yyn == -14’)...
postgresql-16.8/src/test/isolation/specparse.c:1048:5: branch_true: ...to here
postgresql-16.8/src/test/isolation/specparse.c:1117:6: branch_false: following ‘false’ branch (when ‘yyn != 0’)...
postgresql-16.8/src/test/isolation/specparse.c:1119:3: branch_false: ...to here
postgresql-16.8/src/test/isolation/specparse.c:1137:3: danger: use of uninitialized value ‘*(char **)<unknown>’ here
# 1135|        unconditionally makes the parser a bit smaller, and it avoids a
# 1136|        GCC warning that YYVAL may be used uninitialized.  */
# 1137|->   yyval = yyvsp[1-yylen];
# 1138|   
# 1139|   

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1055]
postgresql-16.8/src/test/isolation/specscanner.c:1444:33: warning[-Wanalyzer-malloc-leak]: leak of ‘*b.yy_ch_buf’
postgresql-16.8/src/test/isolation/specscanner.c:1377:12: enter_function: entry to ‘yy_get_next_buffer’
postgresql-16.8/src/test/isolation/specscanner.c:1384:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/test/isolation/specscanner.c:1388:14: branch_false: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1388:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/test/isolation/specscanner.c:1410:33: branch_false: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1415:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/test/isolation/specscanner.c:1424:25: branch_false: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1426:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/src/test/isolation/specscanner.c:1430:41: branch_true: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1446:41: call_function: inlined call to ‘spec_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/src/test/isolation/specscanner.c:1453:28: branch_false: following ‘false’ branch...
postgresql-16.8/src/test/isolation/specscanner.c:1457:40: branch_false: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1426:25: branch_true: following ‘true’ branch (when ‘num_to_read <= 0’)...
postgresql-16.8/src/test/isolation/specscanner.c:1430:41: branch_true: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1435:28: branch_true: following ‘true’ branch...
postgresql-16.8/src/test/isolation/specscanner.c:1437:48: branch_true: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1446:41: call_function: inlined call to ‘spec_yyrealloc’ from ‘yy_get_next_buffer’
postgresql-16.8/src/test/isolation/specscanner.c:1444:33: danger: ‘*b.yy_ch_buf’ leaks here; was allocated at [(11)](sarif:/runs/0/results/0/codeFlows/0/threadFlows/0/locations/10)
# 1442|   					b->yy_buf_size *= 2;
# 1443|   
# 1444|-> 				b->yy_ch_buf = (char *)
# 1445|   					/* Include room in for 2 EOB chars. */
# 1446|   					yyrealloc( (void *) b->yy_ch_buf,

Error: GCC_ANALYZER_WARNING (CWE-401): [#def1056]
postgresql-16.8/src/test/isolation/specscanner.c:1729:12: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(64)’
postgresql-16.8/src/test/isolation/specscanner.c:1715:21: enter_function: entry to ‘spec_yy_create_buffer’
postgresql-16.8/src/test/isolation/specscanner.c:1719:31: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_create_buffer’
postgresql-16.8/src/test/isolation/specscanner.c:1720:12: branch_false: following ‘false’ branch...
postgresql-16.8/src/test/isolation/specscanner.c:1723:9: branch_false: ...to here
postgresql-16.8/src/test/isolation/specscanner.c:1729:12: danger: ‘malloc(64)’ leaks here; was allocated at [(3)](sarif:/runs/0/results/1/codeFlows/0/threadFlows/0/locations/2)
# 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()" );
# 1731|   

Error: CPPCHECK_WARNING (CWE-476): [#def1057]
postgresql-16.8/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): [#def1058]
postgresql-16.8/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): [#def1059]
postgresql-16.8/src/test/isolation/specscanner.c:1983:33: warning[-Wanalyzer-malloc-leak]: leak of ‘malloc(n)’
postgresql-16.8/src/test/isolation/specscanner.c:1967:17: enter_function: entry to ‘spec_yy_scan_bytes’
postgresql-16.8/src/test/isolation/specscanner.c:1976:24: call_function: inlined call to ‘spec_yyalloc’ from ‘spec_yy_scan_bytes’
postgresql-16.8/src/test/isolation/specscanner.c:1977:12: branch_false: following ‘false’ branch...
 branch_false: ...to here
postgresql-16.8/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 );

Scan Properties

analyzer-version-clippy1.86.0
analyzer-version-cppcheck2.17.1
analyzer-version-gcc15.0.1
analyzer-version-gcc-analyzer15.0.1
analyzer-version-shellcheck0.10.0
analyzer-version-unicontrol0.0.2
enabled-pluginsclippy, cppcheck, gcc, shellcheck, unicontrol
exit-code0
hostip-172-16-1-137.us-west-2.compute.internal
known-false-positives/usr/share/csmock/known-false-positives.js
known-false-positives-rpmknown-false-positives-0.0.0.20250425.124705.g1c7c448.main-1.el9.noarch
mock-configfedora-rawhide-x86_64
project-namepostgresql16-16.8-1.fc43
store-results-to/tmp/tmpsh1w8f8w/postgresql16-16.8-1.fc43.tar.xz
time-created2025-04-25 15:30:24
time-finished2025-04-25 15:55:49
toolcsmock
tool-args'/usr/bin/csmock' '-r' 'fedora-rawhide-x86_64' '-t' 'unicontrol,cppcheck,gcc,clippy,shellcheck' '-o' '/tmp/tmpsh1w8f8w/postgresql16-16.8-1.fc43.tar.xz' '--gcc-analyze' '--unicontrol-notests' '--unicontrol-bidi-only' '--install' 'pam' '--gcc-analyzer-bin=/usr/bin/gcc' '/tmp/tmpsh1w8f8w/postgresql16-16.8-1.fc43.src.rpm'
tool-versioncsmock-3.8.1.20250422.172604.g26bc3d6-1.el9