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

AArch64: Concurrency problems in JavaFrameAnchor

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • 24
    • 8-aarch64, 11, 15, 16
    • hotspot
    • aarch64

      It looks that _last_Java_sp is additionally used as acquire/release flag that guards the rest of the state. Yet, the coding in javaFrameAnchor_aarch64.hpp is incorrect at least in one place:

          _last_Java_fp = src->_last_Java_fp;
          _last_Java_pc = src->_last_Java_pc;
          // Must be last so profiler will always see valid frame if has_last_frame() is true
          _last_Java_sp = src->_last_Java_sp;

      There should be OrderAccess::release() where the comment suggesting the ordering constraint actually is. Additionally, it has to be matched with OrderAccess::acquire() before _last_Java_sp reads.

      Example fix:
       https://github.com/openjdk/jdk/compare/master...shipilev:JDK-8253611-aarch64-javaframeanchor

            coleenp Coleen Phillimore
            shade Aleksey Shipilev
            Votes:
            0 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved: