develooper Front page | perl.perl5.porters | Postings from January 2012

[perl #108994] certain objects crash SvPVutf8()

Thread Previous | Thread Next
From:
bulk 88 via RT
Date:
January 25, 2012 09:28
Subject:
[perl #108994] certain objects crash SvPVutf8()
Message ID:
rt-3.6.HEAD-14510-1327512503-327.108994-15-0@perl.org
On Tue Jan 24 21:35:37 2012, sprout wrote:
> Even if one works around the errors/crashes, what it’s doing is just
> wrong, so I would suggest this (which SvPVutf8 itself *should* be doing):
> 
> if ((SvTHINKFIRST(sv) && !SvIsCOW(sv)) || isGV_with_GP(sv))
>     sv = sv_mortalcopy(sv);
> 
> That will prevent SvPVutf8 from making any user-visible changes to sv.
> 

"Using Perl to Dispose of Temporaries" in perlcall, wouldn't your
proposal leak?

---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=108994

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About