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

Release JNI local references in get/set-InetXXAddress-member helper functions of net_util.c

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 17
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b15

      Description

      As per the Java Native Interface Specification: "All Java objects returned by JNI functions are local references." [1].

      The get/set-InetXXAddress-member helper functions in net_util.c retrieve a local reference to the internal `holder` before operating on the InetAddress object. These functions are used in many places by the native code, and should release any local references before returning.

      [1] https://docs.oracle.com/en/java/javase/16/docs/specs/jni/design.html#global-and-local-references

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              chegar Chris Hegarty
              Reporter:
              chegar Chris Hegarty
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: