Re: PL/Perl Does not Like vstrings - Mailing list pgsql-hackers

From Tom Lane
Subject Re: PL/Perl Does not Like vstrings
Date
Msg-id 14808.1325777666@sss.pgh.pa.us
Whole thread Raw
In response to Re: PL/Perl Does not Like vstrings  (Andrew Dunstan <andrew@dunslane.net>)
Responses Re: PL/Perl Does not Like vstrings
Re: PL/Perl Does not Like vstrings
List 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 by date:

Previous
From: Simon Riggs
Date:
Subject: Re: 16-bit page checksums for 9.2
Next
From: Tom Lane
Date:
Subject: Re: pg_restore direct to database is broken for --insert dumps