From 9a2d7ae1c7439ba106b72304c54abe9cd6ce6b2e Mon Sep 17 00:00:00 2001 From: Reini Urban Date: Thu, 27 Jun 2019 07:58:33 +0200 Subject: [PATCH] WIP fix sigref stack corruption setting undef to the last stack element ($id here). see cperl #395. This is not the proper fix though. --- pp_hot.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pp_hot.c b/pp_hot.c index d9ed8b999c0..8b384f5651b 100644 --- a/pp_hot.c +++ b/pp_hot.c @@ -5845,8 +5845,12 @@ PP(pp_signature) argc--; DEBUG_Xv(Perl_deb(aTHX_ " sigref padp %p = argp %p\n", *padp, *argp)); /* copy back temp pad to old sv at leavesub */ +#if 0 /* [cperl #395] */ save_pushptrptr(argp, padp, SAVEt_SPTR); +#endif +#if 1 SvPADSTALE_on(*padp); /* mark our pad as inactive */ +#endif *padp++ = *argp++; /* and overwrite new pad with old sv */ actions >>= SIGNATURE_SHIFT; continue;