pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Ensure that slots are zeroed before use
2+ messages / 1 participants
[nested] [flat]

* pgsql: Ensure that slots are zeroed before use
@ 2021-10-26 08:44  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2021-10-26 08:44 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/e63ce9e8d6ac8dced20592c4134004640f9f5644

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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: Ensure that slots are zeroed before use
@ 2021-10-26 08:45  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2021-10-26 08:45 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

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(+)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2021-10-26 08:45 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-10-26 08:44 pgsql: Ensure that slots are zeroed before use Daniel Gustafsson <dgustafsson@postgresql.org>
2021-10-26 08:45 pgsql: Ensure that slots are zeroed before use Daniel Gustafsson <dgustafsson@postgresql.org>

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