riscv: fix the infinite LR/SC loop in BarrierSetAssembler::eden_allocate

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • repo-riscv-port
    • Affects Version/s: repo-riscv-port
    • Component/s: hotspot
    • None
    • riscv
    • linux

      This bug can be reproduced by `java -XX:+UseSerialGC -XX:-UseTLAB -XX:TieredStopAtLevel=1 -version` on the unmatched board where this command will hang. The reason is that the implementation of load reserved/store conditional loop in BarrierSetAssembler::eden_allocate breaks the RISC-V Atomic extension spec:
      ```
      For the
      sequence to be guaranteed to eventually succeed, the dynamic code executed between the LR and
      SC instructions can only contain other instructions from the base \I" subset, excluding loads, stores,
      backward jumps or taken backward branches, FENCE, FENCE.I, and SYSTEM instructions.
      ```
      It may cause an unspecified behaviour depends on specific hardware implementations.

            Assignee:
            Yadong Wang
            Reporter:
            Yadong Wang
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: