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

Shenandoah: Strengthen the mark word check in string dedup

    XMLWordPrintable

Details

    • gc
    • b02

    Backports

      Description

        We need to avoid touching the age from a mark word that has a displaced header.

        This is because `oopDesc::age` is subtly racy: we read the mark, check it for displaced header, and then reach for the displaced header, reading the mark again. If stack unlock happened at the same time, we might be reading non-displaced mark the second time, which would fail the assert or even reach `fatal` in `markWord::displaced_mark_helper`. (We should really be reading the mark once there, see JDK-8309953)

        But it would be even easier to rectify the filtering in Shenandoah dedup to avoid going into oopDesc::age to begin with. This is easy, since we load the mark anyway.

        Attachments

          Issue Links

            Activity

              People

                shade Aleksey Shipilev
                shade Aleksey Shipilev
                Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: