Re: "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c - Mailing list pgsql-hackers

From Heikki Linnakangas
Subject Re: "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c
Date
Msg-id 53328D0C.5010800@vmware.com
Whole thread Raw
In response to "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c  (Peter Geoghegan <pg@heroku.com>)
List 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 by date:

Previous
From: Kyotaro HORIGUCHI
Date:
Subject: Re: inherit support for foreign tables
Next
From: Heikki Linnakangas
Date:
Subject: Re: New parameter RollbackError to control rollback behavior on error