This is the mail archive of the
java-prs@gcc.gnu.org
mailing list for the Java project.
[Bug libgcj/35979] JNI method NewStringUTF crashes when passed a NULL pointer
- From: "tromey at gcc dot gnu dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: java-prs at gcc dot gnu dot org
- Date: 19 Apr 2008 19:55:06 -0000
- Subject: [Bug libgcj/35979] JNI method NewStringUTF crashes when passed a NULL pointer
- References: <bug-35979-12997@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #1 from tromey at gcc dot gnu dot org 2008-04-19 19:55 -------
>From your comment I assume that java-gnome is using the JNI NewStringUTF call.
This does not directly call _Jv_NewStringUTF. Instead, it calls
_Jv_JNI_NewStringUTF
(in jni.cc). That code wraps the call to _Jv_NewStringUTF in a
try...catch.
So, if this is crashing for you, something else is going wrong.
Ordinarily libgcj will turn the SEGV into a NullPointerException, which
should be handled by that try...catch.
If you have a minimal test case, I could take a look.
--
tromey at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |tromey at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35979