This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
mg.c: Avoid reifying GV for undefined sig handler
authorFather Chrysostomos <sprout@cpan.org>
Tue, 16 Sep 2014 03:39:22 +0000 (20:39 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Tue, 16 Sep 2014 04:45:12 +0000 (21:45 -0700)
mg.c

diff --git a/mg.c b/mg.c
index 4ed7c7a..e18ec01 100644 (file)
--- a/mg.c
+++ b/mg.c
@@ -3125,7 +3125,9 @@ Perl_sighandler(int sig)
 
     if (!cv || !CvROOT(cv)) {
        const HEK * const hek = gv
-                          ? GvENAME_HEK(gv)
+                       ? GvENAME_HEK(gv)
+                       : cv && CvNAMED(cv)
+                          ? CvNAME_HEK(cv)
                           : cv && CvGV(cv) ? GvENAME_HEK(CvGV(cv)) : NULL;
        if (hek)
            Perl_ck_warner(aTHX_ packWARN(WARN_SIGNAL),