Now, that is because we haven't implemented all the ops in the jit yet.
I'm planing to write the .jit files in this way:

Parrot_set_i_ic:
        asm
        {
                mov *INT_CONST[2], &INT_REG[1];
        }
        obj
        {
                \xc7 \x05 &INT_REG[1] *INT_CONST[2]
        }

Al least for debugging proposes right now.

Daniel Grunblatt.


On Tue, 25 Dec 2001, Rafael Kitover wrote:

> Hi all,
>
> I've noticed that on this system (Athlon 1ghz, Debian unstable, gcc3)
> certain example assembly programs, specfically: call, euclid, fact,
> life, mops_p, queens, stack and substr all segfault.
>
> Here is what I was able to find out, for the "substr" program, the
> following is part of the disassembly of the JIT-ized code, according to GDB:
>
> 0x80edc88:      push   %ebp
> 0x80edc89:      mov    %esp,%ebp
> 0x80edc8b:      movl   $0x1,0x80dc018
> 0x80edc95:      movl   $0x0,0x80dc014
> 0x80edc9f:      mov    0xbffff5d0,%eax
> 0x80edca4:      mov    %eax,0x80db720
> 0x80edca9:      push   $0x80ed930
> 0x80edcae:      pushl  0x80db720
> 0x80edcb4:      call   0x8057a60 <string_copy>
> 0x80edcb9:      mov    %eax,0x80e2014
> 0x80edcbe:      movl   $0x0,0x80dc01c
> 0x80edcc8:      movl   $0x0,0x80dc020
> 0x80edcd2:      add    %al,(%eax)
> 0x80edcd4:      movl   $0x1,0x80db724
> 0x80edcde:      mov    0x80e2018,%eax
> 0x80edce3:      mov    (%eax),%eax
> 0x80edce5:      mov    %eax,0x80db720
> 0x80edcea:      mov    0x80e2018,%eax
>
> Notice the instructions:
>
> 0x80edcde:      mov    0x80e2018,%eax
> 0x80edce3:      mov    (%eax),%eax
>
> This is where it dies, 0x80e2018 contains a zero, and (%eax) attempts to
> access it, segfault.
>
> Unfortunately I'm not 3l33t enough to read hex yet, maybe I'll write a
> little assembler for the .jit files? Or at least some sort of
> disassembly display tool :)
COOL.
>
> print "Merry $your_holiday\n"
>
> --
> Rafael Kitover
>
>


Reply via email to