pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Add missed bms_copy() in perform_pruning_combine_step
Date: Mon, 09 Apr 2018 13:59:03 +0000
Message-ID: <E1f5XK3-0004Em-QZ@gemulon.postgresql.org> (raw)

Add missed bms_copy() in perform_pruning_combine_step

We were initializing a BMS to merely reference an existing one, which
would cause a double-free (and a crash) when the recursive algorithm
tried to intersect it with an empty one.  Fix it by creating a copy at
initialization time.

Reported-by: sqlsmith (by way of Andreas Seltenreich)
Author: Amit Langote
Discussion: https://postgr.es/m/87in923lyw.fsf@ansel.ydns.eu

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/7ba6ee815dc90d4fab7226d343bf72aa28c9aa5c

Modified Files
--------------
src/backend/partitioning/partprune.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)



Message-ID: <E1f5XK3-0004Em-QZ@gemulon.postgresql.org>
Permalink:  ../E1f5XK3-0004Em-QZ@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1f5XK3-0004Em-QZ@gemulon.postgresql.org

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: alvherre@alvh.no-ip.org
  Subject: Re: pgsql: Add missed bms_copy() in perform_pruning_combine_step
  In-Reply-To: <E1f5XK3-0004Em-QZ@gemulon.postgresql.org>
  References: <E1f5XK3-0004Em-QZ@gemulon.postgresql.org>

* 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