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

Checked JNI pending exception check should be cleared when returning to Java frame

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u60, 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
    • Introduced In Version:
    • Resolved In Build:
      b138

      Description

      JDK-8043224 introduced a thread flag for warning the user when -Xcheck:jni should complain about native code not clearing or checking exceptions.

      Said flag should be implicitly cleared when returning to Java frame.

      That is, native code which makes a call normally requiring an exception check (e.g. calling Java method), does not need to check for exceptions if said code calls no other JNI API. Returning to Java frame should clear the pending check flag (for -Xcheck:jni warnings) and allow the exception to propagate to Java code as per normal.

      Without this fix, there are quite a number of false warnings produced by core-library native code, causing some noise during JVM testing and when users need -Xcheck:jni

        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: