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

Поиск
Список
Период
Сортировка
От Dave Page
Тема Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64
Дата
Msg-id BANLkTin_oy7biEEzhn6LvfMhvKqpgEhtAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-committers
On Thu, Apr 28, 2011 at 6:21 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> Excerpts from Tom Lane's message of mié abr 27 17:10:37 -0300 2011:
>>> Alvaro Herrera <alvherre@commandprompt.com> writes:
>>>> Apparently this change is causing Moa's SunStudio compiler to fail an
>>>> assertion.
>
>>> [ scratches head... ]  Hard to see why, there's nothing at all
>>> interesting in that code.
>
>> I agree, but it fails exactly in that code, and started to fail
>> immediately after that patch.
>
>> Maybe casting the 2 to int64 would fix it?
>
> I'm not excited about trying random code changes to dodge a compiler bug
> with a 24-hour turnaround time.  Dave, can you poke at this?

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.

Any other ideas?


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

В списке pgsql-committers по дате отправления:

Предыдущее
От: Andrew Dunstan
Дата:
Сообщение: pgsql: Add some casts to try to silence most of the remaining format wa
Следующее
От: Tom Lane
Дата:
Сообщение: Re: pgsql: Fix pg_size_pretty() to avoid overflow for inputs close to INT64