This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Re: GCJ 3.3 LEAKS Throwable & Derived Classes
- From: Andrew Haley <aph at redhat dot com>
- To: David Daney <ddaney at avtrex dot com>
- Cc: "Craig A. Vanderborgh" <craigv at voxware dot com>, java at gcc dot gnu dot org
- Date: Sat, 19 Nov 2005 08:56:34 +0000
- Subject: Re: GCJ 3.3 LEAKS Throwable & Derived Classes
- References: <437ED1FD.7070803@voxware.com> <437ED9CB.6060908@avtrex.com>
David Daney writes:
> Craig A. Vanderborgh wrote:
> > Hello:
> >
> > We have just uncovered a really horrible problem with GCJ 3.3, on
> > multiple platforms (x86 linux, arm-wince-pe, ARM/linux).
> >
> > Instances of Throwable, and classes derived from it are leaked by
> > garbage collection, in the following way. The GC heap size is
> > unaffected, but the process virtual size/RSS reflects the leakage. Here
> > is a sample program that demonstrates the problem:
> >
> > class Catcher {
> > public static void main(String [] args) {
> > System.out.println("now in main");
> >
> > while (true) {
> > Exception foo = new Exception();
> > }
> > }
> > }
> >
>
> Most likely PR 12475
>
> The fix was applied to the 3.3 branch on 2004-06-22 18:21 by bryce.
>
> If you are using 3.3 you could probably safely upgrade to 3.3.6 which
> would include the patch.
More generally: minor point releases of the compiler are usually bug
fixes, so it's probably a good idea for everyone to use the most
recent release of 3.3.x.
Andrew.