RE: [BUG] Uninitializaed configOut.leafType used.

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема RE: [BUG] Uninitializaed configOut.leafType used.
Дата
Msg-id MN2PR18MB29278ED3DCF436F92D144451E3760@MN2PR18MB2927.namprd18.prod.outlook.com
обсуждение исходный текст
Ответ на Re: [BUG] Uninitializaed configOut.leafType used.  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [BUG] Uninitializaed configOut.leafType used.  (Andres Freund <andres@anarazel.de>)
Re: [BUG] Uninitializaed configOut.leafType used.  (Tomas Vondra <tomas.vondra@2ndquadrant.com>)
Список pgsql-bugs
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.

Best regards,
Ranier Vilela

________________________________________
De: Tom Lane <tgl@sss.pgh.pa.us>
Enviado: quarta-feira, 13 de novembro de 2019 17:18
Para: Ranier Vilela
Cc: pgsql-bugs@lists.postgresql.org
Assunto: Re: [BUG] Uninitializaed configOut.leafType used.

Ranier Vilela <ranier_gyn@hotmail.com> writes:
> Hi,
> file: /backend/access/spgist/spgvalidate.c
> line: 159
> var: configOut.leafType

TBH, I think whatever tool you're using to detect these things
is buggy.  We don't get compiler warnings about it from any
compiler in common use among pghackers, and what might be
more to the point, we don't get Valgrind complaints.

If you want us to take these complaints seriously, you need
to provid more than zero evidence why we should.

                        regards, tom lane



В списке pgsql-bugs по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #16112: large, unexpected memory consumption
Следующее
От: Andres Freund
Дата:
Сообщение: Re: [BUG] Uninitializaed configOut.leafType used.