pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jeff Davis <pgsql@j-davis.com>
Cc: pgsql-bugs@postgresql.org
Subject: Re: init_htab causes SIGFPE (or worse) due to miscalculation for large nbuckets
Date: Mon, 10 Dec 2012 21:19:07 -0500
Message-ID: <2050.1355192347@sss.pgh.pa.us> (raw)
In-Reply-To: <1355191549.15663.10.camel@sussancws0025>
References: <1355079715.3896.14.camel@jdavis>
	<18018.1355093132@sss.pgh.pa.us>
	<1355185776.13316.4.camel@sussancws0025>
	<1036.1355189242@sss.pgh.pa.us>
	<1355191549.15663.10.camel@sussancws0025>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

Jeff Davis <pgsql@j-davis.com> writes:
> On Mon, 2012-12-10 at 20:27 -0500, Tom Lane wrote:
>> That does seem like a good idea.  We need one for an int-sized result
>> too, to fix the original problem in init_htab.  So I propose these
>> functions:

> Looks good to me. One other corner case in the version of the patch I
> was working on was that nbuckets is compared to num_partitions, which is
> a long. We can assert that it is less than or equal to INT_MAX in
> hash_create.

> Aside from that, I'll drop my version of the patch, which doesn't have
> any useful differences from yours.

I hadn't gone any further than to code and test the functions I listed.
If you are working on a complete patch, please press on.

			regards, tom lane


-- 
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 (9+ messages)  latest in thread

Message-ID: <2050.1355192347@sss.pgh.pa.us>
Permalink:  ../2050.1355192347@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/2050.1355192347@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, pgsql@j-davis.com
  Subject: Re: init_htab causes SIGFPE (or worse) due to miscalculation for large nbuckets
  In-Reply-To: <2050.1355192347@sss.pgh.pa.us>
  References: <1355079715.3896.14.camel@jdavis> <18018.1355093132@sss.pgh.pa.us> <1355185776.13316.4.camel@sussancws0025> <1036.1355189242@sss.pgh.pa.us> <1355191549.15663.10.camel@sussancws0025> <2050.1355192347@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