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

Check W^X state on possible safepoint

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • 17
    • hotspot
    • b23
    • aarch64
    • os_x

    Description

      There is a class of possible issues on macos/aarch64 related to W^X management, when the switch between modes is performed near JavaThread state change (java/native/vm). Thread state change checks for safepoint and sometimes this check leads to actual safepoint, where we may need WXWrite mode (e.g. making method non-entrant needs to poison nmethod instructions). So in general, java thread state should always be changed in WXWrite mode and before going to WXExec. Failing to do that leads to rare and hard to reproduce crashes.

      This enhancement suggests to add explicit check of the WX mode to catch such issues in advance.

      Attachments

        Issue Links

          Activity

            People

              akozlov Anton Kozlov
              akozlov Anton Kozlov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: