On Fri, 2006-02-03 at 11:27 -0500, Doug Currie wrote:
> Friday, February 3, 2006, 3:52:36 AM, Nicolas Cannasse wrote:

> #define DoCall(this_arg,pc_args) \
> ...
>                 } else if( val_tag(acc) == VAL_PRIMITIVE ) { \
> fprintf(stderr, "c: %s\n", val_string(((vfunction*)acc)->module)); \
> 
> My latest attempt at gdb'ing lead to:
> 
> Program received signal SIGSEGV, Segmentation fault.
> 0x10007cd7 in neko_interp (vm=0x6f636124, m=0x7970, acc=0, pc=0x2b)
>     at vm/interp.c:649
> 649                     DoCall(vm->vthis,pc[-1]);
> (gdb) backtrace full
> #0  0x10007cd7 in neko_interp (vm=0x6f636124, m=0x7970, acc=0, pc=0x2b)

The pc variable is screwed?

        do_call:
        pc++;
>       DoCall(vm->vthis,pc[-1]);
        Next;
        Instr(ObjCall)

No doubt that pc[-1] is going to segfault with a value of 0x2b.

-- 
John Skaller <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to