(or something)

The following program segfaults when run under JIT.

    .sub _main
        newsub P0, .Sub, _echo

        $S0 = "abcdefghij"

        savetop
        restoretop

        end
    .end

    .sub _echo
        print P5
        invoke P1
    .end

(note that I never call _echo, but the newsub is required to produce
the bug)

Strangely, it doesn't segfault when $S0 is set to "abcdefghi", or
anything of that length.  In that case, it will likely differ from
system to system.

I'm running i686 Linux under gcc version 3.2.2.  I have a modified
i386/jit_emit.h so it will (supposedly) work under this gcc which
looks like:

Index: jit_emit.h
===================================================================
RCS file: /cvs/public/parrot/jit/i386/jit_emit.h,v
retrieving revision 1.76
diff -r1.76 jit_emit.h
11c11
< #if defined HAVE_COMPUTED_GOTO && defined __GNUC__
---
> #if defined HAVE_COMPUTED_GOTO && defined __GNUC__ && 0

This fix has worked fine with JIT until now, so I suspect the problem
is elsewhere.

Luke

Reply via email to