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

[lworld] C2 asserts with "re-allocation should be removed by Ideal transformation"

    XMLWordPrintable

Details

    Description

      # Internal Error (workspace/open/src/hotspot/share/opto/inlinetypenode.cpp:1041), pid=69717, tid=41219
      # assert(!is_default(igvn) && !is_allocated(igvn)) failed: re-allocation should be removed by Ideal transformation

      With the fix for JDK-8282079, change java.util.Optional to value class:

      diff --git a/src/java.base/share/classes/java/util/Optional.java b/src/java.base/share/classes/java/util/Optional.java
      index cd8b2b6048f..55dac3278a0 100644
      --- a/src/java.base/share/classes/java/util/Optional.java
      +++ b/src/java.base/share/classes/java/util/Optional.java
      @@ -59,7 +59,7 @@ import java.util.stream.Stream;
        * @since 1.8
        */
       @jdk.internal.ValueBased
      -public final class Optional<T> {
      +public final value class Optional<T> {
           /**
            * Common instance for {@code empty()}.
            */

      many of test/jdk/valhalla/valuetypes and test/hotspot/jtreg/runtime/valhalla/inlinetypes fail with this assertion.

      Attachments

        Issue Links

          Activity

            People

              thartmann Tobias Hartmann
              mchung Mandy Chung
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: