public inbox for [email protected]
help / color / mirror / Atom feedFrom: Kyotaro Horiguchi <[email protected]>
To: [email protected]
Cc: [email protected]
Subject: Re: Fix use of possible uninitialized variable retval (src/pl/plpgsql/src/pl_handler.c)
Date: Wed, 05 Jun 2024 13:12:41 +0900 (JST)
Message-ID: <[email protected]> (raw)
In-Reply-To: <CAEudQAoDXrVNV8M9q2k4xycxuBrebh0NRPECXFa1N-Z8q-B7ww@mail.gmail.com>
References: <CAEudQAoDXrVNV8M9q2k4xycxuBrebh0NRPECXFa1N-Z8q-B7ww@mail.gmail.com>
At Mon, 27 May 2024 11:31:24 -0300, Ranier Vilela <[email protected]> wrote in
> Hi.
>
> The function *plpgsql_inline_handler* can use uninitialized
> variable retval, if PG_TRY fails.
> Fix like function*plpgsql_call_handler* wich declare retval as
> volatile and initialize to (Datum 0).
If PG_TRY fails, retval is not actually accessed, so no real issue
exists. Commit 7292fd8f1c changed plpgsql_call_handler() to the
current form, but as stated in its commit message, it did not fix a
real issue and was solely to silence compiler.
I believe we do not need to modify plpgsql_inline_handler() unless
compiler actually issues a false warning for it.
regards.
--
Kyotaro Horiguchi
NTT Open Source Software Center
view thread (7+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: Fix use of possible uninitialized variable retval (src/pl/plpgsql/src/pl_handler.c)
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox