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

Bypass intrinsic/barrier when calling Reference.get() from Finalizer

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P2 P2
    • 16
    • 11, 15, 16
    • core-libs
    • None
    • b24
    • generic
    • generic
    • Verified

      Finalizer calls Reference.get() from the Finalizer to acquire the finalizee. Concurrent reference processing GCs like Shenandoah and ZGC would return NULL for unreachable referents, and thus would not call finalize() on them.

      ZGC works around this by fixing the referent before enqueuing, so that the barrier would take the fast-path, but Shenandoah cannot do this.

            rkennke Roman Kennke
            rkennke Roman Kennke
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: