In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/768cd71466d5db450300d1eb0e7a7d9f9b6e0894?hp=a2d725a2585df47821024d25ea39e658a50b9db4>
- Log ----------------------------------------------------------------- commit 768cd71466d5db450300d1eb0e7a7d9f9b6e0894 Author: Lukas Mai <[email protected]> Date: Mon Dec 1 20:56:25 2014 +0100 use more STATIC_ASSERT M sv.c commit 64c909d3055a7d5436012fab51eb1c046088140a Author: Daniel Dragan <[email protected]> Date: Mon Dec 1 12:43:16 2014 -0500 fix segv for psudofork duping of SAVEt_GP_ALIASED_SV op/fork.t test 6 that contains "@a = (1..3);" will crash on Win32 with special debugging heap and race condition rarely crash otherwise. Refcnt mistake is from commit ff2a62e0c8 . See perl #40565 for details. M sv.c ----------------------------------------------------------------------- Summary of changes: sv.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/sv.c b/sv.c index 7384221..d1a01c5 100644 --- a/sv.c +++ b/sv.c @@ -9392,7 +9392,7 @@ Perl_newSVuv(pTHX_ const UV u) /* We're starting from SVt_FIRST, so provided that's * actual 0, we don't have to unset any SV type flags * to promote to SVt_IV. */ - assert(SVt_FIRST == 0); + STATIC_ASSERT_STMT(SVt_FIRST == 0); SET_SVANY_FOR_BODYLESS_IV(sv); SvFLAGS(sv) |= SVt_IV; @@ -9447,7 +9447,7 @@ Perl_newRV_noinc(pTHX_ SV *const tmpRef) /* We're starting from SVt_FIRST, so provided that's * actual 0, we don't have to unset any SV type flags * to promote to SVt_IV. */ - assert(SVt_FIRST == 0); + STATIC_ASSERT_STMT(SVt_FIRST == 0); SET_SVANY_FOR_BODYLESS_IV(sv); SvFLAGS(sv) |= SVt_IV; @@ -14207,11 +14207,13 @@ Perl_ss_dup(pTHX_ PerlInterpreter *proto_perl, CLONE_PARAMS* param) ptr = POPPTR(ss,ix); TOPPTR(nss,ix) = parser_dup((const yy_parser*)ptr, param); break; - case SAVEt_GP_ALIASED_SV: - ptr = POPPTR(ss,ix); - TOPPTR(nss,ix) = gp_dup((GP *)ptr, param); - ((GP *)ptr)->gp_refcnt++; + case SAVEt_GP_ALIASED_SV: { + GP * gp_ptr = POPPTR(ss,ix); + GP * new_gp_ptr = gp_dup(gp_ptr, param); + TOPPTR(nss,ix) = new_gp_ptr; + new_gp_ptr->gp_refcnt++; break; + } default: Perl_croak(aTHX_ "panic: ss_dup inconsistency (%"IVdf")", (IV) type); -- Perl5 Master Repository
