Re: XLogInsert() of dangling pointer while logging replica identity

From: Andres Freund <andres(at)anarazel(dot)de>
To: Michael Paquier <michael(at)paquier(dot)xyz>
Cc: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XLogInsert() of dangling pointer while logging replica identity
Date: 2019-02-09 11:02:06
Message-ID: 20190209110206.zrih4xszrx7xbrtf@alap3.anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 2019-02-01 10:38:49 +0900, Michael Paquier wrote:
> On Thu, Jan 31, 2019 at 11:51:36PM +0300, Stas Kelvich wrote:
> > It seems that heapam.c:3082 calls XLogRegisterData() with an argument
> > allocated on stack, but following call to XLogInsert() happens after
> > end of context for that variable.
> > Issue spotted by clang's AddressSanitizer. Fix attached.
>
> Oh, good catch. Committed and back-patched down to 9.4.

Thanks Stas and Michael!

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Alexander Kuzmenkov 2019-02-09 11:26:03 Re: First-draft release notes for next week's releases
Previous Message Andres Freund 2019-02-09 11:01:47 Re: Documentation and code don't agree about partitioned table UPDATEs