Re: BUG #9223: plperlu result memory leak

Поиск
Список
Период
Сортировка
От Alex Hunsaker
Тема Re: BUG #9223: plperlu result memory leak
Дата
Msg-id CAFaPBrSpM+uhbe4J1ayQMAqj_Q0rvup=j0Y76WsSdfxpy_E7xw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: BUG #9223: plperlu result memory leak  (Sergey Burladyan <eshkinkot@gmail.com>)
Ответы Re: BUG #9223: plperlu result memory leak  (Sergey Burladyan <eshkinkot@gmail.com>)
Re: BUG #9223: plperlu result memory leak  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-bugs
On Tue, Feb 25, 2014 at 6:56 AM, Sergey Burladyan <eshkinkot@gmail.com> wrote:

> It looks like I found the problem, Perl use reference count and something that
> is called "Mortal" for memory management.  As I understand it, mortal is free
> after FREETMPS. Plperl call FREETMPS in plperl_call_perl_func() but after it,
> plperl ask perl interpreter again for new mortal SV variables, for example, in
> hek2cstr from plperl_sv_to_datum, and this new SV is newer freed.

So I think hek2cstr is the only place we leak (its the only place I
can see that allocates a mortal sv without being wrapped in
ENTER/SAVETMPS/FREETMPS/LEAVE).

Does the attached fix it for you?

Вложения

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Problem with PostgreSQL 9.2.7 and make check on AIX 7.1
Следующее
От: Peter Geoghegan
Дата:
Сообщение: Re: BUG #9342: CPU / Memory Run-away