Re: BUG #3860: xpath crashes backend when is querying xmlagg result

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: BUG #3860: xpath crashes backend when is querying xmlagg result
Дата
Msg-id 5395.1200023297@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: BUG #3860: xpath crashes backend when is querying xmlagg result  (Alvaro Herrera <alvherre@commandprompt.com>)
Список pgsql-bugs
Alvaro Herrera <alvherre@commandprompt.com> writes:
> Tom Lane escribi�:
>> One thing I was wondering about earlier today is whether libxml isn't
>> expecting NULL-return-on-failure from the malloc-substitute routine.
>> If we take control away from it unexpectedly, I wouldn't be a bit
>> surprised if its data structures are left corrupt.  This might lead to
>> failures during cleanup.

> Hmm, this is a very good point.  I quick look at the source shows that
> they are not very consistent on its own checking for memory allocation
> errors.  For example, see a bug I just reported:
> http://bugzilla.gnome.org/show_bug.cgi?id=508662

Ugh.  So we're pretty much damned if we do and damned if we don't.

Given what you showed, it is certain that we are at risk if we return
NULL, whereas it is merely hypothetical that we are at risk if we
longjmp.  So let's stick to the palloc infrastructure for now.

            regards, tom lane

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: BUG #3860: xpath crashes backend when is querying xmlagg result
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #3865: ERROR: failed to build any 8-way joins