Re: [PATCH 1/3] Fix x + y < x overflow checks - Mailing list pgsql-hackers

From Robert Haas
Subject Re: [PATCH 1/3] Fix x + y < x overflow checks
Date
Msg-id CA+TgmoYoOexFwRrewLcFvr+=J7b8hkdodRXS_Zp+j_vAXa1spA@mail.gmail.com
Whole thread Raw
In response to [PATCH 1/3] Fix x + y < x overflow checks  (Xi Wang <xi.wang@gmail.com>)
List pgsql-hackers
On Thu, Jan 24, 2013 at 4:36 AM, Xi Wang <xi.wang@gmail.com> wrote:
> icc optimizes away the overflow check x + y < x (y > 0), because
> signed integer overflow is undefined behavior in C.  Instead, use
> a safe precondition test x > INT_MAX - y.

As you post these patches, please add them to:

https://commitfest.postgresql.org/action/commitfest_view/open

This will ensure that they (eventually) get looked at.

-- 
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company



pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Event Triggers: adding information
Next
From: Peter Eisentraut
Date:
Subject: Re: autovacuum not prioritising for-wraparound tables