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

Racy updates when releasing confined scopes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • None
    • repo-panama
    • tools

      A confined scope, even if it can only be acquired by the same thread as the owner thread, can still be released by different threads. This can happen in two cases:

      1. the confined scope is acquired by another confined scope featuring implicit cleanup - in which case the cleaner thread will do the release

      2. the confined scope is acquired, in the same thread, by a shared scope. Since a shared scope can be closed by any other thread, it follows that release can also be done by any thread.

      In both cases, this can lead to a racy update of the lock count: there could be release vs. release races, but also acquire vs. release races too.

            mcimadamore Maurizio Cimadamore
            mcimadamore Maurizio Cimadamore
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: