This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: NullPointerException / threads


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]