Re: Fix uninitialized copy_data var (src/backend/commands/subscriptioncmds.c) - Mailing list pgsql-hackers

From Peter Smith
Subject Re: Fix uninitialized copy_data var (src/backend/commands/subscriptioncmds.c)
Date
Msg-id CAHut+PteirsQd4Vm1xr4S9==v+OtiTHMBxua=26RG9OqHuLs0w@mail.gmail.com
Whole thread Raw
In response to Re: Fix uninitialized copy_data var (src/backend/commands/subscriptioncmds.c)  (Ranier Vilela <ranier.vf@gmail.com>)
Responses Re: Fix uninitialized copy_data var (src/backend/commands/subscriptioncmds.c)  (Michael Paquier <michael@paquier.xyz>)
Re: Fix uninitialized copy_data var (src/backend/commands/subscriptioncmds.c)  (Ranier Vilela <ranier.vf@gmail.com>)
List pgsql-hackers
On Fri, Jun 25, 2021 at 11:55 PM Ranier Vilela <ranier.vf@gmail.com> wrote:
>
>
> https://github.com/postgres/postgres/commit/3af10943ce21450e299b3915b9cad47cd90369e9
> fixes some issues with subscriptioncmds.c, but IMHO still lack this issue.
>

I have not tested this, and gcc gave no warnings about it, but just by
visual code inspection I do agree with you that this looks like a
problem, even in the latest code.

IIUC for the case ALTER_SUBSCRIPTION_DROP_PUBLICATION it looks like
the uninitialized copy_data local stack var would remain uninitialized
(undefined) still at the time it is passed at
AlterSubscription_refresh(sub, copy_data);

------
Kind Regards,
Peter Smith.
Fujitsu Australia.



pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: What is "wraparound failure", really?
Next
From: Thomas Munro
Date:
Subject: Re: What is "wraparound failure", really?