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

ZGC: Add on_weak load barrier verification

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 14
    • Component/s: hotspot
    • Labels:
    • Subcomponent:
      gc
    • Resolved In Build:
      b04

      Description

      We've had a few occasions where the ZGC C2 code generated on_weak barriers instead of on_strong. Usually, those bugs goes unnoticed. The problem arise when a load barrier is applied to a reference with the finalizable bit set (reachable through finalizer), during the resurrection window.

      I propose that we add some verification to ensure that on_weak barriers are only applied to java.lang.ref.Reference.referents.

      This verification code catches the bugs in JDK-8225770 and JDK-8227083.

        Attachments

          Activity

            People

            Assignee:
            stefank Stefan Karlsson
            Reporter:
            stefank Stefan Karlsson
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: