Re: BUG #15899: Valgrind detects errors on create gist index

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Andres Freund <andres@anarazel.de>
Cc: Alexander Lakhin <exclusion@gmail.com>, pgsql-bugs@lists.postgresql.org
Date: 2019-07-10T07:07:25Z
Lists: pgsql-bugs
On Tue, Jul 09, 2019 at 01:59:25PM -0700, Andres Freund wrote:
> I think this is just that openssl bug we've been talking about a while
> ago. keep_current_best is initialized via random(), which is in turn
> initialized with openssl's randomness (cf InitProcessGlobals()). As
> valgrind - legitimately - thinks that the openssl' random value is
> tainted by uninitialized data, it thinks that keep_current_best is
> uninitialized. And the branches above are the first values where a jump
> is made based on that uninitialized data.

Yes, thanks for reminding of that issue:
https://www.postgresql.org/message-id/20190611205131.e5trufqahzpiwut6@alap3.anarazel.de
I completely forgot about it, and I am now on 1.1.1c on my dev
machine, so this explains that.
--
Michael

Commits

  1. Fix variable initialization when using buffering build with GiST