Re: "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c
Дата
Msg-id 53328D0C.5010800@vmware.com
обсуждение исходный текст
Ответ на "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c  (Peter Geoghegan <pg@heroku.com>)
Список pgsql-hackers
On 03/26/2014 09:21 AM, Peter Geoghegan wrote:
> It looks like a "recheck" stack variable isn't every being set within
> TS_execute_ternary() (which has a pointer to that variable on the
> stack) - ultimately, the checkcondition_gin() callback will set the
> flag, but only to 'true' (iff that's appropriate). When that doesn't
> happen, it just contains a garbage uninitialized value, and yet
> evidently control flow depends on that value.
>
> I propose that we initialize the variable to false, since there
> appears to be a tacit assumption that that is already the case, as
> with the plain consistent GIN support function in the same file.
> Attached patch does just that.

Yep, fixed. Thanks!

- Heikki



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

Предыдущее
От: Kyotaro HORIGUCHI
Дата:
Сообщение: Re: inherit support for foreign tables
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: New parameter RollbackError to control rollback behavior on error