This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Small example of livelock regression in garbage collector for GCJ 3.3 under Win32
- From: Andrew Haley <aph at redhat dot com>
- To: Øyvind Harboe <oyvind dot harboe at zylin dot com>
- Cc: <java at gcc dot gnu dot org>
- Date: Tue, 20 May 2003 15:38:20 +0100
- Subject: Small example of livelock regression in garbage collector for GCJ 3.3 under Win32
- References: <001a01c31ea5$a37c5f20$73dea8c0@lair>
Øyvind Harboe writes:
> Ah!
>
> Finally I got to the bottom of this. I've managed to
> put together a small example that reproduces the
> problems I've been seeing. Hopefully this testcase
> is useful under Linux as well.
>
> Short version: GCJ 3.3 will eventually livelock if an
> exception is caused in a finalize method.
>
> Compile the program below. It will livelock under 3.3,
> with 3.2 it does not livelock.
I can not reproduce this with i686-linux-gnu. How long does it take?
What _exactly_ are the symptoms of this "livelock"?
There was a deadlock between exception handling and the garbage
collector, but Hans fixed that; AFAICR the fix went into gcc 3.3.
> Foobar xxx;
>
> class Foobar
> {
> public void urk()
> {
> };
>
> protected void finalize() throws Throwable
> {
> /* cause an exception */
> xxx.urk();
I take it that this is a null pointer exception. Presumably throwing
any exception here would do the same thing. Did you tyr?
Andrew.