On Sun, Oct 13, 2002 at 11:08:02PM +0100, Nicholas Clark wrote: > On Sun, Oct 13, 2002 at 03:06:48AM -0700, Steve Fink wrote: > > On Fri, Oct 11, 2002 at 05:05:56PM -0700, Joe Wilson wrote: > > > Perhaps this is a known issue... > > > > > > Most parrot programs seem to crash on x86 when the latest CVS parrot > > > is compiled with "-O2" or "-g -O2" and when JIT is enabled. > > > The programs appear to run to completion and only crash prior to exitting. > > > Repeatable on both Cygwin and Linux x86. > > > When JIT is not used, everything is fine. > > > > Ugh. That was a hairy one to track down. I have committed a fix. The > > cause of the above problem was that the JIT was trampling over some > > x86 registers that are supposed to be callee-saved in the cdecl > > calling convention. By the time I finally figured that out, though, I > > had fixed several other pretty major bugs in the jit. > > I'm seeing this on x86 FreeBSD with the JIT:
Yes, I get this also. I was trying to figure out how to properly use TODO or SKIP or something to suppress this, but none of them worked quite right -- it would say that the failed test was a TODO, but it still counted it as a failure. Locally, I am using the following (incorrect) patch. Could someone who understands this better do it the right way? The problem is that the JIT doesn't support tracing. I could imagine ways of fixing this -- make it drop into a non-JIT core if tracing is turned on, or generate another JITed version of the program with calls to the trace function after every op and switch to that version when tracing is on -- but unless somebody really feels the urge to work on it, I think the best thing to do is to make it either a TODO or SKIP. Index: t/op/interp.t =================================================================== RCS file: /cvs/public/parrot/t/op/interp.t,v retrieving revision 1.6 diff -p -u -r1.6 interp.t --- t/op/interp.t 22 Sep 2002 01:05:31 -0000 1.6 +++ t/op/interp.t 14 Oct 2002 00:40:33 -0000 @@ -18,7 +18,21 @@ In 2 ending OUTPUT -output_like(<<'CODE', <<'OUTPUT', "restart trace"); +# I couldn't figure out how to use TODO correctly. +my $expected = <<'OUTPUT'; +/^ok\s1\n +(?:PC=8.*)?\n +ok\s2\n +(?:PC=11.*)?\n +(?:PC=13.*)?\n +ok\s3\n$/x +OUTPUT +if ($ENV{TEST_PROG_ARGS} =~ /-j/) { + $expected = '/'; + $expected .= "ok\\s$_\\n" for 1..3; + $expected .= '/'; +} +output_like(<<'CODE', $expected, "restart trace"); print 2, "ok 1\n" set I0, 1 trace I0 @@ -28,12 +42,5 @@ output_like(<<'CODE', <<'OUTPUT', "resta print 2, "ok 3\n" end CODE -/^ok\s1\n -(?:PC=8.*)?\n -ok\s2\n -(?:PC=11.*)?\n -(?:PC=13.*)?\n -ok\s3\n$/x -OUTPUT 1;