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

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Stas Kelvich <s(dot)kelvich(at)postgrespro(dot)ru>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: XLogInsert() of dangling pointer while logging replica identity
Date: 2019-02-01 01:38:49
Message-ID: 20190201013849.GB2179@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2019-02-01 01:49:17 Re: Don't wake up to check trigger file if none is configured
Previous Message David Rowley 2019-02-01 01:29:45 Re: Delay locking partitions during query execution