From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 31816 invoked by alias); 19 Apr 2008 20:55:00 -0000 Received: (qmail 31534 invoked by uid 48); 19 Apr 2008 20:54:16 -0000 Date: Sat, 19 Apr 2008 20:55:00 -0000 Message-ID: <20080419205416.31533.qmail@sourceware.org> X-Bugzilla-Reason: CC References: Subject: [Bug libgcj/35979] JNI method NewStringUTF crashes when passed a NULL pointer In-Reply-To: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "thomas dot g dot girard at free dot fr" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2008-04/txt/msg01359.txt.bz2 ------- 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