diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-10-28 12:31:22 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-10-28 16:15:10 -0700 |
commit | f03015cd13f257d2f93b154f1f908d7d6cc407e0 (patch) | |
tree | 1e91c127a016408cdab2820b1db1a667dd3f3b2c /perl.c | |
parent | d772ce1c57f58378e1a6b87fd4a9693d6a50ee98 (diff) | |
download | perl-f03015cd13f257d2f93b154f1f908d7d6cc407e0.tar.gz |
Make PL_incgv fully refcounted
It was only reference-counted in the main thread:
$ ./perl -Ilib -e 'delete $::{INC}; eval q"my $foo : bar"'
$ ./perl -Ilib -e 'use threads; async {delete $::{INC}; eval q"my $foo : bar"}->join'
Assertion failed: (SvTYPE(_gvgp) == SVt_PVGV || SvTYPE(_gvgp) == SVt_PVLV), function S_apply_attrs_my, file op.c, line 2600.
Abort trap: 6
Diffstat (limited to 'perl.c')
-rw-r--r-- | perl.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -949,7 +949,6 @@ perl_destruct(pTHXx) PL_initav = NULL; /* shortcuts just get cleared */ - PL_incgv = NULL; PL_hintgv = NULL; PL_errgv = NULL; PL_argvoutgv = NULL; @@ -964,12 +963,14 @@ perl_destruct(pTHXx) PL_debstash = NULL; SvREFCNT_dec(PL_envgv); + SvREFCNT_dec(PL_incgv); SvREFCNT_dec(PL_argvgv); SvREFCNT_dec(PL_replgv); SvREFCNT_dec(PL_DBgv); SvREFCNT_dec(PL_DBline); SvREFCNT_dec(PL_DBsub); PL_envgv = NULL; + PL_incgv = NULL; PL_argvgv = NULL; PL_replgv = NULL; PL_DBgv = NULL; |