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

[macosx] two JNI locals to delete in AWTWindow.m, CGraphicsEnv.m

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 8u92, 9
    • Fix Version/s: 9
    • Component/s: client-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b124
    • CPU:
      generic
    • OS:
      os_x

      Backports

        Description

        A JNI local is generally deleted when:

        1) the JNI method returns
        2) it's wrapped in PushLocalFrame/PopLocalFrame calls
        3) DeleteLocalRef is called

        The problem is that a JNI local can be created inside an endless message pump (then the 1st point doesn't work), or out of the push/pop block (2nd doesn't work). Then the only way to avoid its leaking is to delete it manually.

        (For instance, see JDK-8145984 where missed JNI locals caused memory leaks.)

        There're two more JNI locals to delete:

        - AWTWindow.m, sendEvent: platformWindow
        - CGraphicsEnv.m, displaycb_handle: graphicsEnv

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  ant Anton Tarasov
                  Reporter:
                  ant Anton Tarasov
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: