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

C2: strenghten assert in create_scalarized_object_description after JDK-8370405

XMLWordPrintable

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

      In JDK-8370405, I added an assert in PhaseMacroExpand::create_scalarized_object_description, that verifies that the value fits the field. But I could only make the assert work with primitive types.

      I was struggling with this test:

      /home/empeter/Documents/oracle/jtreg/bin/jtreg -va -s -jdk:/home/empeter/Documents/oracle/jdk-fork2/build/linux-x64-debug/jdk -javaoptions:"-ea -esa -XX:CompileThreshold=100 -XX:+UnlockExperimentalVMOptions -Xcomp -server -XX:+TieredCompilation -XX:TieredStopAtLevel=1 -XX:+UseNewCode" -J-Djavatest.maxOutputSize=10000000 /home/empeter/Documents/oracle/jdk-fork2/open/test/jdk/jdk/incubator/vector/VectorReshapeTests.java

      It seems to have some issue with a cast after a call, and we don't get the interface back. See discussion here:
      https://github.com/openjdk/jdk/pull/27997#discussion_r2474151074

      Ideal would be just a simple subtype check, because we can only assign a value to a field if it is a subtype.

      This may catch bugs analogue to JDK-8370405, though that one had issues with a mismatch of primitive types.

            qamai Quan Anh Mai
            epeter Emanuel Peter
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: