This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
RE: GCJ Bug accessing field of inner class (gcc version 2.97 20010117)
- To: "'Mark Wielaard'" <mark at klomp dot org>, Barnet Wagman <wagman at enteract dot com>
- Subject: RE: GCJ Bug accessing field of inner class (gcc version 2.97 20010117)
- From: "Boehm, Hans" <hans_boehm at hp dot com>
- Date: Fri, 19 Jan 2001 10:38:14 -0800
- Cc: java-discuss at sources dot redhat dot com
The "Out of Memory" message is a warning from inside the garbage collector.
I believe it means what it says, though that might be caused by an absurdly
large memory request. However, this information should also subsequently be
turned into an exception. (Ideally, there should be a Java API for turning
off such warning messages. Currently, I believe there is only a C level
API.)
Hans
> -----Original Message-----
> From: Mark Wielaard [mailto:mark@klomp.org]
> Sent: Friday, January 19, 2001 3:13 AM
> To: Barnet Wagman
> Cc: java-discuss@sources.redhat.com
> Subject: Re: GCJ Bug accessing field of inner class (gcc version 2.97
> 20010117)
>
>
> On Thu, Jan 18, 2001 at 09:56:23PM -0600, Barnet Wagman wrote:
> > GCJ appears to be unable to access the field of an inner class from
> > within a different class. Here's a simple example:
> > [...]
> >
> > After compiling with gcj, gcc version 2.97 20010117 (experimental),
> > running it yields
> >
> > In HasInnerClass(), ic0.s = A
> > stringggggggggggggggggggggggggggggggggggggggg
> > Out of Memory! Returning NIL!
> >
> > instead of
> >
> > In HasInnerClass(), ic0.s = A
> > stringggggggggggggggggggggggggggggggggggggggg
> > In UsesInnerClass(), hic.ic0.s = A
> > stringggggggggggggggggggggggggggggggggggggggg
> >
> >
> > Is this a known bug?
>
> I am using 'gcc version 2.97 20010117 (experimental) from CVS
> and everything works for me:
>
> $ gcj --main=A.UsesInnerClass A/HasInnerClass.java
> A/UsesInnerClass.java
> $ ./a.out
> In HasInnerClass(), ic0.s = A
> stringggggggggggggggggggggggggggggggggggggggg
> In UsesInnerClass(), hic.ic0.s = A
> stringggggggggggggggggggggggggggggggggggggggg
>
> I have no idea where that 'Out of Memory! Returning NIL!' is
> coming from
> that you see when running the program.
>
> Cheers,
>
> Mark
>