Re: BUG #15943: Valgrind-detected error in SlruPhysicalWritePage

From: Andres Freund <andres(at)anarazel(dot)de>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>,Alexander Lakhin <exclusion(at)gmail(dot)com>
Cc: pgsql-bugs(at)lists(dot)postgresql(dot)org,PG Bug reporting form <noreply(at)postgresql(dot)org>
Subject: Re: BUG #15943: Valgrind-detected error in SlruPhysicalWritePage
Date: 2019-08-08 18:21:04
Message-ID: 6F9C8AAA-D805-4E1D-8028-C9E1A1D8F0AB@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

Hi,

On August 8, 2019 12:43:32 PM EDT, Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>On 2019-Aug-08, Alexander Lakhin wrote:
>
>> Indeed, "memset(&qe, 0, sizeof(qe));" added in the beginning of
>> asyncQueueAddEntries fixes the issue.
>> More interestingly, "memset(qe.data, 0, sizeof(qe.data));" in the
>same
>> place fixes it too (the patch is attached).
>
>Maybe VALGRIND_MAKE_MEM_DEFINED?

Seems there's no reason to not zero initialize memory here? But perhaps just by initializing the stack variable?
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.

In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message Tom Lane 2019-08-08 18:41:42 Re: BUG #15943: Valgrind-detected error in SlruPhysicalWritePage
Previous Message Alvaro Herrera 2019-08-08 16:43:32 Re: BUG #15943: Valgrind-detected error in SlruPhysicalWritePage