gnu.gcj.runtime.StackTrace.findCallerClass() (was Re: Patch: Remove exception catching from normal path in Arrays.equals.)
Andrew Haley
aph@redhat.com
Tue Sep 9 21:05:00 GMT 2003
Mohan Embar writes:
> >>If HAVE_BACKTRACE is not set, do not scan the stack but return null.
> >>
> >>If HAVE_BACKTRACE is set, we believe that backtrace() works. So,
> >>throw an exception if we don't find a caller.
> >>
> >>I await the firestorm...
> >
> >Um, I thought about this too but, you know the obviously glaring question
> >so can you pre-emptively answer it?
Sorry?
> P.S. If we agree that exception throwing is the right thing to do on
> platforms which support it, I'd much rather do something like deliberately
> dereference a null pointer in the non-HAVE_BACKTRACE case in order
> to trigger a clean failure and somewhat simulate the same calling
> semantics.
No, that's wrong because we want an Error and not an Exception.
Andrew.
More information about the Java-patches
mailing list