Fix off-by-one error in e92c6be8349ad1d36d6df1dcb526fd37421e9970.
Jan Dubois [Wed, 21 Oct 2009 18:07:35 +0000 (11:07 -0700)]
This solves the curious crashes in op/fork.t that I'm seeing on *some*
Windows machines.  After locating the problem I'm surprised that not
more machines run into these crashes, especially the smoke testers
running on Windows 2000.

sv.c

diff --git a/sv.c b/sv.c
index 0a27e1a..89825c6 100644 (file)
--- a/sv.c
+++ b/sv.c
@@ -12255,8 +12255,8 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
        PL_tmps_max             = proto_perl->Itmps_max;
        PL_tmps_floor           = proto_perl->Itmps_floor;
        Newx(PL_tmps_stack, PL_tmps_max, SV*);
-       sv_dup_inc_multiple(proto_perl->Itmps_stack, PL_tmps_stack, PL_tmps_ix,
-                           param);
+       sv_dup_inc_multiple(proto_perl->Itmps_stack, PL_tmps_stack,
+                           PL_tmps_ix+1, param);
 
        /* next PUSHMARK() sets *(PL_markstack_ptr+1) */
        i = proto_perl->Imarkstack_max - proto_perl->Imarkstack;