pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Daniel Gustafsson <dgustafsson@postgresql.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Ensure that slots are zeroed before use
Date: Tue, 26 Oct 2021 08:45:07 +0000
Message-ID: <E1mfI4x-0006bi-R0@gemulon.postgresql.org> (raw)

Ensure that slots are zeroed before use

The previous coding relied on the memory for the slots being zeroed
elsewhere, which while it was true in this case is not an contract
which is guaranteed to hold.  Explicitly clear the tts_isnull array
to ensure that the slots are filled from a known state.

Backpatch to v14 where the catalog multi-inserts were introduced.

Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/CAJ7c6TP0AowkUgNL6zcAK-s5HYsVHVBRWfu69FRubPpfwZGM9A@mail.gmail.com
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1ed1f801cdd114822a5f08409f23a7f22be0b9fb

Modified Files
--------------
src/backend/catalog/heap.c        | 3 +++
src/backend/catalog/pg_shdepend.c | 3 +++
2 files changed, 6 insertions(+)



view thread (2+ messages)

Message-ID: <E1mfI4x-0006bi-R0@gemulon.postgresql.org>
Permalink:  ../E1mfI4x-0006bi-R0@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1mfI4x-0006bi-R0@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: dgustafsson@postgresql.org
  Subject: Re: pgsql: Ensure that slots are zeroed before use
  In-Reply-To: <E1mfI4x-0006bi-R0@gemulon.postgresql.org>
  References: <E1mfI4x-0006bi-R0@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox