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

C2: Wrong type of return value of Unsafe.getAndSetObject() call

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P2 P2
    • 11
    • 8u161, 9, 10, 11
    • hotspot

      Sometimes C2 eliminates non-null branch in the following code as if it proved that ThreadCont.getAndSet() can't return non-null:

          val cont = ThreadCont.getAndSet(threads[i], null)
          if (cont != null) { /* do something */ }

      Detailed problem description & reproducer (by Roman Elizarov):
        https://github.com/ktorio/ktor/blob/resumeAnyThread_HotSpotBug/BUG_README_FIRST.md

            vlivanov Vladimir Ivanov
            vlivanov Vladimir Ivanov
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: