Re: [HACKERS] Regression tests on intel for 6.5.2

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [HACKERS] Regression tests on intel for 6.5.2
Дата
Msg-id 28004.938476013@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Regression tests on intel for 6.5.2  (Lamar Owen <lamar.owen@wgcr.org>)
Список pgsql-hackers
Lamar Owen <lamar.owen@wgcr.org> writes:
> In the course of building and testing the rpm's for 6.5.2, unexpected
> results were found in the regression testing.  I am curious as to what
> the results for 'float8' mean (geometry also failed, but it's obvious as
> to why):

I saw similar results with older Postgres releases on HPUX.  The problem
is failure to detect an invalid result from the exp() library function.
Unfortunately there's not complete uniformity about how to test that
on different platforms.

What's currently in dexp() in backend/utils/adt/float.c is

#ifndef finite
    errno = 0;
#endif
    *result = (float64data) exp(tmp);
#ifndef finite
    if (errno == ERANGE)
#else
    /* infinity implies overflow, zero implies underflow */
    if (!finite(*result) || *result == 0.0)
#endif
        elog(ERROR, "exp() result is out of range");

which is evidently doing the wrong thing on your platform.  What does
your man page for exp() say about error return conventions?

I suspect the assumption that finite() is always implemented as a macro
if it's present at all is the weak spot ... or it might be that your
math lib returns some other error code like EDOM ...

            regards, tom lane


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

Предыдущее
От: Lamar Owen
Дата:
Сообщение: Re: [HACKERS] Re: New init script and upgrade attempt: failed
Следующее
От: "Hiroshi Inoue"
Дата:
Сообщение: RE: [HACKERS] Re: IPC on win32 - additions for 6.5.2 and current trees