New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Attempt to free unreferenced scalar fiddling with the symbol table #9351
Comments
From @ntyniThis is a bug report for perl from Niko Tyni <ntyni@debian.org>, As seen in <http://cpantesters.perl.org/show/PerlIO-via-dynamic.html>, The warnings are still there on blead @33937; bisecting shows the warnings 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 This snippet is the smallest I can make it. The original code deletes #!/usr/bin/perl Flags: Site configuration information for perl 5.10.0: Configured by Debian Project at Thu May 8 11:57:24 UTC 2008. Summary of my perl5 (revision 5 version 10 subversion 0) configuration: Locally applied patches: @INC for perl 5.10.0: Environment for perl 5.10.0: |
From @rgs2008/5/27 via RT Niko Tyni <perlbug-followup@perl.org>:
Good catch. I've traced the double-freed scalar; the patch below fixes Inline Patch--- ext/PerlIO/via/via.xs.orig 2008-01-25 10:00:53.000000000 +0100
+++ ext/PerlIO/via/via.xs 2008-05-30 14:43:11.000000000 +0200
@@ -89,7 +89,7 @@ PerlIOVia_method(pTHX_ PerlIO * f, const
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);
So what leaks is a gv generated to hold the "FOO" reference. (Its name |
The RT System itself - Status changed from 'new' to 'open' |
From alexmv@bestpractical.comOn Fri, 2008-05-30 at 14:55 +0200, Rafael Garcia-Suarez wrote:
This bug also causes segfaults in SVK under 5.10 and blead. Getting |
From @ntyniOn Fri, May 30, 2008 at 02:55:22PM +0200, Rafael Garcia-Suarez wrote:
I'm happy to report that the patch fixes all the numerous failures in http://cpantesters.perl.org/show/SVK.html#SVK-v2.0.2 Many thanks for looking at this. |
From @ntyniOn Fri, May 30, 2008 at 02:55:22PM +0200, Rafael Garcia-Suarez wrote:
Hi, I don't see this applied yet, hope it isn't falling through the cracks. Again, many thanks for looking at this. |
From @rgs2008/6/6 Niko Tyni <ntyni@debian.org>:
No. Nicholas commented on IRC that this apparently creates no link, |
From @rgs2008/5/30 Rafael Garcia-Suarez <rgarciasuarez@gmail.com>:
I've now applied this and bumped the version of PerlIO::via, so this Change 34025 by rgs@scipion on 2008/06/08 14:00:59 Fix for bug [perl #54934] Attempt to free unreferenced scalar Affected files ... ... //depot/perl/ext/PerlIO/via/via.pm#9 edit Differences ... ==== //depot/perl/ext/PerlIO/via/via.pm#9 (text) ==== @@ -1,5 +1,5 @@ ==== //depot/perl/ext/PerlIO/via/via.xs#17 (text) ==== @@ -89,7 +89,7 @@ |
@rgs - Status changed from 'open' to 'resolved' |
Migrated from rt.perl.org#54934 (status was 'resolved')
Searchable as RT54934$
The text was updated successfully, but these errors were encountered: