RFR: 8355387: [jittester] Disable downcasts by default

duke duke at openjdk.org
Thu Apr 24 08:40:47 UTC 2025


On Thu, 24 Apr 2025 06:23:11 GMT, Evgeny Nikitin <enikitin at openjdk.org> wrote:

> Currently, JITTester's love to downcast often produces something like this:
> 
> ArrayList<Integer> someVar = (TreeSet)(Object)(List)(new ArrayList<Integer>());
> 
> ... which is possible because it goes up to Object and then starts downcasting to some totally unrelated class / type.
> 
> Considering the JITTester's love to casts (they are more-or-less 'safe' expressions), it means a high probability (30-50%) of a gentest to fail compilation. Even worse is the situation for ByteCode tests - that they're faulty is only recognized during the run phase.
> 
> I suggest to disable the downcasts for now.
> Testing: 50-100 generated tests in different combinations (default, with the flag set to 'false' or 'true') with artificially increased chance to casts.

@lepestock 
Your change (at version 5f1e46c1d4e47ef9b2a53c503a5b74674792b87d) is now ready to be sponsored by a Committer.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/24840#issuecomment-2826811445


More information about the hotspot-compiler-dev mailing list