pgsql: ltree: Zero padding bytes when allocating memory for externally - Mailing list pgsql-committers

From Andres Freund
Subject pgsql: ltree: Zero padding bytes when allocating memory for externally
Date
Msg-id E1adQp3-00087S-SR@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
ltree: Zero padding bytes when allocating memory for externally visible data.

ltree/ltree_gist/ltxtquery's headers stores data at MAXALIGN alignment,
requiring some padding bytes. So far we left these uninitialized. Zero
those by using palloc0.

Author: Andres Freund
Reported-By: Andres Freund / valgrind / buildarm animal skink
Backpatch: 9.1-

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/185c3d00aac10cc333997fa808372bfcfdda6118

Modified Files
--------------
contrib/ltree/_ltree_gist.c  | 14 +++++++-------
contrib/ltree/_ltree_op.c    |  8 ++++----
contrib/ltree/ltree_gist.c   | 10 +++++-----
contrib/ltree/ltree_op.c     |  6 +++---
contrib/ltree/ltxtquery_io.c |  2 +-
5 files changed, 20 insertions(+), 20 deletions(-)


pgsql-committers by date:

Previous
From: Andres Freund
Date:
Subject: pgsql: ltree: Zero padding bytes when allocating memory for externally
Next
From: Andres Freund
Date:
Subject: Re: pgsql: ltree: Zero padding bytes when allocating memory for externally