Re: PL/Perl Does not Like vstrings
От | Tom Lane |
---|---|
Тема | Re: PL/Perl Does not Like vstrings |
Дата | |
Msg-id | 14808.1325777666@sss.pgh.pa.us обсуждение исходный текст |
Ответ на | Re: PL/Perl Does not Like vstrings (Andrew Dunstan <andrew@dunslane.net>) |
Ответы |
Re: PL/Perl Does not Like vstrings
Re: PL/Perl Does not Like vstrings |
Список | pgsql-hackers |
Andrew Dunstan <andrew@dunslane.net> writes: > On 01/04/2012 08:32 PM, Tom Lane wrote: >> Andrew Dunstan<andrew@dunslane.net> writes: >>> How do we tell if it's readonly? >> SvREADONLY(sv) macro. > but it doesn't fix the one I found which passes a typeglob to elog(): > do '$foo=1; elog(NOTICE,*foo);' language plperl; Mmm, I was wondering about that one. > That still crashes, but doesn't if we use sv_mortalcopy unconditionally. Unconditional sv_mortalcopy sounds like the thing to do then, but a comment would help. And if this isn't a Perl bug, I would like to know what is. BTW, shouldn't we be making some attempt to drop the result of the sv_mortalcopy? Or is it just assumed that it will be garbage-collected before the memory leak gets too bad? regards, tom lane
В списке pgsql-hackers по дате отправления: