Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8043224

-Xcheck:jni improvements to exception checking and excessive local refs

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b22
    • CPU:
      generic
    • OS:
      generic

      Backports

        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.

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  dsimms David Simms
                  Reporter:
                  dsimms David Simms
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  2 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: