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 toJDK-8370405, though that one had issues with a mismatch of 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
- relates to
-
JDK-8370405 C2: mismatched store from MergeStores wrongly scalarized in allocation elimination
-
- Resolved
-