ZGC: Add on_weak load barrier verification

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 14
    • Affects Version/s: None
    • Component/s: hotspot
    • gc
    • b04

      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.

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

              Created:
              Updated:
              Resolved: