This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Fix bad assertions in pp_ctl.c:pp_caller
authorFather Chrysostomos <sprout@cpan.org>
Tue, 5 Jun 2012 03:36:39 +0000 (20:36 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 5 Jun 2012 03:36:39 +0000 (20:36 -0700)
commitd0279c7ce493b7237b2f252043db1926615bc800
tree3fde630a0a1a4ef8a8e9693544e23d13773a0269
parentc947b31cf1422f59c2ed95f6d3de272c2793a60c
Fix bad assertions in pp_ctl.c:pp_caller

If a stash is freed or undefined by code that it calls, then pp_caller
can encounter a freed stash or nameless stash.  HvNAME_HEK returns
null for a freed scalar and for a hash without a name.  So CopSTASHPV
will also be null in that case, which is expected.  If the hash is
undefined, it may not be SvOOK any more, and if it is freed it defi-
nitely won’t be.

The following code *does* assume, however that CopSTASH is non-null,
so assert that.
pp_ctl.c