Re: Patch to fix write after end of array in hashed agg initialization

From: Andrew Gierth <andrew(at)tao11(dot)riddles(dot)org(dot)uk>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Colm McHugh <colm(dot)mchugh(at)gmail(dot)com>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Patch to fix write after end of array in hashed agg initialization
Date: 2019-05-23 00:36:10
Message-ID: 87pnoac8ie.fsf@news-spur.riddles.org.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

>>>>> "Tom" == Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> 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.

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

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

I'll look into it.

--
Andrew (irc:RhodiumToad)

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-05-23 00:42:55 Re: with oids option not removed in pg_dumpall
Previous Message Michael Paquier 2019-05-23 00:11:33 Re: pg_dump throwing "column number -1 is out of range 0..36" on HEAD