From: Tom Lane <tgl@sss.pgh.pa.us>
To: Alexander Lakhin <exclusion@gmail.com>
Cc: Richard Guo <guofenglinux@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17858: ExecEvalArrayExpr() leaves uninitialised memory for multidim array with nulls
Date: Tue, 21 Mar 2023 10:24:28 -0400
Message-ID: <1216375.1679408668@sss.pgh.pa.us> (raw)
In-Reply-To: <4240d86f-7e9f-388b-fd96-f8944860c0f5@gmail.com>
References: <17858-8fd287fd3663d051@postgresql.org>
<CAMbWs48CyDghUckGQbkbAB6uPdfzYS4X4Zkdfooausr5vaV9Bg@mail.gmail.com>
<4240d86f-7e9f-388b-fd96-f8944860c0f5@gmail.com>
Alexander Lakhin <exclusion@gmail.com> writes:
> I'm afraid that zeroing only bytes behind nitems bits is not enough, as outDatum() doesn't bother to calculate the exact
> size of nulls bitmap, it just outputs all bytes of a datum (40 bytes in that case):
In that case, won't padding bytes between array elements also create
issues? Seems like we have to just zero the whole array area, like
those other functions do.
regards, tom lane
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 using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, exclusion@gmail.com, guofenglinux@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #17858: ExecEvalArrayExpr() leaves uninitialised memory for multidim array with nulls
In-Reply-To: <1216375.1679408668@sss.pgh.pa.us>
* 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