pgsql: Fix bug in calculations of hash join buckets.

From: Kevin Grittner <kgrittn(at)postgresql(dot)org>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Fix bug in calculations of hash join buckets.
Date: 2015-08-19 13:33:05
Message-ID: E1ZS3UH-0003hh-3t@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix bug in calculations of hash join buckets.

Commit 8cce08f168481c5fc5be4e7e29b968e314f1b41e used a left-shift
on a literal of 1 that could (in large allocations) be shifted by
31 or more bits. This was assigned to a local variable that was
already declared to be a long to protect against overruns of int,
but the literal in this shift needs to be declared long to allow it
to work correctly in some compilers.

Backpatch to 9.5, where the bug was introduced.

Report and patch by KaiGai Kohei, slighly modified based on
discussion.

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/24bf2ee22233244eb9e2c71de754b1c71258d004

Modified Files
--------------
src/backend/executor/nodeHash.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2015-08-19 15:51:02 pgsql: Update config.guess and config.sub
Previous Message Tom Lane 2015-08-18 23:23:01 pgsql: Fix a few bogus statement type names in plpgsql error messages.