On Saturday 15 March 2008 05:48:09 [EMAIL PROTECTED] wrote:
> Author: petergibbs
> Date: Sat Mar 15 05:48:08 2008
> New Revision: 26390
>
> Modified:
> trunk/src/inter_call.c
>
> Log:
> Prevent overrun of array. Found using valgrind while chasing down tcl test
> failures on linux x86-64.
>
>
> Modified: trunk/src/inter_call.c
> ===========================================================================
>=== --- trunk/src/inter_call.c (original)
> +++ trunk/src/inter_call.c Sat Mar 15 05:48:08 2008
> @@ -1191,6 +1191,9 @@
> idx = st->dest.u.op.pc[i];
> store_arg(st, idx);
>
> + /* Don't walk off the end of the array */
> + if (i+1 >= st->dest.n)
> + continue;
> arg_sig = st->dest.sig = SIG_ITEM(st->dest.u.op.signature,
> i+1); if (arg_sig & PARROT_ARG_OPT_FLAG) {
> i++;
That explains some weirdness I saw, but I wonder if it's papering over
something else.
I couldn't explain *why* we were getting apparently invalid bytecode here, but
something I did made it go away for me.
-- c