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

MergeMemStream should not modify mm (memory1)

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 20
    • hotspot

      Both MergeMemNodes should not be modified, currently mm2 is const, but mm is mutable.
      The problem is that modification is not really expected. [~thartmann] and I have found places in the code where mm is modified. But the node is never added to igvn worklist.
      This lead to issues in JDK-8255670 where I check if all modified nodes end up on the igvn worklist. So I had to ad hoc add the nodes to the igvn worklist - this is not a very nice solution.

      A better solution: Make sure we can stream over the two MergeMem nodes, and when the lengths are not identical to simply return empty_memory nodes where we are out of bounds (maybe it is a little more complicated, this is only a first guess).

            epeter Emanuel Peter
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: