Re: [PATCH] fix segfault with DO and plperl/plperlu

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PATCH] fix segfault with DO and plperl/plperlu
Дата
Msg-id 25378.1271618259@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PATCH] fix segfault with DO and plperl/plperlu  (Alex Hunsaker <badalex@gmail.com>)
Ответы Re: [PATCH] fix segfault with DO and plperl/plperlu
Список pgsql-hackers
Alex Hunsaker <badalex@gmail.com> writes:
> If you do:
> # DO $do$ 1; $do$ LANGUAGE plperlu;
> # DO $do$ 1; $do$ LANGUAGE plperl;

> You get a segfault as we try to SvREFCNT_dec(...); for the wrong
> interpreter.  To fix push down the restore_context() so that we do the
> above on the correct perl interpreter.

Hmm.  I don't see a segfault on my machine, but I agree that this looks
bogus.  I changed it to this order instead:
    if (desc.reference)        SvREFCNT_dec(desc.reference);    current_call_data = save_call_data;
restore_context(oldcontext);

so as to keep the "state restore" operations together.
        regards, tom lane


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

Предыдущее
От: Josh Kupershmidt
Дата:
Сообщение: Re: patch: Distinguish between unique indexes and unique constraints
Следующее
От: David Fetter
Дата:
Сообщение: Re: testing HS/SR - 1 vs 2 performance