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

G1 Needs pre barrier on dereference of weak JNI handles

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P2
    • Resolution: Fixed
    • Affects Version/s: 9
    • Fix Version/s: 9
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b159
    • Verification:
      Verified

      Backports

        Description

        After discussions around possible weak reference object resurrection through Unsafe::getObjectVolatile it was realized that weak JNI handles suffer from the same problem.
        Code dereferencing a jweak must ensure that the oop is marked by SATB since the jweak may have been the only remaining reference to the object.

        Unfortunately the JNI spec allows jweak parameters in place of any jobject parameter to any JNI entry point so we would either need to be able to detect a jweak parameter or unconditionally ensure that all resolved objects are marked.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                kbarrett Kim Barrett
                Reporter:
                mgerdin Mikael Gerdin (Inactive)
                Votes:
                0 Vote for this issue
                Watchers:
                7 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: