[Bug libgcj/28178] New: jniEnv->DeleteLocalRef (null) fails

2006-06-27 Thread hakan dot hjort at gmail dot com
According to Sun documentation NULL is a allowed to call DeleteLocalRef() with
a NULL argument.  The GCJ jni implementation exits (Aborted) in this case.

From: http://java.sun.com/docs/books/jni/html/exceptions.html
6.1.2 A Utility Function
Passing NULL to DeleteLocalRef is a no-op, which is an appropriate action if
FindClass fails and returns NULL.


-- 
   Summary: jniEnv->DeleteLocalRef (null) fails
   Product: gcc
   Version: 4.0.2
Status: UNCONFIRMED
  Severity: normal
  Priority: P3
 Component: libgcj
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: hakan dot hjort at gmail dot com
GCC target triplet: i386-redhat-linux


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



[Bug libgcj/28178] jniEnv->DeleteLocalRef (null) fails

2006-06-27 Thread hakan dot hjort at gmail dot com


--- Comment #1 from hakan dot hjort at gmail dot com  2006-06-27 14:37 
---
Created an attachment (id=11760)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=11760&action=view)
Testcase FindClass on bad class + DeleteLocalRef

Build as
gcc delete_null.c -lgcj
Should have exit status 0 and print "OK: exception pending".
I've tested it successfully using the Sun JVM.


-- 


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