Re: Remove dependence on integer wrapping

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Joseph Koshakow <koshy44(at)gmail(dot)com>
Cc: Alexander Lakhin <exclusion(at)gmail(dot)com>, jian he <jian(dot)universality(at)gmail(dot)com>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>, Matthew Kim <matthewkmkim(at)gmail(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: Remove dependence on integer wrapping
Date: 2024-12-06 20:12:51
Message-ID: Z1NawwxfBgyWmBqC@nathan
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Dec 06, 2024 at 10:22:44AM -0600, Nathan Bossart wrote:
> On Thu, Dec 05, 2024 at 09:58:29PM -0600, Nathan Bossart wrote:
>> Thanks for reviewing. In v28, I fixed a silly mistake revealed by cfbot's
>> Windows run. I also went ahead and tried to fix most of the issues
>> reported in a nearby thread [0]. The only one I haven't tracked down yet
>> is the "ISO week" one (case 7).
>
> The overflow hazard for the ISO week case seems to be in isoweek2j(), which
> would require quite a bit of restructuring to work with the soft-error
> handling from its callers. I'm not feeling particularly inspired to do
> that, so here's a v29 with a comment added above that function.

I seem to have a knack for picking patches that take an entire afternoon to
back-patch... Here's what I have staged for commit early next week.

--
nathan

Attachment Content-Type Size
v30-0001-Fix-various-overflow-hazards-in-date-and-.patch.master text/plain 12.8 KB
v30-0001-Fix-various-overflow-hazards-in-date-and-tim.patch.v13 text/plain 13.1 KB
v30-0001-Fix-various-overflow-hazards-in-date-and-tim.patch.v14 text/plain 13.1 KB
v30-0001-Fix-various-overflow-hazards-in-date-and-tim.patch.v15 text/plain 13.1 KB
v30-0001-Fix-various-overflow-hazards-in-date-and-tim.patch.v16 text/plain 13.3 KB
v30-0001-Fix-various-overflow-hazards-in-date-and-tim.patch.v17 text/plain 13.2 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Davis 2024-12-07 00:31:11 inconsistent use of SearchSysCacheCopy
Previous Message Tom Lane 2024-12-06 18:51:48 Re: Giving the shared catalogues a defined encoding