tag 479698 patch
forwarded 479698 http://rt.perl.org/rt3/Public/Bug/Display.html?id=54934
close 483516
thanks

On Tue, May 27, 2008 at 10:16:31PM +0300, Niko Tyni wrote:
> On Tue, May 06, 2008 at 09:52:26AM +0200, Bastian Blank wrote:
> > Package: perl
> > Version: 5.10.0-9
> > Severity: important
> > 
> > Several tests of the svk package fails reproducible with several different
> > glibc internal "free" checks like "invalid pointer" or "corrupted 
> > double-linked
> > list". Many of the calls seems to go through swig, so maybe this problem is
> > located there.
> 
> > Maybe the following messages are connected:
> > | Attempt to free unreferenced scalar: SV 0x2083d30, Perl interpreter: 
> > 0x602010 at 
> > /home/bastian/debian/perl/svk/trunk/blib/lib/SVK/Command/Commit.pm line 555.
> > | Attempt to free unreferenced scalar: SV 0x2087d80, Perl interpreter: 
> > 0x602010 at 
> > /home/bastian/debian/perl/svk/trunk/blib/lib/SVK/Inspector/Root.pm line 82.
> > | Attempt to free unreferenced scalar: SV 0x20884a0, Perl interpreter: 
> > 0x602010 at /home/bastian/debian/perl/svk/trunk/blib/lib/SVK/XD.pm line 856.
> 
> FWIW, these messages are triggered by libperlio-via-dynamic-perl
> and show up in its test suite too. I looked into them a bit and just reported
> 
>  http://rt.perl.org/rt3/Public/Bug/Display.html?id=54934
> 
> but I'm quite sure that's not going to solve the real problem.

Note to self: don't be so sure next time.

This patch from the upstream ticket is enough to make the whole SVK test
suite pass for me. There's not much point in working around the bug in
PerlIO::via::dynamic anymore, so closing the cloned bug.
-- 
Niko Tyni   [EMAIL PROTECTED]
diff --git a/ext/PerlIO/via/via.xs b/ext/PerlIO/via/via.xs
index 5670887..c53e43c 100644
--- a/ext/PerlIO/via/via.xs
+++ b/ext/PerlIO/via/via.xs
@@ -89,7 +89,7 @@ PerlIOVia_method(pTHX_ PerlIO * f, char *method, CV ** save, int flags,
 	    if (!s->fh) {
 		GV *gv = newGVgen(HvNAME_get(s->stash));
 		GvIOp(gv) = newIO();
-		s->fh = newRV_noinc((SV *) gv);
+		s->fh = newRV((SV *) gv);
 		s->io = GvIOp(gv);
 	    }
 	    IoIFP(s->io) = PerlIONext(f);

Reply via email to