JDK-8043224 : -Xcheck:jni improvements to exception checking and excessive local refs
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2014-05-15
  • Updated: 2017-12-10
  • Resolved: 2014-06-11
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 8 JDK 9
8u60Fixed 9 b22Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
Summary of enhancements to checked JNI after a number mail discussions and related bugs:

1) Checked JNI to enforce calling "ExceptionOccurred()" or "ExceptionOccurred()" after using "Call*Method()" functions, before using further JNI functions. Warn if exception check not carried out before calling a method that does not allow pending exceptions. Subtle difference to the current "there is a pending exception" check, does the programmer actual call one of the check functions.

2) If a JNI method implicitly grew the local ref capacity beyond what was planned for, warn the user. This of course excludes PushLocalFrame or EnsureLocalCapacity.