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

PopLocalFrame() should be safe to use when an exception is pending

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 6
    • solaris_11
    • hotspot
    • b71
    • generic
    • solaris_nevada

      The JNI PopLocalFrame() function isn't safe to use when an exception is pending, using it when the JVM is run with the "-verbose:jni -Xcheck:jni" flags set results in a fatal JVM error. The JNI documentation says it is necessary to check for exceptions after every JNI call that may throw an exception, and it also strongly recommends the use of PushLocalFrame/PopLocalFrame for local reference management. These two recommendations are pretty much in conflict because PopLocalFrame can't be called when an exception is pending.

      PopLocalFrame should be made pending-exception safe, like all the other JNI functions that can be used to free local references.

            ksrini Kumar Srinivasan
            alanbur Alan Burlison
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: