Re: Patch to fix write after end of array in hashed agg initialization - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Patch to fix write after end of array in hashed agg initialization
Date
Msg-id 8040.1558537880@sss.pgh.pa.us
Whole thread Raw
In response to Patch to fix write after end of array in hashed agg initialization  (Colm McHugh <colm.mchugh@gmail.com>)
Responses Re: Patch to fix write after end of array in hashed agg initialization
List pgsql-hackers
Colm McHugh <colm.mchugh@gmail.com> writes:
> Attached is a patch for a write after allocated memory which we found in
> testing. Its an obscure case but can happen if the same column is used in
> different grouping keys, as in the example below, which uses tables from
> the regress test suite (build with --enable-cassert in order to turn on
> memory warnings). Patch is against master.

I confirm the appearance of the memory-overwrite warnings in HEAD.

It looks like the bad code is (mostly) the fault of commit b5635948.
Andrew, can you take a look at this fix?

            regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Teach pg_upgrade test to honor NO_TEMP_INSTALL
Next
From: Robert Haas
Date:
Subject: Re: "WIP: Data at rest encryption" patch and, PostgreSQL 11-beta3