Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64 - Mailing list pgsql-committers

From Dave Page
Subject Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Date
Msg-id BANLkTimPoW34bbADmVvNW71-Q7F3OS3EYw@mail.gmail.com
Whole thread Raw
In response to Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Alvaro Herrera <alvherre@commandprompt.com>)
Responses Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-committers
On Thu, Apr 28, 2011 at 9:05 PM, Alvaro Herrera
<alvherre@commandprompt.com> wrote:
> Excerpts from Dave Page's message of jue abr 28 16:33:44 -0300 2011:
>
>> I think we may have to award Sun (or whats left of them) the "Bizarre
>> compiler bug of the week" award here. It's actually the val++; that's
>> causing the assertion, but I'm darned if I can get it to work. I've
>> tried spelling out the addition, casting, changing val to an int64*,
>> renaming val, and probably a dozen or so things that are broken, all
>> with no success.
>
> Err, val = val + 1?

That's what I meant by "spelling out the addition".

--
Dave Page
PostgreSQL Core Team
http://www.postgresql.org/

pgsql-committers by date:

Previous
From: Tom Lane
Date:
Subject: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Next
From: Tom Lane
Date:
Subject: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64