Make inlined &CORE::__SUB__ the right-sized op
authorFather Chrysostomos <sprout@cpan.org>
Sun, 27 Nov 2011 00:58:56 +0000 (16:58 -0800)
committerFather Chrysostomos <sprout@cpan.org>
Sun, 27 Nov 2011 01:06:13 +0000 (17:06 -0800)
In commit 1a35f9ffb I forgot to make an inlined OP_RUNCV op a PVOP in
ck_entersub_args_core (which inlines a &CORE::sub).

This caused crashes on Linux, but not on OS X, for some reason.

op.c

diff --git a/op.c b/op.c
index f3088ed..1ed3dae 100644 (file)
--- a/op.c
+++ b/op.c
@@ -9440,7 +9440,9 @@ Perl_ck_entersub_args_core(pTHX_ OP *entersubop, GV *namegv, SV *protosv)
                    (void)too_many_arguments(aop, GvNAME(namegv));
                op_free(aop);
            }
-           return newOP(opnum,0);
+           return opnum == OP_RUNCV
+               ? newPVOP(OP_RUNCV,0,NULL)
+               : newOP(opnum,0);
        default:
            return convert(opnum,0,aop);
        }