summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-02-28 15:12:47 +0100
committerNicholas Clark <nick@ccl4.org>2013-03-06 10:03:13 +0100
commita420522db95b77620564c1be75cece4504eabef1 (patch)
tree098d005ce58a0a5d589c1851d3db759d49d80ff4 /sv.c
parenta5b310e3129d1a2cd55b8d79445eb65964c997d1 (diff)
downloadperl-a420522db95b77620564c1be75cece4504eabef1.tar.gz
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.
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sv.c b/sv.c
index 727e283112..09b180ff31 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: