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

2019-02-09 Thread Andres Freund
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

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

2019-01-31 Thread Michael Paquier
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

XLogInsert() of dangling pointer while logging replica identity

2019-01-31 Thread Stas Kelvich
Hi, hackers. 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. -- Stas Kelvich Postgres Professional: