On Thursday 03 May 2007 18:04:48 chromatic wrote: > I'll debug the segfault and see if that reveals anything interesting. > > The shootout tests are dodgy anyway sometimes.
In this case, sorting the vtable functions put the init vtable method pointer in the middle of the _vtable struct, not at the start. The i386 and sun4 JIT operations looked for init as the first vtable method to use it as an offset into the struct. You can guess what happens when you not only get the wrong offset for the vtable method pointer you want but also dereference way past the end of the struct where you probably don't have a function pointer at all... KAPOW! Here's the fix (r18423), for fun: --- src/jit/sun4/jit_emit.h (revision 3381) +++ src/jit/sun4/jit_emit.h (local) @@ -849,7 +849,7 @@ int idx, pi, i; size_t offset; - offset = offsetof(VTABLE, init); + offset = offsetof(VTABLE, absolute); offset += nvtable * sizeof (void *); for (idx = 1; idx <= n; idx++) { I added some cleanup to the x86 file while I was tracing through it. -- c