RFR: 8355387: [jittester] Disable downcasts by default
Tobias Hartmann
thartmann at openjdk.org
Thu Apr 24 07:18:52 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.
Looks good and trivial.
-------------
Marked as reviewed by thartmann (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/24840#pullrequestreview-2790003862
More information about the hotspot-compiler-dev
mailing list