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

_suspend_flags are not atomically updated in all cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • hs10
    • 7
    • hotspot
    • None
    • b06
    • generic, sparc
    • generic

        The recent fix for 6463133 (deopt should not use code patching) uses one bit of the _suspend_flags to indicate that deopt is necessary. However no concurrency controls are applied to the update of _suspend_flags, and so changes might be lost if multiple bits are modified concurrently.

        In the past the _suspend_flags contained a number of VM/Java-suspend related flags, and the async-exception flag was also stored there. Hence updates to the _suspend_flags were protected by acquiring the SR_lock (suspend/resume lock). With the demise of VM suspension, and the additional use of the "deopt" bit, these flags are now more general purpose "condition" flags and protecting updates with the SR_lock is no longer appropriate. Instead the _suspend_flags should be updated atomically using a compare-and-swap operation.

              dholmes David Holmes
              dholmes David Holmes
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: