pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Matthew Kim <matthewkmkim@gmail.com>
Cc: Joseph Koshakow <koshy44@gmail.com>
Cc: jian he <jian.universality@gmail.com>
Cc: Alexander Lakhin <exclusion@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Cc: Andres Freund <andres@anarazel.de>
Subject: Re: Remove dependence on integer wrapping
Date: Tue, 6 Aug 2024 16:43:12 -0500
Message-ID: <ZrKY8PJwGg23eZ3R@nathan> (raw)
In-Reply-To: <CAGzNdfGMe8vK1BRvUmW29T7rkqUhM67t=wbgsCSDBu=T+rqZrw@mail.gmail.com>
References: <CAAvxfHfdPgtqFqsb=Nxa1oc6GsQ_U+k3rfneo-EjYG4bne_ksw@mail.gmail.com>
	<Zp54I4WMbWW6AQnP@nathan>
	<CAAvxfHdWseDnK0gLYY51fdw-_pE=5Q2=K=pToVv5jo3YNVfHoQ@mail.gmail.com>
	<Zp7Q4erYWVjtWzQr@nathan>
	<Zp7cwd_6NXlHt6Ye@nathan>
	<CAAvxfHeg0En5VV_9pjoHgd0kerK7REL84XEiS6=PUDOSKwx9rg@mail.gmail.com>
	<CACJufxERqAgy4YBwc2hLZY=hw1kD2m6AVD3=kyAen8=HeLsfmw@mail.gmail.com>
	<CAAvxfHeOdkaQXoca3W54=RZ6opCWLzqgmDM6s8GrUxKG1Tk+_g@mail.gmail.com>
	<ZqBzEucmgeib_6Fe@nathan>
	<CAGzNdfGMe8vK1BRvUmW29T7rkqUhM67t=wbgsCSDBu=T+rqZrw@mail.gmail.com>

On Wed, Jul 24, 2024 at 05:49:41PM -0400, Matthew Kim wrote:
> Hi, I´ve attached a patch that fixes the make_date overflow. I´ve upgraded
> the patches accordingly to reflect Joseph´s committed fix.

cfbot is unhappy with this one on Windows [0], and I think I see why.
While the patch uses pg_mul_s32_overflow(), it doesn't check its return
value, so we'll just proceed with a bogus value in the event of an
overflow.  Windows apparently doesn't have HAVE__BUILTIN_OP_OVERFLOW
defined, so pg_mul_s32_overflow() sets the result to 0x5eed (24,301 in
decimal), which is where I'm guessing the year -24300 in the ERROR is from.

[0] https://api.cirrus-ci.com/v1/artifact/task/5872294914949120/testrun/build/testrun/regress/regress/re...

-- 
nathan





view thread (85+ messages)  latest in thread

Message-ID: <ZrKY8PJwGg23eZ3R@nathan>
Permalink:  ../ZrKY8PJwGg23eZ3R@nathan/
Also on:    postgresql.org/message-id/ZrKY8PJwGg23eZ3R@nathan

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, matthewkmkim@gmail.com, koshy44@gmail.com, jian.universality@gmail.com, exclusion@gmail.com, tgl@sss.pgh.pa.us, pgsql-hackers@lists.postgresql.org, andres@anarazel.de
  Subject: Re: Remove dependence on integer wrapping
  In-Reply-To: <ZrKY8PJwGg23eZ3R@nathan>

* 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