Re: Report a potential bug caused by a improper call to pfree()

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Report a potential bug caused by a improper call to pfree()
Дата
Msg-id 216147.1643556567@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Report a potential bug caused by a improper call to pfree()  (Julien Rouhaud <rjuju123@gmail.com>)
Ответы Re: Report a potential bug caused by a improper call to pfree()  (Kyotaro Horiguchi <horikyota.ntt@gmail.com>)
Список pgsql-bugs
Julien Rouhaud <rjuju123@gmail.com> writes:
> On Sun, Jan 30, 2022 at 10:47:18AM +0800, wliang@stu.xidian.edu.cn wrote:
>> 1160                 /* Pop the stack */
>> 1161                 parent = stack->parent;
>> 1162                 pfree(stack);
>>
>> I think it may be a potential bug and can be fixed without any side-effect as:
>>
>>
>> ++        if (stack != &tail)
>> 1162                pfree(stack);

> I don't think it's necessary, it should be guaranteed that something as been
> pushed on the tail, ie. there shouldn't be a WJB_END_* before a corresponding
> begin.

I've not checked the logic, but the lack of any reported crashes here
seems to confirm that there's no bug.

            regards, tom lane



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

Предыдущее
От: Julien Rouhaud
Дата:
Сообщение: Re: Report a potential bug caused by a improper call to pfree()
Следующее
От: "Ian R. Campbell"
Дата:
Сообщение: Missing include in float.h