This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Make PL_hintgv refcounted
authorFather Chrysostomos <sprout@cpan.org>
Sun, 27 Oct 2013 12:52:09 +0000 (05:52 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Mon, 28 Oct 2013 23:15:08 +0000 (16:15 -0700)
commit4639d557ab77c475c9938688efe6b61bedcecf8b
treed83a6af6329a191f657806a0b4c1054d08b09583
parentd456e3f4aa9f137527feb9abf07e9111b6205786
Make PL_hintgv refcounted

Otherwise one can free it (by deleting the *^H glob) and
cause a crash:

$ perl -e 'delete $::{"\cH"}; ${^OPEN}=foo'
Segmentation fault: 11

That happens because PL_hintgv points to a freed scalar, and
GvHV(PL_hintgv) ends up trying to access nonexistent fields.
perl.c
sv.c
t/op/magic.t