Re: [Bug] Heap Use After Free in Window Aggregate Execution

Alvaro Herrera <alvherre@alvh.no-ip.org>

From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: David Rowley <dgrowleyml@gmail.com>
Cc: pgsql-hackers <pgsql-hackers@lists.postgresql.org>, "zlabs-cstore@zohocorp.com" <zlabs-cstore@zohocorp.com>, Jayesh Dehankar <jayesh.dp@zohocorp.com>
Date: 2024-12-05T17:08:08Z
Lists: pgsql-bugs, pgsql-hackers
Hello,

Adding David Rowley in CC.

On 2024-Nov-13, Jayesh Dehankar wrote:

> We have discovered a bug in PostgreSQL v16.3 related to a top-level
> window aggregate with a partition-by clause. The issue occurs when the
> run condition fails, causing the window aggregate status to change
> from WINDOWAGG_RUN to WINDOWAGG_PASSTHROUGH_STRICT mode. The bug is
> present in the latest STABLE branch.

David, what do you think about this?  The code in question was added by
your commits 9d9c02ccd1ae and a8583272218a, so I think you're the one
best prepared to handle this.

Thanks,

-- 
Álvaro Herrera               48°01'N 7°57'E  —  https://www.EnterpriseDB.com/



Commits

  1. Fix possible crash during WindowAgg evaluation

  2. Add missing word in comment