Make PL_envgv refcounted
authorFather Chrysostomos <sprout@cpan.org>
Sat, 26 Oct 2013 23:51:23 +0000 (16:51 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 28 Oct 2013 23:15:08 +0000 (16:15 -0700)
commitcf93a474d4757162f972857eb69a670bf2aad44d
treee759def8e12853b2bbe2dab4eef0b668ec0068b6
parent8465ba45245d0c78b43d10c2436bd926a67c99e9
Make PL_envgv refcounted

Otherwise deleting $::{ENV} will make chdir crash:

$ perl -e 'delete $::{ENV}; chdir'
Segmentation fault: 11

This happens because PL_envgv points to a freed SV and GvHV(PL_envgv)
tries to access nonexistent fields.
perl.c
sv.c
t/op/magic.t