pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Heikki Linnakangas <heikki.linnakangas@iki.fi>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix yet more portability bugs in integerset and its tests.
Date: Fri, 22 Mar 2019 16:02:04 +0000
Message-ID: <E1h7McO-0007dD-Ag@gemulon.postgresql.org> (raw)

Fix yet more portability bugs in integerset and its tests.

There were more large constants that needed UINT64CONST. And one variable
was declared as "int", when it needed to be uint64. These bugs were only
visible on 32-bit systems; clearly I should've tested on one, given that
this code does a lot of work with 64-bit integers.

Also, in the test "huge distances" test, the code created some values with
random distances between them, but the test logic didn't take into account
the possibility that the random distance was exactly 1. That never actually
happens with the seed we're using, but let's be tidy.

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/b5fd4972a3bc758c0b8e8c9cd4aa32bacdeb6605

Modified Files
--------------
src/backend/lib/integerset.c                       | 12 ++++++------
src/test/modules/test_integerset/test_integerset.c |  7 +++++--
2 files changed, 11 insertions(+), 8 deletions(-)



Message-ID: <E1h7McO-0007dD-Ag@gemulon.postgresql.org>
Permalink:  ../E1h7McO-0007dD-Ag@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1h7McO-0007dD-Ag@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: heikki.linnakangas@iki.fi
  Subject: Re: pgsql: Fix yet more portability bugs in integerset and its tests.
  In-Reply-To: <E1h7McO-0007dD-Ag@gemulon.postgresql.org>
  References: <E1h7McO-0007dD-Ag@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