Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c) - Mailing list pgsql-hackers

From Ranier Vilela
Subject Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c)
Date
Msg-id CAEudQApTd4w8vHOgZAfgFeCNoes-hgc6BhwHHXqDS=K3Orm-Uw@mail.gmail.com
Whole thread Raw
In response to Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c)  (Mahendra Singh Thalor <mahi6run@gmail.com>)
Responses Re: Fix uninitialized variable access (src/backend/utils/mmgr/freepage.c)  (Michael Paquier <michael@paquier.xyz>)
List pgsql-hackers
Em qui., 1 de jul. de 2021 às 17:20, Mahendra Singh Thalor <mahi6run@gmail.com> escreveu:
On Fri, 2 Jul 2021 at 01:13, Ranier Vilela <ranier.vf@gmail.com> wrote:
>
> Hi,
>
> The function FreePageManagerPutInternal can access an uninitialized variable,
> if the following conditions occur:

Patch looks good to me.

> 1. fpm->btree_depth != 0
> 2. relptr_off == 0 inside function (FreePageBtreeSearch)
>
> Perhaps this is a rare situation, but I think it's worth preventing.

Please can we try to hit this rare condition by any test case. If you have any test cases, please share.
Added to Commitfest (https://commitfest.postgresql.org/34/3236/), so we don't forget.
 
regards,
Ranier Vilela

pgsql-hackers by date:

Previous
From: Alvaro Herrera
Date:
Subject: Re: psql - factor out echo code
Next
From: Tom Lane
Date:
Subject: Re: psql - factor out echo code