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

ZGC: Add on_weak load barrier verification

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 14
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: