pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <hlinnaka@iki.fi>
To: Peter Geoghegan <pg@bowt.ie>
Cc: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Sergey Koposov <skoposov@cmu.edu>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #14722: Segfault in tuplesort_heap_siftup, 32 bit overflow
Date: Wed, 12 Jul 2017 20:42:55 +0300
Message-ID: <3ab2dc21-8a01-aa00-8967-5cbfe92ae82c@iki.fi> (raw)
In-Reply-To: <CAH2-WzkqvpkJ6LYHaaZVUS_MwXsHBTOOEHdBE_hwQxzUqvoGbQ@mail.gmail.com>
References: <20170629161637.1478.93109@wrigleys.postgresql.org>
	<CAH2-Wz=wjX9ADNR6V6eoTqC0J0FZo+VxmU2PPryMJKjZW=8wxg@mail.gmail.com>
	<1499281579.8258.32.camel@cmu.edu>
	<28906.1499292236@sss.pgh.pa.us>
	<20170705221414.bgnw73z2mwkjwor7@alap3.anarazel.de>
	<3de75af4-a49f-36d1-347f-f170693ce6f5@iki.fi>
	<CAH2-WzkqvpkJ6LYHaaZVUS_MwXsHBTOOEHdBE_hwQxzUqvoGbQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 07/12/2017 08:16 PM, Peter Geoghegan wrote:
> On Wed, Jul 12, 2017 at 6:15 AM, Heikki Linnakangas <hlinnaka@iki.fi> wrote:
>> Another option to use "unsigned int", on the assumption that UINT_MAX >=
>> INT_MAX * 2 + 1. And to eliminate that assumption, we can use (UINT_MAX - 1)
>> / 2 as the maximum size of the memtuples array, rather than INT_MAX.
>
> FWIW, memtupcount is allowed to go negative.

Huh, say what?

- Heikki



-- 
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs



view thread (26+ messages)  latest in thread

Message-ID: <3ab2dc21-8a01-aa00-8967-5cbfe92ae82c@iki.fi>
Permalink:  ../3ab2dc21-8a01-aa00-8967-5cbfe92ae82c@iki.fi/
Also on:    postgresql.org/message-id/3ab2dc21-8a01-aa00-8967-5cbfe92ae82c@iki.fi

 · 

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-bugs@postgresql.org
  Cc: hlinnaka@iki.fi, pg@bowt.ie, andres@anarazel.de, tgl@sss.pgh.pa.us, skoposov@cmu.edu
  Subject: Re: BUG #14722: Segfault in tuplesort_heap_siftup, 32 bit overflow
  In-Reply-To: <3ab2dc21-8a01-aa00-8967-5cbfe92ae82c@iki.fi>
  References: <20170629161637.1478.93109@wrigleys.postgresql.org> <CAH2-Wz=wjX9ADNR6V6eoTqC0J0FZo+VxmU2PPryMJKjZW=8wxg@mail.gmail.com> <1499281579.8258.32.camel@cmu.edu> <28906.1499292236@sss.pgh.pa.us> <20170705221414.bgnw73z2mwkjwor7@alap3.anarazel.de> <3de75af4-a49f-36d1-347f-f170693ce6f5@iki.fi> <CAH2-WzkqvpkJ6LYHaaZVUS_MwXsHBTOOEHdBE_hwQxzUqvoGbQ@mail.gmail.com> <3ab2dc21-8a01-aa00-8967-5cbfe92ae82c@iki.fi>

* 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