Skip Menu |

This queue is for tickets about the PerlIO-via-dynamic CPAN distribution.

Report information
The Basics
Id: 36260
Status: resolved
Priority: 0/
Queue: PerlIO-via-dynamic

People
Owner: Nobody in particular
Requestors: ntyni [...] iki.fi
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.12
Fixed in: (no value)



Subject: Memory corruption with Perl 5.10.0
Hi, as seen in the CPAN test reports <http://cpantesters.perl.org/show/SVK.html> and Debian bug #476968 <http://bugs.debian.org/479698>, the svk test suite is failing badly with Perl 5.10.0 due to memory corruption that leads to segmentation faults and the like. The logs are full of 'Attempt to free unreferenced scalar' messages, which I have traced into the PerlIO-via-dynamic module. The messages also show up in the module's own test suite, although it still passes. I have reported the messages as [perl #54934] <http://rt.perl.org/rt3/Public/Bug/Display.html?id=54934>,and they are apparently caused by this Perl change: Change 24966 by nicholas@ship-in-a-bottle on 2005/06/23 21:30:33 Remove the reference loop between symbol tables and typeglobs. Typeglobs now have a weak reference onto their symbol table. The attached patch to dynamic.pm removes the messages and makes the whole svk test suite pass here (while not breaking the module's own test suite, of course). Both of the changes are required; I don't feel qualified to say if this a viable workaround, but it seems to help. Many thanks for your work on free software, -- Niko Tyni ntyni@debian.org
From: ntyni [...] iki.fi
On Thu May 29 02:23:25 2008, ntyni@iki.fi wrote: Show quoted text
> The attached patch to dynamic.pm removes the messages and makes the > whole svk test suite pass here (while not breaking the module's own test > suite, of course). Both of the changes are required;
Oops, accidentally submitted too soon. Sorry. Both of the changes are required; removing the 'delete $PerlIO::via::{$leaf};' statement cleans up the messages but segmentation faults still remain. I haven't come up with a small test case for those yet, I'll report it in the Perl bug tracker when I do. -- Niko Tyni ntyni@debian.org
From 638dc8228c79519a2c410b5fcd8c149412f2fc0b Mon Sep 17 00:00:00 2001 From: Niko Tyni <ntyni@debian.org> Date: Thu, 29 May 2008 09:27:04 +0300 Subject: [PATCH] perl 5.10.0 workaround --- dynamic.pm | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/dynamic.pm b/dynamic.pm index 3f0fdc1..10f517b 100644 --- a/dynamic.pm +++ b/dynamic.pm @@ -165,10 +165,8 @@ sub DESTROY { for my $sym (keys %{$ref.'::'}) { undef ${$ref.'::'}{$sym} - if $sym; + if $sym and $sym !~ /GEN/; } - - delete $PerlIO::via::{$leaf}; } =head1 AUTHORS -- 1.5.5.1
Subject: Re: [rt.cpan.org #36260] AutoReply: Memory corruption with Perl 5.10.0
Date: Fri, 30 May 2008 20:17:19 +0300
To: Bugs in PerlIO-via-dynamic via RT <bug-PerlIO-via-dynamic [...] rt.cpan.org>
From: Niko Tyni <ntyni [...] iki.fi>
On Thu, May 29, 2008 at 02:23:26AM -0400, Bugs in PerlIO-via-dynamic via RT wrote: Show quoted text
> as seen in the CPAN test reports > <http://cpantesters.perl.org/show/SVK.html> and Debian bug #476968 > <http://bugs.debian.org/479698>, the svk test suite is failing badly > with Perl 5.10.0 due to memory corruption that leads to segmentation > faults and the like. > > I have reported the messages as [perl #54934] > <http://rt.perl.org/rt3/Public/Bug/Display.html?id=54934>
Show quoted text
> The attached patch to dynamic.pm removes the messages and makes the > whole svk test suite pass here (while not breaking the module's own test > suite, of course).
Update: the patch to via.xs in the abovementioned perl ticket fixes the whole issue here, so there's probably not much point in working around it unless you specifically want to get things working for Perl 5.10.0. Sorry for the noise, feel free to close this. Thanks again, -- Niko Tyni ntyni@debian.org
Thanks for the hard work looking into this. I've released 0.13 which applies the same ref added in the patch to core, for 5.10.0.