Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64

From: Dave Page <dpage(at)postgresql(dot)org>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-committers <pgsql-committers(at)postgresql(dot)org>
Subject: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Date: 2011-04-28 20:11:21
Message-ID: BANLkTimPoW34bbADmVvNW71-Q7F3OS3EYw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Thu, Apr 28, 2011 at 9:05 PM, Alvaro Herrera
<alvherre(at)commandprompt(dot)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/

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2011-04-28 20:30:10 Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Previous Message Tom Lane 2011-04-28 20:05:38 Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2011-04-28 20:30:10 Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Previous Message Tom Lane 2011-04-28 20:05:38 Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64