bug: extra four bytes between super/sub instance images, CNI not aware

Adam Megacz gcj@lists.megacz.com
Sun Apr 21 08:25:00 GMT 2002


Tom Tromey <tromey@redhat.com> writes:
> Adam, why are you using -fno-rtti?

http://gcc.gnu.org/java/faq.html#4_6
But I didn't realize that it's only required for pre-3.0 gcj's until
now.
> Bryce, does removing it affect your results? (It doesn't for me.)

Same results here too.
> Do the generated .h files look correct? Mine do.

Yes. The problem is that the Java side of the universe is putting four
empty bytes between the superclass's image and the subclass's
image. All Java-generated code seems to know about this gap, but CNI
code does not.
Could it be that the Java frontend is allocating space for an
enclosing-class pointer even though this is a *static* inner class
(which does not require an enclosing-class pointer)? Removing the
static keyword (and making associated changes) does not fix the bug,
though.
I don't know if we need to adjust gcjh to add the four-byte gap, or
change the Java frontend to remove the gap.
 - a
-- 
The web is dead; long live the Internet.
http://www.xwt.org/


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /