This is the mail archive of the java@gcc.gnu.org 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]
Other format: [Raw text]

Re: [re] Java executables can abort trying to access a null pointer in a leaf function


tsuraan writes:
 > > We can test that.  tsuraan, please replace that access via a null
 > > pointer with simply
 > >
 > >   throw new NullPointerException();
 > 
 > Ok, that prints out java.lang.NullPointerException rather than aborting.

The longer I look at this, the more bizarre it is.

I'm wondering if maybe _Jv_ThrowNullPointerException either has no
unwind info or its unwind info is not found.  That would do it.

Maybe no methods in libgcj can throw exceptions.  Try

StringBuffer.append(char[] data, int offset, int count) with something
out of bounds.  See if you can catch that.

If that works, see if something like native code 
FileChannelImpl.open (String, int) can throw a FileNotFoundException.

Andrew.


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