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

Remove failing assertion code when selecting first memory state in SuperWord::co_locate_pack

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b10

      Description

      Original RFE description:

      In the fix for JDK-8238438 it was not clear if the code to select the first memory state is dead or not. The assertion code was never hit in testing:

      if (!independent(current, ld)) {
        assert(false, "")
        return first_mem; // A later store depends on this load, pick memory state of first load
      }

      We could also not think of an example where we should pick the first memory state instead of the last. Therefore, we left an assert(false) in that code path in the fix for JDK-8238438. If it later turns out that there is a valid use case where we need to select the first memory state, we can simply remove the assert again. Otherwise, we could clean this code up later for JDK 16 and always go with the last memory state. The code to check if the first memory state should be picked could be left as assertion code.


      Edit for JDK 17:
      We found a fuzzer test case (attached) in which we must take the first memory state of a load pack to guarantee a correct result. Picking the last memory state instead results in a wrong execution. Therefore, we can removed the assertion code added with JDK-8238438 as we are now sure that we need the first memory state for some cases. Turning this into a bug.

        Attachments

        1. FuzzerUtils.java
          13 kB
          Christian Hagedorn
        2. hs_err_pid22195.log
          171 kB
          Christian Hagedorn
        3. Test.java
          8 kB
          Christian Hagedorn

          Issue Links

            Activity

              People

              Assignee:
              chagedorn Christian Hagedorn
              Reporter:
              chagedorn Christian Hagedorn
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: