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

From: Heikki Linnakangas <hlinnakangas(at)vmware(dot)com>
To: Peter Geoghegan <pg(at)heroku(dot)com>
Cc: Pg Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: "Conditional jump or move depends on uninitialised value(s)" within tsginidx.c
Date: 2014-03-26 08:17:16
Message-ID: 53328D0C.5010800@vmware.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2014-03-26 08:53:52 Re: New parameter RollbackError to control rollback behavior on error
Previous Message Kyotaro HORIGUCHI 2014-03-26 08:14:54 Re: inherit support for foreign tables