Integrated: 8355387: [jittester] Disable downcasts by default
Evgeny Nikitin
enikitin at openjdk.org
Fri Apr 25 07:22:56 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.
This pull request has now been integrated.
Changeset: b41e0b17
Author: Evgeny Nikitin <enikitin at openjdk.org>
Committer: Tobias Hartmann <thartmann at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/b41e0b17490b203b19787a0d0742318fc0d03b33
Stats: 2 lines in 1 file changed: 0 ins; 0 del; 2 mod
8355387: [jittester] Disable downcasts by default
Reviewed-by: thartmann, chagedorn
-------------
PR: https://git.openjdk.org/jdk/pull/24840
More information about the hotspot-compiler-dev
mailing list