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

Martin Kahlert martin.kahlert@infineon.com
Sun Apr 21 23:17:00 GMT 2002


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.


More information about the Java mailing list

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