This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: gnu.gcj.runtime.StackTrace.findCallerClass() (was Re: Patch: Remove exception catching from normal path in Arrays.equals.)
- From: Mohan Embar <gnustuff at thisiscool dot com>
- To: Andrew Haley <aph at redhat dot com>, gnustuff at thisiscool dot com
- Cc: tromey at redhat dot com, java-patches at gcc dot gnu dot org
- Date: Tue, 09 Sep 2003 15:05:57 -0500
- Subject: Re: gnu.gcj.runtime.StackTrace.findCallerClass() (was Re: Patch: Remove exception catching from normal path in Arrays.equals.)
- Reply-to: gnustuff at thisiscool dot com
>>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?
>
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.
-- Mohan
http://www.thisiscool.com/
http://www.animalsong.org/