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

PPC, s390x: LightweightSynchronizer::exit asserts, missing lock

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 24
    • None
    • hotspot
    • b13
    • ppc, s390x

    Description

      JDK-8338638 made me realise that PPC and s390x have the same issue.

      The issue is that the C2 unlock path will check if the monitor is inflated after popping of the last entry on the lock stack. With UseObjectMonitorTable (without the the cache lookup implemented), the slow path is incorrectly taken without resting the popped oop. Currently the runtime expects the the lock stack to be consistent (have an entry) in exit if a the monitor is anonymously inflated.

      I'll provide a bandaid fix which pushes back the oop before the calling to the runtime.

      A future enhancement for all platform would be to allow the C2 entry point to redo the push when taking the slow path and it realises that the monitor is anonymously inflated or it is fast locked and the lock stack does not contain the oop. (Removing all the push back logic from the emitted C2 unlock nodes)

      Attachments

        Issue Links

          Activity

            People

              aboldtch Axel Boldt-Christmas
              aboldtch Axel Boldt-Christmas
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: