Re: [PATCH] Fix memory corruption in pg_shdepend.c - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: [PATCH] Fix memory corruption in pg_shdepend.c
Date
Msg-id A2344259-1072-4836-99F2-B018AC606752@yesql.se
Whole thread Raw
In response to Re: [PATCH] Fix memory corruption in pg_shdepend.c  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: [PATCH] Fix memory corruption in pg_shdepend.c
List pgsql-hackers
> On 22 Oct 2021, at 15:38, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Michael Paquier <michael@paquier.xyz> writes:
>> On Fri, Oct 22, 2021 at 10:48:57AM +0300, Aleksander Alekseev wrote:
>>> ... where the slot is allocated with palloc0. The assumption that
>>> MakeSingleTupleTableSlot() returns valid TupleTableSlot* with zeroed
>>> tts_isnull[] seems reasonable, no?
>
>> Yes, I don't see any need to do something more here.
>
> That assumption is exactly what I'm objecting to.  I don't think
> we make it in other places, and I don't like making it here.
> (By "here" I mean all of e3931d0, because it made the same omission
> in several places.)

The attached fixes the the two ones I spotted, are there any I missed?
Regardless of if we want to change the API (as discussed elsewhere here and in
a new thread), something like the attached should be done first and in 14 I
think.

--
Daniel Gustafsson        https://vmware.com/


Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: [Bug] Logical Replication failing if the DateStyle is different in Publisher & Subscriber
Next
From: Andres Freund
Date:
Subject: Re: Experimenting with hash tables inside pg_dump