Uploaded image for project: 'Harmony'
  1. Harmony
  2. HARMONY-6211

[drlvm][jit] write barrier broken by H5826

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: DRLVM
    • Labels:
      None
    • Environment:
      Windows, IA32

      Description

      When using -XX:gc.generate_barrier=true, even a simple HelloWorld couldn't run correctly. The bug is from an peephole optimization on ADD inst in H5826 which assumes no control flow branch in the middle of a basic block. In fact, some CALL insts break the assumption and make the optimization effective in wrong cases. Following is an example:

      I4: t5:ref:cls:java/lang/ref/ReferenceQueue =ADD t0:cls:java/lang/ref/Reference, t4(0):intptr
      I5: CALL t7(0):I_32 (AU:t0:cls:java/lang/ref/Reference, t5:ref:cls:java/lang/ref/ReferenceQueue, t2:cls:java/lang/ref/ReferenceQueue) [bcmap:6]
      I6: t9:ref:cls:java/lang/Object =ADD t0:cls:java/lang/ref/Reference,t8(0):intptr
      I7: CALL t10(0):I_32 (AU:t0:cls:java/lang/ref/Reference,t9:ref:cls:java/lang/Object,t1:cls:java/lang/Object) [bcmap:11]
      I8: RET t11(0):int16

        Attachments

        1. H6211-V1.patch
          0.7 kB
          Xiaoming Gu

          Issue Links

            Activity

              People

              • Assignee:
                xiao-feng li Xiao-Feng Li
                Reporter:
                xiaoming Xiaoming Gu
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated: