In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/a420522db95b77620564c1be75cece4504eabef1?hp=a5b310e3129d1a2cd55b8d79445eb65964c997d1>
- Log ----------------------------------------------------------------- commit a420522db95b77620564c1be75cece4504eabef1 Author: Nicholas Clark <[email protected]> Date: Thu Feb 28 15:12:47 2013 +0100 Set PL_stderrgv to NULL if it is freed. Without this, it's possible to hit assertion failures when global destruction attempts to skip the PVIO for PL_stderrgv while cleaning up all objects. ----------------------------------------------------------------------- Summary of changes: sv.c | 2 ++ t/op/stash.t | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletions(-) diff --git a/sv.c b/sv.c index 727e283..09b180f 100644 --- a/sv.c +++ b/sv.c @@ -6257,6 +6257,8 @@ Perl_sv_clear(pTHX_ SV *const orig_sv) PL_last_in_gv = NULL; else if ((const GV *)sv == PL_statgv) PL_statgv = NULL; + else if ((const GV *)sv == PL_stderrgv) + PL_stderrgv = NULL; case SVt_PVMG: case SVt_PVNV: case SVt_PVIV: diff --git a/t/op/stash.t b/t/op/stash.t index 616853b..fd5450e 100644 --- a/t/op/stash.t +++ b/t/op/stash.t @@ -7,7 +7,7 @@ BEGIN { BEGIN { require "./test.pl"; } -plan( tests => 57 ); +plan( tests => 58 ); # Used to segfault (bug #15479) fresh_perl_like( @@ -63,6 +63,13 @@ package main; '', '', ); + # Variant of the above which creates an object that persists until global + # destruction. + fresh_perl_is( + 'use Exporter; package A; sub a { // }; %::=""', + '', + '', + ); } # now tests in eval -- Perl5 Master Repository
