List::Util tests give ‘Attempt to free unreferenced scalar’ warnings #10669
I�ve been seeing these warnings lately when running perl�s tests:
cpan/List-Util/t/first.........................................Attempt to free unreferenced scalar: SV 0x81f460, Perl interpreter: 0x800000 during global destruction.
cpan/List-Util/t/reduce........................................Attempt to free unreferenced scalar: SV 0x84fd50, Perl interpreter: 0x800000 during global destruction.
Is this a new bug in perl (maybe from something I committed) or a List::Util bug?
Site configuration information for perl 5.13.5:
Configured by sprout at Sun Sep 19 17:34:01 PDT 2010.
Summary of my perl5 (revision 5 version 13 subversion 5 patch v5.13.5-8-g8e58c70) configuration:
Locally applied patches:
@INC for perl 5.13.5:
Environment for perl 5.13.5:
On Sun, Sep 26, 2010 at 01:50:31PM -0700, Father Chrysostomos wrote:
I'm not seeing them, nor are the smokes. Can you bisect?
On Mon Sep 27 04:30:17 2010, davem wrote:
With PERL_DESTRUCT_LEVEL >= 1, PL_defstash is explicitly freed,
* it gets freed where you expect it to be
perl.c | 2 ++
diff --git a/perl.c b/perl.c index a04cfd6..860cdfc 100644 --- a/perl.c +++ b/perl.c @@ -1042,6 +1042,8 @@ perl_destruct(pTHXx) /* Prepare to destruct main symbol table. */ hv = PL_defstash; + /* break ref loop *:: <=> %:: */ + (void)hv_delete(hv, "main::", 6, G_DISCARD); PL_defstash = 0; SvREFCNT_dec(hv); SvREFCNT_dec(PL_curstname);
This seems to be a case of the â��it's more likely to flag up bugs related
It only gives this message under make test, not under harness, because
On Sun, Oct 03, 2010 at 01:06:30PM -0700, Father Chrysostomos wrote:
Indeed, that turns out to be the case. Fixed by the commit below.
Recursive MULTICALL prematurely freed CV
On Tue Oct 19 15:32:48 2010, davem wrote:
This sounds strikingly similar to #71076. Letâ��s see:
use List::Util 'first';
$ pbpaste|perl # 5.10.1
Is this something worth working around in List::Util? It would mean