Re: PL/Perl Does not Like vstrings

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Andrew Dunstan <andrew(at)dunslane(dot)net>
Cc: "David E(dot) Wheeler" <david(at)justatheory(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/Perl Does not Like vstrings
Date: 2012-01-05 15:34:26
Message-ID: 14808.1325777666@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Andrew Dunstan <andrew(at)dunslane(dot)net> writes:
> On 01/04/2012 08:32 PM, Tom Lane wrote:
>> Andrew Dunstan<andrew(at)dunslane(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-01-05 15:44:28 Re: pg_restore direct to database is broken for --insert dumps
Previous Message Simon Riggs 2012-01-05 15:29:59 Re: 16-bit page checksums for 9.2