Re: [PATCH] Make gram.y use palloc/pfree for memory management
В списке pgsql-hackers по дате отправления:
| От | Tom Lane |
|---|---|
| Тема | Re: [PATCH] Make gram.y use palloc/pfree for memory management |
| Дата | |
| Msg-id | 5621.1220388193@sss.pgh.pa.us обсуждение исходный текст |
| Ответ на | Re: [PATCH] Make gram.y use palloc/pfree for memory management ("Marko Kreen" <markokr@gmail.com>) |
| Список | pgsql-hackers |
"Marko Kreen" <markokr@gmail.com> writes:
> On 9/1/08, Marko Kreen <markokr@gmail.com> wrote:
>> First a correction, overriding malloc/free seems dangerous they
>> seems to leak out, so correct would be to use YYMALLOC/YYFREE.
>> This leaves 1.875 potentially leaking, but danger seems small.
> Here is the safer patch. As the chance for the leak is rare,
> leaving 1.875 vulnerable should not be problem.
Actually, 1.875 appears to default to using alloca() when available,
so the issue doesn't even arise if you're building with gcc. (This
is probably why I'd never noticed a problem in this area.)
I thought that we might have an issue with flex as well, but so far as
I can tell there's no real problem given our current usage style for
the lexers.
Applied to all the backend .l files ...
regards, tom lane
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера