Re: PL/Perl Does not Like vstrings

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

On 01/04/2012 06:15 PM, David E. Wheeler wrote:
> [11:12pm]TonyC:theory: using sv_mortalcopy() instead of newSVsv()
> should prevent the leak in that workaround, assuming there's no
> FREETMPS between the call and use of the return value

That's the solution to leakiness I had in mind.

Tom said:

> 2. A slightly cleaner fix for this should be to duplicate the SV and
> then release the copy around the SvPVutf8 call, only if it's readonly.
> "Fixing" it in do_util_elog is entirely the wrong thing.

How do we tell if it's readonly?

cheers

andrew

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2012-01-05 01:32:20 Re: PL/Perl Does not Like vstrings
Previous Message Tom Lane 2012-01-05 00:15:25 Re: pg_restore direct to database is broken for --insert dumps