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

Missing unconditional cross modifying fence in nmethod entry barriers

XMLWordPrintable

    • gc
    • b06

        Follow up of - https://bugs.openjdk.org/browse/JDK-8310239
        Relates to - https://bugs.openjdk.org/browse/JDK-8331911

        is_armed() check in barrierSetNMethod returns early if the nmethod is not armed.(https://github.com/openjdk/jdk/blob/71a692ab435fdeea4ce8f8db7a55dd735c7c5016/src/hotspot/share/gc/shared/barrierSetNMethod.cpp#L175-L177).
        Hence, cross-modify fence is not executed always. (https://github.com/openjdk/jdk/blob/71a692ab435fdeea4ce8f8db7a55dd735c7c5016/src/hotspot/share/gc/shared/barrierSetNMethod.cpp#L189).

        The nmethod entry barriers guard modification to instructions and data through a mixed bag of synchronous and asynchronous cross modifying code. By skipping the cross modification fence we perform an incomplete synchronous instruction cross modification. We should perform cross modification fence always.

              eosterlund Erik Österlund
              nprasad Neethu Prasad
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: