This is the mail archive of the
mailing list for the GCC project.
Re: libjava gcc-3_0-branch, klass timing out in testsuite again
- To: Gordon Sadler <gbsadler1 at lcisp dot com>
- Subject: Re: libjava gcc-3_0-branch, klass timing out in testsuite again
- From: Jeff Sturm <jsturm at one-point dot com>
- Date: Sat, 5 May 2001 02:35:28 -0700 (PDT)
- cc: gcc at gcc dot gnu dot org, java at gcc dot gnu dot org
On Fri, 4 May 2001, Gordon Sadler wrote:
> For a more thorough look at what happenned for me on i686 last
> time, please see:
Your stack trace looks a lot like mine, minus line number information.
Clue #1 is that it aborts in clone(), but line 8 calls equals(),
not clone(). Clue #2 is that the class pointer (actually first word
of the vtable) doesn't point to a class at all.
That is, it behaves exactly as if these lines in Class.h do nothing:
// C++ ctors set the vtbl pointer to point at an offset inside the
// object. That doesn't work for Java, so this hack adjusts it back.
void *p = ((void **)this);
((void **)this) = (void *)((char *)p-2*sizeof (void *));
Rebuilding libjava with -fno-strict-aliasing is the quick fix:
PASS: klass compilation from source
PASS: klass execution from source compiled test
PASS: klass output from source compiled test
Can some C++ person comment on the code fragment above in terms of