From: Tomas Vondra <tomas.vondra@2ndquadrant.com>
To: Ranier Vilela <ranier_gyn@hotmail.com>
Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>
Subject: Re: [BUG] Uninitializaed configOut.leafType used.
Date: Wed, 13 Nov 2019 19:47:15 +0100
Message-ID: <20191113184715.hgpfvphfx4lw6fwm@development> (raw)
In-Reply-To: <MN2PR18MB29278ED3DCF436F92D144451E3760@MN2PR18MB2927.namprd18.prod.outlook.com>
References: <MN2PR18MB29278AACBEABDEDA2951A32EE3760@MN2PR18MB2927.namprd18.prod.outlook.com>
<32631.1573665493@sss.pgh.pa.us>
<MN2PR18MB29278ED3DCF436F92D144451E3760@MN2PR18MB2927.namprd18.prod.outlook.com>
On Wed, Nov 13, 2019 at 05:55:40PM +0000, Ranier Vilela wrote:
>Hi,
>Ok, so all these commands are for what?
>
> case SPGIST_CONFIG_PROC:
> ok = check_amproc_signature(procform->amproc, VOIDOID, true,
> 2, 2, INTERNALOID, INTERNALOID);
> configIn.attType = procform->amproclefttype;
> memset(&configOut, 0, sizeof(configOut));
>
> OidFunctionCall2(procform->amproc,
> PointerGetDatum(&configIn),
> PointerGetDatum(&configOut));
>
> configOutLefttype = procform->amproclefttype;
> configOutRighttype = procform->amprocrighttype;
>
> /*
> * When leaf and attribute types are the same, compress
> * function is not required and we set corresponding bit in
> * functionset for later group consistency check.
> */
> if (!OidIsValid(configOut.leafType) ||
> configOut.leafType == configIn.attType)
> {
>
>When case SPGIST_CONFIG_PROC, OidIsValid(configOut.leafType) is tested,
>but when case SPGIST_COMPRESS_PROC is fired, OidIsValid(configOut.leafType) is not necessary and configOut.leafType
>happy accessed?
>
>Maybe, the Valgrind paths, didn't have a chance, with case SPGIST_COMPRESS_PROC.
>
>I review carefully, before send to list and premature judgments, don't help.
>
That's great, but unfortunately it's useless if you don't explain the
reasoning while reporting the issue. Even better if you can provide a
reproducer hitting the issue, of course.
regards
--
Tomas Vondra http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: tomas.vondra@2ndquadrant.com, ranier_gyn@hotmail.com
Subject: Re: [BUG] Uninitializaed configOut.leafType used.
In-Reply-To: <20191113184715.hgpfvphfx4lw6fwm@development>
References: <MN2PR18MB29278AACBEABDEDA2951A32EE3760@MN2PR18MB2927.namprd18.prod.outlook.com> <32631.1573665493@sss.pgh.pa.us> <MN2PR18MB29278ED3DCF436F92D144451E3760@MN2PR18MB2927.namprd18.prod.outlook.com> <20191113184715.hgpfvphfx4lw6fwm@development>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox