This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: NullPointerException / threads
- To: Andrew Haley <aph at pasanda dot cygnus dot co dot uk>
- Subject: Re: NullPointerException / threads
- From: Tom Tromey <tromey at cygnus dot com>
- Date: Tue, 14 Mar 2000 10:00:07 -0800 (PST)
- Cc: java-discuss at sourceware dot cygnus dot com
- References: <20000314141401.7920.qmail@pasanda.cygnus.co.uk>
Andrew> When gcj first starts, we create a single NullPointerException
Andrew> which is thrown whenever a SEGV is caught by the runtime.
It seems like this will be a problem with arith exceptions and the
out-of-memory error too (the latter because it could be received by
two threads which would decide to call fillInStackTrace on it).
Andrew> I suppose we could create a NullPointerException and a
Andrew> pre-allocated stacktrace for each thread when it starts, but
Andrew> that seems rather nasty.
Are there other options?
It is nice to get the stack trace information, but maybe it isn't
always necessary. This would be more true if the debugger had better
exception handling support.
Some VMs create the stack trace lazily. I don't know how they do
this. Could we do it somehow?
Tom