This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: bug: extra four bytes between super/sub instance images, CNI not aware
- From: Martin Kahlert <martin dot kahlert at infineon dot com>
- To: Adam Megacz <gcj at lists dot megacz dot com>
- Cc: java at gcc dot gnu dot org
- Date: Mon, 22 Apr 2002 07:22:41 +0200
- Subject: Re: bug: extra four bytes between super/sub instance images, CNI not aware
- References: <86vgangp3v.fsf@megacz.com> <87it6nyxhg.fsf@creche.redhat.com> <86n0vxcf04.fsf@megacz.com>
- Reply-to: martin dot kahlert at infineon dot com
Hi Adam,
On Sun, Apr 21, 2002 at 07:17:47AM -0700, Adam Megacz wrote:
>
> Tom Tromey <tromey@redhat.com> writes:
> > Adam> Can somebody confirm that this is a bug? The program below
> > Adam> prints out "0" rather than "3". Closer inspection reveals that
> > Adam> foo() is looking at a memory location four bytes less than wher
> > Adam> y is. This behavior occurs on both Win32 and Linux.
>
> > This works for me on Linux. I'm running a new gcj.
>
> Works == 0 or works == 3?
>
> If it prints '0', it's broken.
Note: I produced the class files by gcj -C test.java instead of jikes.
$ gcj -v
Reading specs from /sw/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Reading specs from
/sw/gcc-3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc-20020415/configure --prefix=/sw/gcc-3.1
--enable-languages=f77,c++,java --disable-threads --enable-shared=libstdc++
Thread model: single
gcc version 3.1 20020415 (prerelease)
$ ./a.out
3
The same on solaris:
$ gcj -v
Reading specs from
/data/titan_1/kahlert/gcc-3.1/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1/specs
Reading specs from
/data/titan_1/kahlert/gcc-3.1/lib/gcc-lib/sparcv9-sun-solaris2.7/3.1/../../../libgcj.spec
rename spec lib to liborig
Configured with: ../gcc-20020415/configure
--prefix=/data/titan_1/kahlert/gcc-3.1 --enable-languages=c++,f77,java
--with-as=/usr/ccs/bin/as --with-ld=/usr/ccs/bin/ld --disable-threads
--disable-shared
Thread model: single
gcc version 3.1 20020415 (prerelease)
$ a.out
0
Hope that helps
Martin.
--
The early bird catches the worm. If you want something else for
breakfast, get up later.