This is the mail archive of the java-prs@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]

[Bug libgcj/35979] JNI method NewStringUTF crashes when passed a NULL pointer



------- Comment #3 from thomas dot g dot girard at free dot fr  2008-04-19 20:54 -------
You are absolutely right, thanks for pointing this out. The SIGSEGV gets
converted to an NPE.

But Sun's implementation does not throw an NPE. Please have a look at the
attached testcase. You can launch it using 'make JAVA=/path/to/sun/vm' to use a
different VM.

Outputs: 'Got: null' with Sun's VM, and 'Got: java.lang.NullPointerException'
with gij.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35979


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