JDK-6253381 : -Xcheck:jni JNI call made with exception pending should be a warning
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 5.0,6
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic,solaris
  • CPU: generic,sparc
  • Submitted: 2005-04-11
  • Updated: 2014-11-25
  • Resolved: 2006-03-24
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6
6 b40Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
A new -Xcheck:jni check was added in J2SE 5.0 which verifies
that we do not enter JNI while an exception is pending.   If
there is a pending exception and a customer is using -Xcheck:jni,
the VM will exit with a fatal error.

This check in general is a good idea, however since the introduction of
this check, we have encountered several instances in the J2SE libraries
and customer libraries where this condition is true.

The fact that the VM is exiting when this occurs is prohibiting the
continued checking of native code.  Most if not all cases that we've 
encuntered have been benign and it would have been more beneficial
to simply provide a warning and continue executing.


###@###.### 2005-04-11 17:19:48 GMT

Comments
Test nsk/regression/b6361259 was backported from vm 6 testbase into vm 5 testbase. It fails because java terminates with fatal error if JNI calls made with exception pending. This comment created for fails matching.
02-10-2012

EVALUATION Changed pending exception to warning, adding one more function NativeReportJNIWarning; ###@###.### 2005-05-30 11:50:45 GMT
30-05-2005