From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: Антон Власов <druidvav@gmail.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16036: Segmentation fault while doing an update
Date: Thu, 03 Oct 2019 23:26:01 -0400
Message-ID: <11540.1570159561@sss.pgh.pa.us> (raw)
In-Reply-To: <20191004032020.se46diwqas43e3tw@alap3.anarazel.de>
References: <16036-28184c90d952fb7f@postgresql.org>
<4E1FB33C-7280-487B-B3D1-D3C247AA9E3D@anarazel.de>
<FBA5344D-9356-49BA-9B47-C3705C2E9481@gmail.com>
<A1695349-530C-4871-AED5-0262A9BC9920@anarazel.de>
<746398E3-F4E1-4F14-A686-3394F27011DC@gmail.com>
<20191004032020.se46diwqas43e3tw@alap3.anarazel.de>
Andres Freund <andres@anarazel.de> writes:
> So I think what we need to do is:
> 1) only call ExecCopySlot() if slot != newslot - this fixes the crash
> 2) Add an assert to ExecCopySlot() ensuring source and target slot are
> distinct
> 3) Figure out why our tests didn't catch this, this afaict should be a
> tested scenario
> 4) Fix confusing variable naming around newSlot/newslot in ExecBRUpdateTriggers
Maybe instead of 1+2, change ExecCopySlot like this:
- dstslot->tts_ops->copyslot(dstslot, srcslot);
+ if (dstslot != srcslot)
+ dstslot->tts_ops->copyslot(dstslot, srcslot);
That would fix other similar instances, not just this one caller.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, andres@anarazel.de, druidvav@gmail.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #16036: Segmentation fault while doing an update
In-Reply-To: <11540.1570159561@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox