Re: PG crash on simple query, story continues

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: PG crash on simple query, story continues
Дата
Msg-id 25590.1057689893@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: PG crash on simple query, story continues  ("Maksim Likharev" <mlikharev@aurigin.com>)
Список pgsql-general
"Maksim Likharev" <mlikharev@aurigin.com> writes:
>             ! I would say very interesting aproach,
>             ! why not just
>         xfrmsize = strxfrm(xfrmstr, NULL, 0);

strxfrm doesn't work that way (and if it did, it would give back a
malloc'd not a palloc'd string).

>         !if error happend, xfrmlen will be (size_t)-1

No it won't; see the man page for strxfrm.

This does raise an interesting thought though: what platform are you on?
It seems to me that we've heard of buggy versions of strxfrm that write
more bytes than they're allowed to, thereby clobbering palloc's data
structures.

            regards, tom lane

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

Предыдущее
От: Richard Welty
Дата:
Сообщение: Re: Is Postgres broken in Red Hat 9?
Следующее
От: Tom Lane
Дата:
Сообщение: Re: SQL Functions and plan time